Stocks fell on Tuesday as corporate results from Caterpillar and 3M disappointed investors, but the market managed to recover most of its losses later in the session as investors rotated into McDonald's and defensive stocks like Procter & Gamble.

The Dow Jones Industrial Average closed 125.98 points lower at 25,191.43 while the fell 0.55 percent to 2,740.69. The Nasdaq Composite, meanwhile, closed 0.4 percent lower at 7,437.54. The small-caps Russell 2000 dropped 0.8 percent and turned negative for the year.

At its session lows, the Dow had fallen 548.62 points, while the S&P 500 and Nasdaq had lost more than 2 percent each. The comeback was led by McDonald's, which rose more than 6 percent on strong earnings, and a 0.65 percent gain in Procter & Gamble. Coca-Cola also rose 0.85 percent while the S&P 500 consumer staples sector climbed 0.4 percent.

"We broke below that 2,700 level on the S&P 500 and buyers came out of the woodworks," said Jeff Kilburg, CEO of KKM Financial. "I think people were waiting for this and are now more comfortable" buying at these levels. But while he finds the move to be impressive, Kilburg said there will be more volatility moving forward.

The S&P 500 posted its fifth straight decline and briefly dipped below the lows hit earlier in October during this ongoing sell-off. The major indexes are all down at least 4.7 percent for October.