What happened

Shares of oil and gas producers Occidental Petroleum (OXY -1.59%) and Devon Energy (DVN -0.11%) and services provider Core Laboratories (CLB) were beating the market on Friday, up 5.5%, 4.1%, and 12.2%, respectively.

Like many economically sensitive stocks, oil and gas shares are benefiting from the market's overall reaction to Thursday's milder-than-expected inflation report. But oil stocks might be making particularly big moves, since large upcoming events could send oil prices higher again.

So what

Oil prices have fallen a good amount from their heights above $120 per barrel in June, but were on the rise again today, up nearly 3%. Certainly, Thursday's inflation report was encouraging, as October's Consumer Price Index (CPI) data came in lower than expected. That spurred hope that the Federal Reserve might not have to raise interest rates as fast or as far as thought. And if the Fed doesn't have to hike rates so high, that lessens the probability of it going too far and causing a recession.

In addition, China announced that it would be relaxing some of its harsher COVID-19 restrictions, which have periodically shut down large cities and curtailed movement. While the announced relaxation of COVID rules was only marginal -- including things like shorter quarantine times and more foreign flights -- these at least have the potential to increase demand above the low levels seen in China since COVID restrictions began last March.

With demand concerns now mollified -- at least for the past two days -- two upcoming supply-related events might push oil prices further. First, the Biden Administration recently ended the 1-million-barrel-per-day releases from the country's Strategic Petroleum Reserve, which it had initiated in the days following Vladimir Putin's invasion of Ukraine.

Second, on Dec. 5, new European sanctions on Russian oil will go into effect, potentially curtailing supply even further from that key global producer. On that date, Europe will ban imports from Russia by sea, which have been continuing, although in lower amounts, throughout the year.

Those regulations could also affect shipments even to non-European nations, according to RBC Capital Markets analyst Helima Croft.

Furthermore, the U.S. is finalizing plans with G7 members to put a price cap on Russian oil, essentially making a "buyers' cartel" that would keep Russian oil on the market, but at lower prices, to curtail the amount of money flowing to the country.

But Russia has vowed that it won't sell oil to any country that abides by the cap. Much will depend on how the final cap is worded, and if Russia really does refuse to sell oil at all to certain customers. A standoff would have the potential to further disrupt supply.

U.S.-based shale drillers like Occidental and Devon stand to gain from all of these developments, since U.S. producers will essentially reap the benefits of higher global prices, but don't face any constraints on their own drilling.

Meanwhile, if there is really a supply shock and prices go up, producers might finally have an incentive to do more exploration and development projects, which would benefit Core Labs. The company hasn't experienced the huge revenue and profit increases producers have, since producers have still generally kept their capital expenditures in check even as prices have risen.  

Now what

Given their geopolitical importance, oil-related stocks should make up some portion of any investor's portfolio, if for no other reason than for hedging against supply shocks. Oil stocks have not moved very much since June. But with these catalysts on the horizon, the stocks could be in for more gains should any or all of these supply shocks and demand increases come to pass.

Oil and gas prices are volatile, and probably wouldn't do very well in a bad recession. Still, the lack of investment in oil and gas exploration over the past decade, along with industry consolidation and more shareholder-friendly dividend policies, make these stocks attractive even beyond their hedging potential.