(AP) -- Wall Street added to its recent gains Friday as stocks closed higher, driving the S&P 500 to its best week since July.
The S&P 500 rose 0.7% for its third straight gain and ended the week 1.8% higher. The Dow Jones Industrial Average rose 1.1% and the Nasdaq composite gained 0.5%.
The latest rally came as investors welcomed encouraging quarterly report cards from several companies. Leading the way for the S&P 500 was freight deliverer J.B. Hunt Transport Services, which jumped 8.7% after reporting stronger profits for the summer than Wall Street expected. Goldman Sachs rose 3.8% and Alcoa surged 15.2% after it beat earnings expectations and announced a dividend payment and buyback of its stock.
The positive company earnings dovetailed with a report showing people spent much more at U.S. retailers last month than Wall Street expected. Sales at stores, restaurants and other retail establishments rose 0.7% from August instead of falling, as economists forecast.
"We saw retail sales this morning come in pretty strong," said Sameer Samana, senior global market strategist at Wells Fargo Investment Institute. "(Stocks) are still at pretty reasonable valuations with another earnings season having just ticked on, and thus far at least, some pretty good results."
The S&P 500 rose 33.11 points to 4,471.37. The Dow gained 382.20 points to 35,294.76, and the Nasdaq rose 73.91 points to 14,897.34.
Friday's gain follows up on a 1.7% jump for the S&P 500 Thursday, its best day since March, which was driven by stronger-than-expected earnings reports and encouraging data on the job market.
It's a turnaround from a shaky few weeks, when the benchmark index fell as much as 5.2% from its record set on Sept. 2. Worries about stubbornly high inflation, reduced support for markets from the Federal Reserve and a slowing economy helped to knock stock prices around. The S&P 500 is back within 1.5% of its all-time high.
Earnings reporting season has just begun, but early indicators are encouraging. All but one of the 19 companies in the S&P 500 that reported quarterly results this week topped analysts' profit forecasts. Such strength is crucial after climbing interest rates heightened worries that stock prices had grown too expensive relative to profits.
The stronger-than-expected reports on the economy also help calm chatter about "stagflation," which is the feared marriage of a stagnating economy and high inflation.
Of course, all is not clear yet. A report on Friday showing consumer sentiment was weaker than expected amid inflation worries helped limit the market's gains.
Still, stocks of companies whose profits are most closely tied to the strength of the economy, including retailers, automakers and travel-related businesses, led the way higher Friday. Amazon rose 3.3%, Tesla added 3% and Marriott International gained 3.1%.
Other than financial companies, which benefited from the better-than-expected profit reports from several big-name banks, industrial and health care businesses were also among the strongest gainers. Caterpillar rose 2.4%, while UnitedHealth added 1.8%.
Johnson & Johnson gained 0.7% after a Food and Drug Administration panel endorsed booster doses of the company's single-shot COVID-19 vaccine. The panel said Friday that the booster should be offered at least two months after immunization but didn't suggest a firm time.
Treasury yields also rose following the much stronger-than-expected report on retail sales. The yield on the 10-year note climbed to 1.57% from 1.52% late Thursday.
"The biggest surprise on rates continues to be how low they are relative to all the anecdotal evidence and all the data about inflation that we see," Samana said.
Higher Treasury yields in recent weeks have been holding back technology and other high-growth stocks recently. When bonds are paying more in interest, investors aren't as willing to wait as long a time for big profit growth expectations to come to fruition or to pay as high prices for them.
Tech stocks in the S&P 500 fared a little better Friday, matching the broader market with a 0.8% gain, while the communication-services sector that includes many internet companies slipped 0.1%.
Stock markets overseas also notched gains. In Europe, Germany's DAX returned 0.8%, and France's CAC 40 gained 0.6%. The FTSE 100 in London rose 0.4%.
In Asia, Tokyo's Nikkei 225 added 1.8%, Hong Kong's Hang Seng climbed 1.5% and Seoul's Kospi advanced 0.9%.
The price of benchmark U.S. oil rose 1.2% to $82.28 per barrel, continuing a powerful run that has sent it up more than 70% this year and fanned worries about high inflation. The global benchmark for crude climbed 1%, though the price of U.S. natural gas fell 4.9%.