It was another unpredictable day on Wall Street.
Stocks wavered between a much-needed rally and slight losses for much of the session before settling higher.
The S&P 500 was up 0.52%, the Dow Jones Industrial Average added 0.74%, and the Nasdaq was flat.
Stocks edged further from a bear market, though remained in correction territory, with the S&P 500 down 12.4% from 52-week highs and the Dow having fallen 13.5%.
"It's a classic tug of war between good news and bad news," Mike Baele, managing director at the Private Client Reserve at U.S. Bank, told TheStreet on the current market mood.
On the one hand, the U.S. economy continues to show resilience in the face of a global slowdown with the labor and housing markets particular paragons of strength.
On the other, fears over oil prices and China have stuck around for the start of the year to encourage investors to unload positions. Fears over the former eased, at least for Thursday, as prices rocketed higher in a long overdue rally after days at 12-year lows. West Texas Intermediate closed above $29 a barrel after a weekly read on crude inventories rose less sharply than expected.
"It seemed like oil has really entered an oversold situation," said Baele. "There has been demand growth and it is always a bigger issue if you have a demand problem than a supply problem. At these levels it's highly likely we'll see a supply response" such as oil producers cutting production.
The energy sector was the best performer on markets. Major oilers including Exxon Mobil (XOM) , Chevron (CVX) , ConocoPhillips (COP) and Shell (RDS.A) were all higher, while the Energy Select Sector SPDR ETF (XLE) added 3%.