(AP) -- Wall Street ended a volatile week of trading Friday with a late-afternoon buying spree that gave the major stock indexes their biggest gains of the year and snapped their three-week losing streak.
The S&P 500 rose 2.4%, with nearly all of it coming in the last hour of trading. The Dow Jones Industrial Average added 1.7% and the Nasdaq jumped 3.1%.
The strong finish marked a reversal for the indexes, which had all been in the red earlier in the day. The Nasdaq managed the biggest about-face, recovering from a 0.9% deficit. Friday was only the latest in a string of sudden moves up and down this week.
Markets have been jittery as investors try to gauge how aggressively the Federal Reserve will move to ease its historic support for markets and the economy. There is likely going to be more volatility ahead as investors closely watch the impact of interest rate increases on the broader economy and the financial markets.
"I don't think we're out of the woods yet in terms of this kind of frenzied market behavior," said Liz Ann Sonders, chief investment strategist at Charles Schwab.
The S&P 500 rose 105.34 points to 4,431.85. The Dow gained 564.69 points to 34,725.47. The Nasdaq rose 417.79 points to 13,770.57.
The latest gains come late in a week where investors had been monitoring the index for what market watchers call a "correction," which is when an index sheds more than 10% of its value from a record high. The index is now 7.6% below the latest record reached on Jan. 3.
Bond yields edged lower. The yield on the 10-year Treasury fell to 1.78% from 1.81% late Thursday.
Investors expect the Fed to start raising interest rates in March and now expect five or more hikes of a quarter point each as the most likely path for the central bank this year. The sentiment follows the latest Fed statement and comments from Chair Jerome Powell that inflation is "slightly worse" than it was in December. The Fed also plans to phase out its bond purchases in March and is likely to start reducing the size of its balance sheet at some point, a move that has a similar effect as an increase in rates.
Investors expect the first rate hikes to come in March.
Powell has acknowledged that the high inflation that is squeezing businesses and consumers isn't loosening its grip and that could force the Fed to act more aggressively about raising interest rates.
The latest round of corporate earnings has shown that companies are still feeling the pinch of supply chain problems, raw material costs and other pressures from inflation.
Oreo cookie maker Mondelez fell 2.6% after issuing its latest warning about inflation hurting operations in North America. KLA, which makes equipment for chipmakers, fell 0.8% and computer hard drive maker Western Digital fell 9.1% after giving similarly disappointing updates on pressure from inflation.
Additional government reports are also showing that consumers are facing higher prices and they might be discouraging spending. A measure of prices that is closely tracked by the Fed rose 5.8% last year, the sharpest increase since 1982. The report from the Commerce Department also said that consumer spending fell 0.6% in December, with purchases of cars, electronics, and clothes declining.
Inflation concerns and worries about the impact of rising interest rates converged this week with worries about a potential conflict between Ukraine and Russia that could raise energy prices. A conflict could also distract nations from focusing on the lingering virus pandemic, which continues to threaten economic growth with each wave spiking COVID-19 cases.