Subscribe Today! Please read: Readers of local content on the Herald and News website – heraldandnews.com – will require a subscription beginning today. For the first few months, non-subscribers will still be able to view 10 articles for free. If you are not already a subscriber, now is a great time to join for as little as $10/month!

Stocks overcame a big loss on Wall Street Wednesday, though the market’s recovery left plenty of signs of worry among investors that the fallout from the trade war between the U.S. and China will spread.

A late-afternoon rally lifted most of the major stock indexes out of the red, reversing most of the early slide that briefly pulled the Dow Jones Industrial Average down more than 580 points. Technology and consumer staples stocks powered much of the gains, offsetting losses in banks, energy companies and other sectors.

Even so, the moves in the bond and commodities markets signaled that investors are nervous that the escalating trade war between the U.S. and China may derail the global economy.

Bond yields sank around the world, something that happens when investors see a weaker economy and low inflation on the way. The price of oil tanked and the price of gold shot up to its highest level in six years as traders sought safe-haven holdings.

“You did see buyers come back to the market, which is a good sign for the market in the near term,” said Lindsey Bell, investment strategist with CFRA Research. “Investors need to buckle in for some volatility here in the next couple of months.”

The S&P 500 index eked out a gain of 2.21 points, or 0.1%, to 2,883.98. The index had been down 2% during the heaviest bout of selling.

The Dow dropped 22.45 points, or 0.1%, to 26,007.07. It had been down as much as 589 points.

The Nasdaq led the market’s upward swing, climbing 29.56 points, or 0.4%, to 7,862.83. The Russell 2000 index of smaller companies lost 1.40 points, or 0.1%, to 1,500.69.

The market has been roiled the past couple of weeks by growing anxiety as the U.S. and China clash over trade.

Last week, President Donald Trump rattled markets when he promised to impose 10% tariffs next month on all Chinese imports that haven’t already been hit with tariffs of 25%. China struck back on Monday, allowing its currency, the yuan, to weaken against the U.S. dollar.

China stabilized the yuan on Tuesday and that helped lift U.S. stocks a day after they endured their worst day of the year. But the markets turned volatile again early Wednesday after central banks in New Zealand, India and Thailand cut key interest rates.

The surprise rate cuts triggered a slide in bond yields around the world as investors scrambled for safety.

The yield on the 10-year Treasury touched its lowest level in nearly three years, falling as low as 1.60% from 1.74% late Tuesday, before climbing back to 1.73%. It was above 3% in late November.

Some investors saw the big drops Wednesday morning as an opportunity to buy stocks at cheaper prices.

“I see some stocks that look great that I’m buying today,” said George Young, portfolio manager at Villere & Co. “I just can’t make much of a case for bonds right now.”

The market’s turbulent turn comes less than two weeks after the benchmark S&P 500 hit an all-time high.

While investors have been scrambling to adjust to the turns in the trade conflict, the broader U.S. economy continues to grow and add jobs. Unemployment is at the lowest level in decades and consumer confidence remains strong.

Corporate earnings, meanwhile, have been coming in better than expected.

Still, the bond market continues to flash a warning signal of recession. The gap between the yield on the three-month Treasury and the 10-year Treasury widened further.

It’s a rare occurrence because investors usually demand bigger yields for tying up their money for longer periods of time, and one rule of thumb says a recession may hit about a year afterward if the gap, or spread, between those two rates persists.

A three-month Treasury was yielding 0.28 percentage points more than a 10-year Treasury as of Wednesday afternoon. It was 0.36 points earlier in the day, the widest gap since the spring of 2007, less than a year before the Great Recession.

Investors are increasingly betting that the Federal Reserve will need to cut short-term interest rates to support the economy given all trade tensions, and traders see a nearly 50% chance of three cuts or more by the end of the year. A month ago, they projected that probability at less than 9%.

U.S. stocks have been on a wild ride since Jan. 22, 2018, when Trump first imposed tariffs on solar products and washing machines to help U.S. manufacturers, but they’re virtually back to where they started.

The S&P 500 closed at 2,832.97 that day and has since been down as much as 17% and up as much as 7%, with moves often driven by waxing and waning worries about the trade war. The S&P 500 ended Wednesday up 1.8% from that early 2018 starting point.