On Wall Street, there is a bet that $100 oil is just the beginning.

Crude prices swung sharply and eclipsed $100 a barrel last week for the first time in about eight years after Russian airstrikes hit Ukraine and threatened to disrupt the movement of oil and other materials from the region.

The advance builds on a historic rebound for commodities...

On Wall Street, there is a bet that $100 oil is just the beginning.

Crude prices swung sharply and eclipsed $100 a barrel last week for the first time in about eight years after Russian airstrikes hit Ukraine and threatened to disrupt the movement of oil and other materials from the region.

The advance builds on a historic rebound for commodities following the onset of the Covid-19 pandemic two years ago—but also adds pressure on a global economy grappling with surging inflation.

Although the supply shock is expected to lead to an increase in gasoline prices at the pump, traders aren’t betting on a slowdown in demand and say they are positioning for the bull market in commodities to carry on.

Brent crude, the global gauge of oil prices, ended the week at $97.93 a barrel, bringing its climb over the past year to nearly 50%. U.S. crude settled at $91.59. Both gauges topped $100 on Thursday for the first time since 2014 before pulling back.

“The speed of the moves is actually what scares me the most,” said Rebecca Babin, senior energy trader at CIBC Private Wealth, U.S. She added she expects oil to soar if more punitive measures are imposed on Russian energy companies and banks.

Investors have put almost $3.5 billion into broad commodity funds such as the Invesco DB Commodity Index Tracking Fund this year, the largest such inflow to start a year since the funds proliferated in the last decade, FactSet data show. The funds have taken in more than $10 billion in the past 12 months.

Traders are also buying shares of energy producers to wager on higher prices, and increasing bullish bets on oil futures and options. Futures oblige the holder to buy an asset at a specific price on a future date, while options give the owner the right to do so but not the obligation.

Net bullish bets on oil by hedge funds and other speculative investors have climbed lately as well, according to the Commodity Futures Trading Commission. The ratio of bullish wagers to bearish ones recently hit 15-to-1, its highest point since last summer.

Some bullish traders were wagering on much higher prices well before Russia’s invasion, pointing to the world’s dwindling ability to increase production. Capacity has dropped in recent years with companies coming under pressure to limit spending and carbon emissions. A retreat from the industry by large financiers has further squeezed producers.

Bulls claim that those trends and dwindling inventories set up conditions for haywire price moves that could be exacerbated by a prolonged military conflict.

Russia is a key producer of wheat and potash, fueling bets that its Ukraine invasion and the response by other nations will push up food prices.

Photo: sergey pivovarov/Reuters

“It’s set up for prices to go crazy,” said Josh Young, chief investment officer at Houston-based Bison Interests. He has been betting on higher oil prices by buying shares of producers in the U.S. and Canada such as Journey Energy Inc.

Shares of energy companies have been the stock market’s best performers recently after years of lagging behind. The S&P 500 energy sector is up 23% so far this year. The broad index has fallen 8%.

Some investors like Mr. Young say oil could approach its 2008 record near $150 due to global supply limitations. Consulting firm Rystad Energy said oil could trade around $130 if the situation in Ukraine worsens, while JPMorgan Chase & Co. analysts said crude could hit $120.

SHARE YOUR THOUGHTS

How are you adjusting your portfolio to address the possible effects of Russian aggression? Join the conversation below.

Some of the most popular options bets for U.S. crude recently have been bullish calls tied to prices hitting $101 or $140 a barrel, according to data provider QuikStrike. Ahead of Thursday’s rally, traders for months had piled into options wagers linked to oil touching $100.

In another bullish signal, futures tied to oil that would be delivered sooner are now more expensive than prices linked to contracts that expire several months from now, a condition known as backwardation. It indicates traders expect markets to be undersupplied and encourages investment in commodities because traders who sell pricier near-term contracts before they expire and buy cheaper contracts tied to future months can profit.

Many traders turn to the oil market when they expect high inflation or a geopolitical crisis to pinch the economy, sometimes leading crude and stocks to trade in opposite directions. As traders dialed back bets on punitive sanctions and energy-supply disruptions late in the week, oil pared its gains and stocks rose.

The Biden administration has said it is considering releasing domestic strategic oil stockpiles to ease pressure on consumers at the pump. A U.S. return to the Iran nuclear deal and the removal of sanctions on Iran are other steps that would bring some oil back to the global market.

Investors are closely monitoring commodities because they represent a large swath of Russia’s global economic footprint. The country accounts for more than 10% of the world’s output of oil, natural gas and wheat. It is also a leading producer of potash—a key input into fertilizers that grow the world’s crops—as well as palladium and platinum, two metals that are vital for the catalytic converters that filter emissions in cars.

If severe shortages emerge, veteran traders warn that the price responses will be quick. Robert Yawger, executive director for energy futures at Mizuho Securities USA, said oil could hit $125 if the conflict worsens.

“It could get very panicky and very expensive,” he said.

Russia’s attack on Ukraine helped push the price of oil to over $100 a barrel for the first time since 2014. Here’s how rising oil costs could further boost inflation across the U.S. economy. Photo illustration: Todd Johnson The Wall Street Journal Interactive Edition

Write to Amrith Ramkumar at amrith.ramkumar@wsj.com