Wall Street capped a week of losses with a broad rally for stocks Friday, as investors welcomed solid earnings from big companies and an encouraging report on consumer sentiment and inflation expectations.

A July survey from the University of Michigan showed that inflation expectations have held steady or improved, along with general consumer sentiment. The report was welcome following several government reports this week that showed consumer prices remained extremely hot in June, along with wholesale prices for businesses.

The report also bodes well for investors looking for signs that the Federal Reserve might eventually ease off its aggressive policy to fight inflation.

The S&P 500 rose 1.9%, snapping a five-day losing streak. Still, the gains weren't enough to pull the benchmark index out of the red for the week.

The Dow Jones Industrial Average rose 2.1% and the Nasdaq gained 1.8%. Smaller company stocks outgained the broader market, sending the Russell 2000 index 2.2% higher. Those indexes also posted losses for the week, however.

“Investors are saying, look, ’we’ve seen this before, where the market goes up smartly one day, only to turn back around the next day,'” said Sam Stovall, chief investment strategist at CFRA.

Technology stocks, banks and healthcare companies made some of the biggest gains. PayPal climbed 6.3%. UnitedHealth Group rose 5.4% after raising its profit forecast for the year following a strong earnings report. Citigroup jumped 13.2% for the biggest gain in the S&P 500 after reporting encouraging financial results.

Bond yields mostly fell. The yield on the 10-year Treasury slipped to 2.92% from 2.96% late Thursday. The yield on the two-year Treasury rose to 3.14% from 3.13% late Thursday.

Inflation and its impact on businesses and consumers remains a key focus for Wall Street. The Federal Reserve has been raising interest rates in an effort to hit the brakes on economic growth, and curtail rising inflation. The Fed has already raised rates three times this year.

Wall Street has been worried that the Fed could go too far in raising rates and actually bring on a recession. Investors have been closely watching economic reports for clues as to how the central bank might react and the latest upbeat consumer sentiment report raises the chance of the Fed softening its current policy.

Traders have eased off of their bets that the Fed will issue a monster rate hike of 1% at its next policy meeting in two weeks. They now see a 30.9% chance of that happening, according to CME Group. That's down significantly from Thursday. They now see a 69.1% chance of a three-quarters of a percentage point rate hike.

Economic data also shows that retail sales remain strong. A government report showed that retail sales rose 1% in June from May, topping economists’ expectations, while prices for everything from food to clothing rose.

All told, the S&P 500 rose 72.78 points to 3,863.16. The index has resisted dropping below 3,800, noted Stovall.

“Whenever we come down to about 3,800 and we bounce off it it’s a confirmation there are a lot of buyers at that level,” he said. “And we saw that yesterday as the market retested that level only to be pushed higher, and then today with encouraging fundamentals to go along with it.”

The Dow rose 658.09 points to 31,288.26 and the Nasdaq rose 201.24 points to 11,452.42. The Russell 2000 gained 36.87 points to 1,744.37.

Overseas, stocks in Hong Kong and Shanghai fell following a report that showed the Chinese economy shrank by 2.6% compared with the January-March period’s already weak quarter-on-quarter rate of 1.4%. China locked down major cities earlier this year to try and contain COVID-19 cases and more outbreaks this week in China and elsewhere in Asia have raised worries that COVID-19 controls might be restored, on top of existing precautions.

Investors have been reviewing the latest batch of corporate earnings to gain a clearer picture of inflation's impact on businesses. Banks kicked things off with mixed results this week. Several big companies are on deck for next week, including Johnson & Johnson, Netflix, United Airlines and Twitter.

Copyright 2022 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.