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 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."
A sharp rise in interest rates over the past few weeks has sent jitters through Wall Street, as inflation fears raised worry that the Federal Reserve will have to tighten monetary policy faster than the market expects. These worries are reflected in a Bank of America Merrill Lynch survey, which showed professional investors slashed their bond allocations to their lowest levels in 20 years.
"This all goes back to the fact that we were overbought on Jan. 26, when we hit all-time highs, and then the next week we got one data point that spooked the market: wage growth," said Marc Chaikin, CEO of Chaikin Analytics. "The market is spooked by inflation."
The benchmark 10-year yield hit a four-year high on Monday. It traded slightly lower at 2.831 percent Tuesday as investors looked ahead to the release of key inflation data.
The latest reading on the Consumer Price Index is scheduled for release Wednesday at 8:30 a.m. ET.
"Tomorrow will bring the most important CPI report in over 10 years, as rising inflation (which will cause higher interest rates) has become one of the biggest risks to this multi-year rally," Tom Essaye, founder of The Sevens Report, said in a note Tuesday.
Stock-market volatility has roared back recently amid increasing inflation fears and the rise in interest rates. The S&P 500 has posted moves greater than 1 percent in six of the past eight trading days. For context, the broad index posted just eight 1 percent moves all of last year.
"Things are still volatile," said Jeremy Klein, chief market strategist at FBN Securities. "However, as the skittishness abates, portfolio managers will have more comfort plowing their idle capital back into stocks. Yesterday's classic 'checkmark' pattern reflected this burgeoning confidence."
In corporate news, Amazon is reportedly ramping up its medical supply business, sending shares of hospital suppliers lower. Cardinal Health, McKesson and Owens & Minor all fell at least 1.9 percent.
Elsewhere, shares of AmerisourceBergen soared more than 9 percent after the Wall Street Journal reported that Walgreens Boots Alliance has reached out to the company about a takeover.
There are no major economic reports due Tuesday, but Cleveland Federal Reserve President Loretta Mester said the recent market rout is not impacting the central bank's economic outlook.
"While a deeper and more persistent drop in equity markets could dash confidence and lead to a pullback in risk-taking and spending, the movements we have seen are far away from this scenario," Mester said Tuesday.