NEW YORK >> U.S. stocks rallied on Friday to close out their dreary February on a brighter note.

The S&P 500 jumped 1.6% to trim its loss for the month, enough to make it the worst only since December instead of since April. It had dropped in five of the prior six days after weaker-than-expected reports on the economy and worries about President Donald Trump’s tariffs knocked the index off its all-time high set last week.

The Dow Jones Industrial Average rose 601 points, or 1.4%, and the Nasdaq composite climbed 1.6%.

Much of the recent damage had focused on the market’s biggest winners of recent years, whose momentum had seemed nearly impossible to stop at times. Stocks that flew in the frenzy around artificial-intelligence technology slumped sharply, for example. Bitcoin, meanwhile, dropped more than 20% from its record.

Many of those beaten-down areas of the market jumped Friday to recover some of their losses. Nvidia, which has become one of the market’s most influential stocks, rose 4% following its 8.5% tumble Thursday and was the strongest force lifting the S&P 500. Bitcoin bounced back above $84,000 after falling below $79,000 during the morning.

Stocks rose following an economic report released in the morning that included both some encouraging and discouraging trends

Inflation across the country decelerated a bit and behaved pretty much exactly as economists expected, according to the measure that the Federal Reserve prefers to use.

All told, the S&P 500 rose 92.93 points to 5,954.50. The Dow Jones Industrial Average gained 601.41 to 43,840.91, and the Nasdaq composite jumped 302.86 to 18,847.28.

In the bond market, Treasury yields sank again following the data on consumer spending and inflation. The yield on the 10-year Treasury fell to 4.20% from 4.26% late Thursday. It’s down sharply from last month, when it was approaching 4.80%, as worries have grown about where the U.S. economy is heading.