What happened

Oil and gas prices are moving higher today. The U.S. benchmark oil price, WTI, is up more than 2% to nearly $58 a barrel, while natural gas rallied more than 3% to around $2.50 per MMBtu.

Those higher prices are helping fuel big gains in energy stocks. Leading the way are Chesapeake Energy (OTC:CHKA.Q), Denbury Resources (NYSE:DNR), Southwestern Energy (NYSE:SWN), Range Resources (NYSE:RRC), and California Resources (OTC:CRC), which were all up by at least 10% by 2:30 p.m. EDT on Monday.

So what

Energy prices are moving higher thanks to comments by Saudi Arabia's newly chosen energy minister, Prince Abdulaziz bin Salman. He confirmed that the country wouldn't radically change its oil policy, which currently has OPEC curtailing its production by 1.2 million barrels per day. Those comments eased the market's concerns that the country might change course and start pumping more oil into an already saturated market.

An oil pump at dusk with rows of clouds in the sky.

Image source: Getty Images.

Meanwhile, the oil market got some positive news out of China. The country reported a 3% rise in its oil imports in July, which pushed the total up 10% so far this year. This data suggests China's economy might not be slowing down as much as feared. That's good news for the oil market, since it's a major driver of demand growth.

With oil prices rallying, it's pumping up the stock prices of companies focused on the sector. Most of the biggest gains are coming from financially weaker producers. Companies like Chesapeake Energy, California Resources, and Denbury Resources have a mountain of debt that they're trying to address, which becomes much easier at higher oil prices.

In Denbury's case, for example, every $5 change in the price of oil over the course the year will affect its cash flow by $100 million. As such, higher sustained oil prices would give it a bit more money to chip away at its $2.5 billion in debt. Chesapeake Energy and California Resources are in a similar boat, as they can pay their debt down even more quickly at higher oil prices. Both have leverage ratios at or above 4 times their debt-to-EBITDA, which is double the comfort zone of their oil-producing peers.

Financially weaker natural gas-focused producers like Range Resources and Southwestern Energy are also making big moves today thanks to the uptick in gas prices. While they have slightly better balance sheets than those oil-focused peers, slumping gas prices this year resulting from an abundance of supply has put a lot of pressure on their financial profiles and stock prices. With gas moving higher today, it's helping relieve some of that pressure.

Now what

While oil and gas prices are moving higher today, they've been all over the map this year. That's because energy companies continue drilling more wells even though the market doesn't need the supply, since demand growth seems to be slowing down. While those demand growth worries are fading a bit today, they could come back if the data shows that's it's slowing. If that happens, these financially weaker oil and gas stocks will probably give back today's gains, and then some. That's why investors should avoid these companies and consider investing in stronger ones instead.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.