The market ended its longest weekly losing streak in more than 20 years on Friday as investors were encouraged by signs that inflation is finally easing.

After seven weeks of losses, the S&P 500 and the Nasdaq gained for the first time this week. Since 2001, the S&P 500 has run lower. After eight weeks of declines, the Dow Jones Industrial Average won for the first time. Stock trading in the US will be closed on Monday.

The Federal Reserve's preferred inflation gauge, the Personal Consumption Expenditures Index, rose 4.9% in April, down from the 5.2% gain in March. The headline consumer price index dipped to 8.3% in April from 8.5% in March.

The US indexes were at 4:00 p.m. on Friday.

Hopes that the Fed wouldn't be forced to raise interest rates more aggressively this year were boosted by the slowdown in inflation readings.

Chris Beauchamp, chief market analyst at IG, said in a note that investors have been more comfortable buying into this rally due to the lack of any rate hikes this week.

Inflows into global equity funds hit a 10-week high this week, Bank of America said Friday. Policy makers agreed that they should raise interest rates quickly and then take time to assess the impact of rate hikes on the economy.

The idea of a Fed pause gathered steam this week. The recent sell-off in stocks could find a bottom if the Fed indicates it is ready to stop monetary policy.

Big Lots stock plummeted, with the retailer swinging to a quarterly loss as inflation squeezed its customers.

Russia is about to default on its bonds, according to the White House. Bank of America warned that a further drop in Russian oil supply is likely to lead to a global recession and push prices past $150 a barrel.

Oil prices went up. The price of West Texas Intermediate crude increased to $113.12 per barrel. The international benchmark gained 1.4%.

The price of gold was $1,850.70 per ounce. The 10-year yield fell.

It lost 3.8% to $28,321.11.