Stocks posted a three-day winning streak on Tuesday as the major averages continued to recover from the correction levels reached last week.
The Dow Jones industrial average closed 39.25 points higher at 24,640.45 after falling as much as 180.24 points. Goldman Sachs and 3M were the biggest contributor of gains to the 30-stock index, both rising 0.9 percent.
The S&P 500 rose 0.3 percent to 2,662.94, with financials among the best-performing sectors. Wells Fargo was the best-performing stock in the financials sector, rising 2.6 percent. Tech, meanwhile, rose 0.3 percent after trading lower earlier in the session.
The Nasdaq composite climbed 0.5 percent to close at 7,013.51, with shares of Nvidia and Amazon both climbing about 2 percent. The tech-heavy index fell as much as 0.6 percent earlier in the session.
The indexes closed higher for the third day in a row, bouncing back from correction levels seen last week. On Thursday, the Dow, S&P 500 and Nasdaq all closed at least 10 percent below record highs set last month.
They fell earlier in the session as investors continued to digest the recent wild market swings on Wall Street.
"The market was trading with some reservation to the downside," said Robert Pavlik, chief investment strategist at SlateStone Wealth, noting the indexes quickly bounced off their session lows. "There wasn't much follow-through down."