The S&P 500 closed positive for the year on Friday for the first time in 2016 as the U.S. Federal Reserve's dovish tone and a strengthening economic outlook compelled investors to take on more risk.
In part, the rally was a continued reaction to the Fed's move Wednesday, in which it scaled back expectations for the number of rate hikes in the coming months. Major indexes gained for five weeks in a row and the Dow closed higher every day this week.
"It was a huge gift to the market," said Mark Luschini, chief investment strategist at Janney Montgomery Scott in Philadelphia. "I think the market was bracing for a more hawkish view."
The Dow Jones industrial average closed positive for the year for the first time in 2016 Thursday.
Following the Fed move, the dollar weakened and drove up commodity prices. Oil rose above $42 a barrel.
"People are realising that this means a weaker dollar and that should benefit a lot of the stocks in the S&P and Dow, stocks with lots of exposure overseas," said Kim Forrest, research analyst at Fort Pitt Capital Group in Pittsburgh.
Crude oil dipped Friday as traders booked profits after strong seasonal demand and the U.S oil rig count rose for the first time since December.
Stronger-than-expected economic data, such as recent jobs and wages reports, and improved expectations for corporate earnings, have also eased recession fears and emboldened investors, Forrest said.
Contrary to sentiment in January and early February, investors are beginning to think, "We are not experiencing a recession," Forrest said.
The Dow Jones industrial average closed up 120.81 points, or 0.69 percent, to 17,602.3, the S&P 500 gained 8.97 points, or 0.44 percent, to 2,049.56 and the Nasdaq Composite had added 20.66 points, or 0.43 percent, to 4,795.65.
Eight of the 10 major S&P sectors closed higher, led by a 1.32-percent rise in the health care sector .SPXHC.
For the week, the Dow rose 1.8 percent, the S&P 500 gained 1.3 percent and the Nasdaq was up one percent. The CBOE volatility index .VIX, a gauge of what equity investors are willing to pay for protection against a drop on the S&P 500, closed at its lowest since early Aug. 18.
Bank of America and JPMorgan each climbed about 2.9 percent after the companies announced share buyback programmes, giving the biggest boost to the S&P 500.
Shares of Adobe rose 3.8 percent at $93.42 after the Photoshop maker raised its full-year profit and revenue forecasts above expectations.
Starwood Hotels & Resorts jumped 5.8 percent at $80.57 after receiving what it deemed a superior takeover offer from China's Anbang Insurance Group and said it planned to end a deal with Marriott. Shares of Marriott closed up 1.9 percent at $73.16.
About 10.9 billion shares changed hands on U.S. exchanges, well above the 8.02 billion average over the last 20 sessions.
Volumes were higher than usual on account of "quadruple witching," the expiry of options on stocks and indexes as well as futures on indexes and stocks.
NYSE advancing issues outnumbered decliners 1,855 to 1,183, for a 1.57-to-1 ratio on the upside; on the Nasdaq, 1,827 issues rose and 1,000 fell for a 1.83-to-1 ratio favouring advancers.
The S&P 500 posted 45 new 52-week highs and two lows; the Nasdaq recorded 84 new highs and 42 lows.