What happened

Shares of major oil and gas companies such as Chevron (CVX 1.04%), Occidental Petroleum (OXY 0.82%), and rig services company Transocean (RIG -0.69%) were falling today, down 3.7%, 8.9%, and 5.6%, respectively, as of 2:40 p.m. EDT.

There wasn't a single clear reason for today's sell-off in the sector; it's likely due to a combination of factors. Last night's midterm elections were predicted to usher in a Republican Congress, and Republicans are thought to be friendlier than Democrats toward fossil fuels. However, Republicans have generally underperformed in the elections, with both houses of Congress still up for grabs as of this writing.

Moreover, stocks and oil prices were generally lower today, perhaps reflecting nervousness around tomorrow's inflation report.

Finally, Occidental reported third-quarter earnings yesterday, delivering mixed results and showing an uptick in capital expenditures, which could be making investors nervous about free cash flow in the year ahead.

So what

On the regulatory front, oil stocks might be selling off due to the recent threat of a windfall profits tax on oil companies from the Biden administration. The administration has repeatedly asked major oil companies to increase their drilling to boost supply amid high gas prices following Russia's invasion of Ukraine, most recently offering to buy oil for the Strategic Petroleum Reserve should prices fall to $70 or below if increased supply leads to lower prices. However, the administration hasn't gotten much cooperation from major oil companies on that front.

After being turned down by oil executives, the administration threatened to impose a windfall profits tax on oil companies, which would raise taxes on "excess" profits these companies are currently generating instead of letting them invest those profits in more drilling.

That new tax was definitely a nonstarter in a Republican-controlled Congress. In fact, a windfall profits tax would probably have trouble passing even if the Democrats maintain a slim majority. Still, with oil stock prices having risen strongly over the past month, it's no surprise to see a round of profit-taking amid today's unexpected uncertainty regarding Congressional control.

Occidental Petroleum also reported its third-quarter earnings yesterday afternoon. Revenue was up 39%, beating expectations, but adjusted (non-GAAP) earnings per share of $2.44 missed expectations by a penny.

It seems a bit strange that those results are causing Occidental to sell off much more than the typical oil stock today. However, scanning through its report, one thing that stood out was a notable uptick in capital expenditures last quarter compared to prior quarters, a trend we have seen amid shale drillers this earnings season. That could be causing some investors to think free cash flows might come under pressure as high-production wells go into decline and shale companies have to drill in new locations, often at higher costs due to inflation.

Now what

The energy sector is in a very uncertain place these days, as supply shortages are potentially running into an economic slowdown or even a recession, which would hurt demand. Moreover, some drillers are seeing an uptick in capital expenditures that could signal increased drilling or just inflationary pressures on equipment and labor.

In either case, it looks as if oil and gas companies are still quite profitable, but investors could be wondering if they will be slightly less profitable in the year ahead. And of course, recessionary and regulatory concerns remain wild cards. So the potential for both supply and demand shocks remains.

Investors should probably look to keep oil and gas stocks as a fixed percentage of their portfolios, as supply shocks could affect the broader economy in a big way. However, the sector remains volatile, so taking an unemotional, numbers-based approach -- selling on big upticks, adding on downturns, and sticking to that allocation plan -- might be the best course of action.