U.S. stocks rose in early trading Friday, putting major indexes on course for gains at the end of a choppy week on Wall Street.

The S&P 500 ticked up 0.4% after the broad stocks index closed out its biggest monthly loss since March last year. The S&P through Thursday had fallen 3.3% so far this week, which would be its biggest decline since a 5.6% drop in late October 2020.

The...

U.S. stocks rose in early trading Friday, putting major indexes on course for gains at the end of a choppy week on Wall Street.

The S&P 500 ticked up 0.4% after the broad stocks index closed out its biggest monthly loss since March last year. The S&P through Thursday had fallen 3.3% so far this week, which would be its biggest decline since a 5.6% drop in late October 2020.

The technology-focused Nasdaq Composite Index also edged up 0.4%. The Dow Jones Industrial Average—which snapped a five-quarter winning streak Thursday—rose 0.6%.

Overseas markets retreated. The Stoxx Europe 600 dropped 0.8%, led lower by shares of banks, oil-and-gas companies and basic-resources producers.

In Asia, Japan’s Nikkei 225 lost 2.3% and South Korea’s Kospi fell 1.6%. Markets in Hong Kong and mainland China were closed for a holiday.

Merck gained more than 10% after the drugmaker said an experimental Covid-19 pill helped prevent high-risk people early in the course of the disease from becoming seriously ill and dying. Theater chain and meme stock favorite AMC Entertainment rose 5% after announcing the repurchase of debt securities that lowered its overall interest costs.

On the economic front, U.S. consumer spending rose 0.8% in August, the Commerce Department said. The pickup signals the U.S. economic recovery is gaining steam heading into autumn.

Although many investors expect stocks to keep rising, a bevy of factors has prompted them to anticipate a slower gains and more persistent volatility. The Federal Reserve and other global central banks have tilted in recent weeks toward reining in pandemic-era stimulus measures.

Surging prices for natural gas in Europe and Asia have raised concerns that the bout of inflation will last longer than many money managers had expected. Meantime, rising energy costs are expected to take a toll on growth in the world economy.

Energy prices cooled somewhat Friday. Futures for Brent crude, the benchmark in oil markets, fell 0.6% to $77.85 a barrel. Dutch natural-gas futures—which have surged almost fivefold in 2021 and are the benchmark in European gas markets—slipped 1.3% to 96.50 euros a megawatt-hour. That is equivalent to about $112 a megawatt-hour.

“The market’s focus has turned to the stagflation narrative with what’s been going on in natural gas,” said Daniel Morris, chief market strategist at BNP Paribas Asset Management. Mr. Morris expects the stock market to be choppy but keep posting modest gains.

The combination of central bank tightening and rising prices has sent bond yields higher this week. On Friday, however, the yield on 10-year Treasury notes fell to 1.493% from 1.528% the day before. Yields move in the opposite direction to bond prices.

High inflation has triggered a debate about whether the U.S. is entering an inflationary period similar to the 1970s.

The WSJ Dollar Index, which measures the dollar’s strength against a basket of currencies, slipped 0.2%, trimming recent gains that had pushed it near a one-year high. Bitcoin rose around 9% to about $47,529.

Among individual European stocks, ArcelorMittal dropped 3.4%, after the steelmaker late Thursday announced a change of chief executive at its mining business.

Investors also pointed to lingering worries over property giant China Evergrande Group and whether Congress can resolve its battles over U.S. spending plans. House Democrats delayed plans to vote on a roughly $1 trillion infrastructure bill Thursday, as they came up short on reaching agreement around a separate social policy and climate package.

Investors have become more cautious after a rally in stock markets for much of the year.

Photo: Spencer Platt/Getty Images

Write to Joe Wallace at joe.wallace@wsj.com