NEW YORK — Another strong gain for stocks Friday extended the market's recovery from a dismal start to the year to a fifth week in a row.

The Standard & Poor's 500 index closed up for the year for the first time. The Dow Jones industrial average turned positive Thursday.

Both had been down more than 10 percent for the year a little more than a month ago.

The Dow rose 120.81 points Friday, or 0.7 percent, to 17,602.30. It is up 1 percent for the year.

The S&P 500 gained 8.99 points, or 0.4 percent, to 2,049.58, and is now up 0.3 percent for 2016.

The Nasdaq composite picked up 20.66 points, or 0.4 percent, to 4,795.65, though the Nasdaq remains down 4 percent for the year.

Stocks had plunged early this year as investors feared that the Chinese economy, which has been the engine of global growth, was slowing faster than expected and that China's slide would be enough to pull the U.S. economy into recession.

“The market tended to focus on the negative and ignore the good” at the start of this year, said Lowell Yura, head of Multi-Asset Solutions for BMO Global Asset Management.

But over the course of the five-week rally, reports on hiring, manufacturing and construction spending showed the U.S. economy is doing fairly well.

Industrial, consumer and technology stocks benefited from the more positive outlook in the U.S.

Energy and materials stocks climbed as oil and precious metals prices rose.

And this week the Federal Reserve said it expects to slow the pace of interest rate increases this year. Lower rates make stocks look more attractive to investors, and they help boost economic growth by reducing borrowing costs and reducing the risk associated with starting or expanding businesses.

The biggest gainers Friday were health care stocks and banks, the worst-performing parts of the market this year.

Companies that make aircraft, machinery and chemicals also rose as the dollar fell against other currencies on hopes that the weaker dollar will boost their sales outside of the U.S.

Columbia Pipeline Group climbed after Trans Canada Corp. agreed to buy the company for $10 billion, or $25.50 per share, in an attempt to expand further into the U.S. Columbia Pipeline stock advanced $1.33, or 5.7 percent, to $24.84.

Health care stocks regained some ground after a rough week. Hospital operator Tenet Healthcare rose $1.57, or 5.9 percent, to $28.14 and prescription drug distributor McKesson gained $6.62, or 4.4 percent, to $158.31. Drug companies also ticked upward after days of losses, including Bristol-Myers Squibb, which rose $1.36, or 2.2 percent, to $62.83.

JPMorgan Chase said it will buy back another $1.88 billion in stock, while Bank of America announced an $800 million stock repurchase.