New York (CNN Business) The erratic stock market just made a serious comeback.

Fears about slowing earnings growth sent the Dow careening 549 points lower on Tuesday before the index raced back to life.

By the closing bell, the Dow was only down 126 points, or 0.5%.

Similarly, the Nasdaq closed down 0.4%, erasing the vast majority of a 2.6% plunge. The index also climbed out of a technical correction, a 10% decline from prior highs.

The S&P 500 suffered its fifth straight loss. But the broad index finished just modestly lower after touching its weakest point in nearly four months.

Market veterans saw little reason for the dramatic recovery -- other than the fact that stocks had gotten to oversold levels.

"It was an impressive day. We reversed on very little news," said Art Hogan, chief market strategist at B. Riley FBR.

Hogan pointed to how the rebound was led by two of the most beaten-down corners of the market: homebuilders and chip makers.

Stocks sold off early on Tuesday after major US companies reported gloomy results and guidance. Disappointing numbers from Caterpillar and 3M reinforced ongoing concerns about how long blockbuster profits can last, especially given tariffs and rising costs.

"Investors are skittish about whether we've seen a peak in earnings," said Mark Luschini, chief market strategist at Janney Capital Management. "It's a schizophrenic market environment where things that didn't matter suddenly do."

It's been a scary month for investors. The Dow and Nasdaq are on track for their worst months since January 2016.

"The market is fragile," said Rich Guerrini, CEO of PNC Investments. "But we're telling our investors to relax. We're in a correction. I think the market does have some legs left."

The CNN Business Fear & Greed Index slipped further into "extreme fear." A month ago the gauge of market sentiment was flashing "extreme greed."

Wall Street was also spooked by extreme turbulence in China, the epicenter of the trade war. The Shanghai Composite dropped 2.3% overnight. The sell-off wiped out a chunk of Monday's spike, the benchmark index's best day since March 2016

Earnings jitters

A number of large American companies with exposure to growing trade disputes reported their quarterly financial results Tuesday. Investors are worried that a slowing Chinese economy and an escalating trade war could pinch profits.

"The earnings are reflecting investors' worst fears -- and it's exacerbating the selling," said Michael Arone, chief investment strategist at State Street Global Advisors.

3M ( MMM ) shares declined 4% after the maker of Post-it Notes reported a dip in sales and weaker-than-expected profits. Worse, the Dow component downgraded its earnings forecast for the year.

Caterpillar ( CAT ), a closely-watched barometer of global growth, tumbled 8% as the maker of construction and mining equipment's record third-quarter profit was overshadowed by disappointing guidance. Caterpillar, also a member of the Dow, warned of "higher material and freight costs, including tariffs."

Harley-Davidson ( HOG ) shares lost 2% after posting a 13% plunge in US sales due to "weakness" in the market. It was Harley's biggest sales slump in eight years, Bloomberg News reported. The company, which plans to shift some manufacturing overseas in response to the threat of tariffs, also warned tariffs will increase costs by up to $48 million this year.

The results highlight lingering worries about whether the US economy and stock market can continue to grow rapidly.

"How long is this going to last?" asked Luschini. "Companies that only match earnings get punished. And ones that miss expectations get outright slayed."

Bracing for a slowdown

But the news wasn't all gloom-and-doom from Corporate America. McDonald's shares climbed 6% after saying earnings and sales declined less than feared.

United Technologies ( UTX ), another major global company, raised its outlook. And Verizon said it grew profit and revenue more than investors anticipated.

Overall, Corporate America is still minting a ton of money thanks to the strong economy and tax cuts. S&P 500 companies are expected to grow per-share profits by nearly 20% this quarter, according to FactSet. And the vast majority of companies reporting results have beaten expectations.

However, investors are bracing for a slowdown. S&P 500 profits are expected to decelerate to 16.5% in the fourth quarter and 6.8% in the second quarter, according to FactSet.

"Everyone sees that the rate of earnings growth is slowing. That becomes problematic," said State Street's Arone.

Global growth concerns also weighted on the commodity markets. US oil prices tumbled 4.2% to about $65.43 a barrel, pressuring energy stocks. Copper slid more than 1%.

Overseas markets were sharply lower Tuesday. Hong Kong's Hang Seng index tumbled 3% in trading there, and Japan's Nikkei fell almost as much. The Dax in Germany closed down 2%..

B. Riley FBR's Hogan thinks the market turbulence will continue, especially as earnings season rolls on in the United States.

"How many 3M's are out there?" asked Hogan. "Strap in for a roller coaster ride, at least for a little bit."