U.S. stocks edged higher Friday and headed toward their best week since March, buoyed by renewed confidence in a global economic expansion.

The Dow Jones Industrial Average rose 249 points, or 0.7%, to 34446. The S&P 500 climbed 0.3%, heading toward a fresh closing high, and the Nasdaq Composite inched down less than 0.1%.

Stocks have regained ground since last week, when the Federal Reserve signaled it was aiming to raise interest rates sooner than it had previously anticipated. The Dow had tumbled for its biggest weekly loss since October. But on Monday, stocks began rallying again, with many of the biggest decliners of the prior week leading the market’s comeback.

Investors attribute the bounceback to data signaling a fresh acceleration in the world economy, as well as optimism over the prospect of additional fiscal stimulus. President Biden and a group of 10 centrist senators agreed to a roughly $1 trillion infrastructure plan Thursday that would go toward improving the electrical grid, transit, roads and bridges and other forms of infrastructure.

“We are still in a phase where we’re seeing the activity data still accelerate,” said Hani Redha, a fund manager at PineBridge Investments, pointing to surveys showing eurozone business activity is growing at the fastest pace in 15 years.

At the same time, investors also say the back-and-forth in markets over the past two weeks suggests there is still some uncertainty over the path of interest rates, inflation and monetary policy.

“It is natural that you’ll see very mini wobbles from time to time,” Mr. Redha added. “But the fundamental support—that things are improving and the numbers are getting better—is going to dominate that.”

Among individual stocks, Nike shares jumped 14% Friday after the sports apparel maker posted record sales in the three months through May.

FedEx shares fell 4.7% after announcing plans to raise spending to add capacity to its network.

Related Video

Recently, the U.S. inflation rate reached a 13-year high, triggering a debate about whether the country is entering an inflationary period similar to the 1970s. WSJ’s Jon Hilsenrath looks at what consumers can expect next. Photo: Alexander Hotz The Wall Street Journal Interactive Edition

CarMax said quarterly profit and sales rose, lifting shares of the used-car retailer 6.3%.

Rite Aid slid 6.4% after JPMorgan analysts downgraded their rating for the stock to underweight from neutral, citing disappointment with the pharmacy chain’s guidance for the next fiscal year.

In overseas markets, the Stoxx Europe 600 edged up 0.1%, finishing the week with a 1.2% gain.

Japan’s Nikkei 225 rose almost 0.7% by the close. China’s Shanghai Composite Index added 1.2% and Hong Kong’s Hang Seng climbed 1.4%.

Looking forward, some analysts remain concerned that accelerating inflation will prompt the Federal Reserve to withdraw some of the stimulus it has lavished on markets since the spring of 2020.

But others say they were reassured by Fed Chairman Jerome Powell’s testimony to Congress this week.

Mr. Powell had said he had a level of confidence that inflation will subside, suggesting the Fed will not be in a rush to tighten monetary policy, said Peter van der Welle, a strategist at Robeco.

At the same time, “the infrastructure deal also portrays that the fiscal thrust is still very much with us,” he added.

Both the S&P 500 and the Nasdaq Composite on Thursday closed at fresh records.

Both the S&P 500 and the Nasdaq Composite on Thursday closed at fresh records.

Photo: Richard Drew/Associated Press

Write to Joe Wallace at Joe.Wallace@wsj.com and Akane Otani at akane.otani@wsj.com