U.S. stocks rose on Monday as a rally in crude oil and natural gas boosted the shares of energy companies.

The S&P 500 gained 0.5% in morning trading. The technology-focused Nasdaq Composite and the Dow Jones Industrial Average also rose 0.5%.

Third-quarter earnings season will kick off this week, and investors are awaiting insight into the...

U.S. stocks rose on Monday as a rally in crude oil and natural gas boosted the shares of energy companies.

The S&P 500 gained 0.5% in morning trading. The technology-focused Nasdaq Composite and the Dow Jones Industrial Average also rose 0.5%.

Third-quarter earnings season will kick off this week, and investors are awaiting insight into the impact of stickier-than-anticipated inflation, brought on by supply-chain disruptions, labor shortages and surging energy prices. Some are worried that higher costs for products and energy could crimp demand, while winter could lead to a resurgence in Covid-19 infections. No major earnings are due Monday.

“If it wasn’t for the huge amount of savings people are sitting on from the pandemic, I’d be more worried,” said Mike Bell, global market strategist at J.P. Morgan Asset Management. “The obvious risk to that is winter. I don’t think anyone knows if that will lead to another pickup in cases and hospitalizations.”

Futures for Brent crude, the global gauge of oil prices, rose 2% to $84.05 a barrel, near their highest level in three years. Some investors are betting that a world-wide shortage of natural gas and other fuels needed to power homes and businesses will spill into the oil market.

Shares of oil companies rose, as energy and materials were the best-performing sectors of the S&P 500. Occidental Petroleum rose 1.6%, while Marathon Oil gained 1.3%.

Miner Freeport-McMoRan surged 5.7%, making it the best-performing stock in the S&P 500, lifted by gains in the price of copper.

U.S. bond markets were closed for a federal holiday.

Bitcoin added to recent gains, rising more than 6% from its Friday 5 p.m. ET level to $57,427.40. Speculation has been mounting that the Securities and Exchange Commission will approve a bitcoin futures exchange-traded fund in coming weeks, which could increase the number of firms able to gain exposure to the cryptocurrency. 

Overseas, the pan-continental Stoxx Europe 600 slipped 0.1%, with losses led by the travel and leisure sector. The U.K’s FTSE 100 gained 0.5%, led by gains in energy and mining companies. 

Stocks in Asia were mixed. Hong Kong’s Hang Seng climbed about 2%, while Japan’s Nikkei 225 index added 1.6%. In mainland China, the benchmark Shanghai Composite was roughly flat.

Alexander Osipovich contributed to this article.

Shares of oil companies rose, as energy and materials were the best-performing sectors of the S&P 500.

Photo: Justin Sullivan/Getty Images

Write to Caitlin Ostroff at caitlin.ostroff@wsj.com