A late rebound in energy and biotech shares helped push the S&P 500 to a second straight day of gains on Tuesday, while Apple and other technology shares also boosted the market.
The Nasdaq snapped an eight-session losing streak, with the Nasdaq Biotech Index rebounding late, also breaking an eight-day run of losses. The biotech index, among the hardest-hit in this year's selloff, ended up 1.5 percent.
Crude oil prices ended lower after another roller-coaster session, but the S&P 500 energy index reversed course to end up 0.4 percent, while shares of Exxon Mobil jumped 2 percent to $75.20 and Chevron rose 1.7 percent to $82.15.
Technical indicators also suggested a rebound was in order, even if it is just short-lived, analysts said.
"This looks to me like a technical bounce. The market's very oversold," said Bruce Zaro, chief technical strategist at Bolton Global Asset Management in Boston.
"Until investors can fundamentally get their heads around oil at this price, the market will react to oil and China."
Stocks had their worst five-day start to a year ever following mounting investor concerns about declining oil prices and a China-led slowdown in global growth.
The Dow Jones industrial average was up 117.65 points, or 0.72 percent, to 16,516.22, the S&P 500 gained 15.01 points, or 0.78 percent, to 1,938.68 and the Nasdaq Composite added 47.93 points, or 1.03 percent, to 4,685.92.
The S&P 500 closed above the key 1,900 level, as it did on Monday, in a bullish technical sign.
Apple ended up 1.5 percent at $99.96 after Bank of America Merrill Lynch analysts upgraded their rating on the stock, while Intel rose 1.9 percent to $32.68 after J.P. Morgan gave upbeat comments on the stock.
Shares of Alcoa dropped 9 percent to $7.28, a day after it posted a quarterly net loss.
Health insurer Anthem Inc, which is buying rival Cigna Corp, said it expected adjusted net income to rise to over $10.80 per share in 2016 from $10.16 estimated for 2015.
Volume remained heavy. About 9.0 billion shares changed hands on U.S. exchanges, above the 7.5 billion daily average for the past 20 trading days, according to Thomson Reuters data.
Declining issues outnumbered advancing ones on the NYSE by 1,600 to 1,470, for a 1.09-to-1 ratio on the downside; on the Nasdaq, 1,417 issues rose and 1,412 fell for a 1-to-1 ratio favoring advancers.
The S&P 500 posted no new 52-week highs and 62 new lows; the Nasdaq recorded 12 new highs and 323 new lows.
(Additional reporting by Abhiram Nandakumar in Bengaluru; Editing by Nick Zieminski)
This story has not been edited by Firstpost staff and is generated by auto-feed.