Much of the pain from the first two months of 2016 melted away on Thursday as the Dow Jones Industrial Average climbed high enough to wipe out its year-to-date losses.
The S&P 500, which climbed 0.66%, didn't quite make it, and the Nasdaq, which added 0.46%, is still almost 5% lower than at the end of last year. The blue-chip Dow Jones index rose 0.32%.
Wall Street's gains were driven by a rally in crude oil prices that boosted energy stocks as well as residual goodwill following a dovish Federal Reserve meeting that ended Wednesday.
Commodity traders cheered after oil closed above $40 for the first time this year. West Texas Intermediate crude jumped 4.5% to $40.20 a barrel on Thursday, adding to a massive rally a day earlier.
"The crude complex is capitalizing on yesterday's gains with another venture into positive territory as U.S. crude fundamentals lend additional support to the prospect of an OPEC production freeze," Austin Sapp, commodity analyst at Schneider Electric, explained in a note.
The energy sector was one of the top performers. Major oilers Exxon Mobil (XOM) , Chevron (CVX) , ConocoPhillips (COP) and Royal Dutch Shell (RDS.A) climbed, while the Energy Select Sector SPDR ETF (XLE) added 1.4%.
Investors were still feeling bullish after after the Fed left rates unchanged on Wednesday, a move Fed Chair Janet Yellen described as "prudent." Only one hawk, Kansas City Fed President Esther George, voted to raise rates.
The central bank now expects two rate hikes this year, down from December's forecast of as many as four. The Fed also cut its forecasts for next year's hikes by 50 basis points.