Wall St moved higher on Thursday, pushing the Dow Jones industrial average into positive territory for the year, as commodity prices rose on the back of a weaker U.S. dollar to boost shares in the energy and materials sectors.
The Dow's move into positive territory came a day after the U.S. Federal Reserve took a dovish stance that weighed on the dollar.
"It was a weak dollar rally," said John Augustine, chief investment officer at Huntington National Bank. "It took up groups associated with a weaker dollar."
The top performing sectors in the S&P 500 were materials, industrials and energy.
The rally was a "continued reaction from the Fed's move," said David Lefkowitz, senior equities analyst at UBS Americas Wealth Management in New York.
The Fed on Wednesday pointed to moderate U.S. economic growth and strong job gains but cautioned about risks from an uncertain global economy.
The central bank pointed to the possibility of two more rate hikes before the end of the year, having laid out four hikes in 2016 when it raised rates in December.
The Dow Jones industrial average <.DJI> closed up 155.73 points, or 0.9 percent, to 17,481.49, the S&P 500 <.SPX> gained 13.37 points, or 0.66 percent, to 2,040.59 and the Nasdaq Composite <.IXIC> added 11.02 points, or 0.23 percent, to 4,774.99.
The Dow and S&P were at their highest since Dec. 31 and the Nasdaq hit its highest since Jan. 7.
U.S. crude <CLc1> settled up 4.5 percent at $40.20 a barrel on optimism that major producers will strike an output freeze deal next month amid rising crude exports and gasoline demand in the United States..
Healthcare <.SPXHC> was the only decliner among the 10 major S&P 500 sectors. It fell 1.05 percent, dragged down by Eli Lilly's <LLY.N> 4.7-percent fall.
Industrials <.SPLRCI> gained 2 percent, propped up by General Electric's <GE.N> 2.6-percent rise to $30.96. The stock gave the biggest boost to the S&P 500.
FedEx <FDX.N> rose 11.8 percent at $161.34 after the package delivery company forecast better-than-expected full-year earnings.
Endo International <ENDP.O> dropped 12.5 percent at $29.68, after the drugmaker forecast first-quarter results below estimates.
About 8.2 billion shares changed hands on U.S. exchanges, above the 8.02 billion average over the last 20 sessions.
Advancing issues outnumbered declining ones on the NYSE by 2,473 to 595, for a 4.16-to-1 ratio on the upside; on the Nasdaq, 1,927 issues rose and 872 fell for a 2.21-to-1 ratio favoring advancers.
The S&P 500 posted 61 new 52-week highs and 6 new lows; the Nasdaq recorded 73 new highs and 74 new lows.
(Additional reporting by Abhiram Nandakumar; Editing by Nick Zieminski)