(Bloomberg) -- It’s an accepted investing axiom that if you want to know what’s happening with energy stocks, check oil prices. That is, until now.

Since the start of the third quarter, West Texas Intermediate crude is down 15% from roughly $106 a barrel to around $90. Just last week it sank to almost $80. Meanwhile, the S&P 500 Energy Index has gone in the opposite direction, gaining 15% over that span, led by 32% surges by Devon Energy Corp. and ConocoPhillips. 

For the year, WTI is up 16% while the S&P energy index has surged 44%, making it by far the best performing sector in the stock market. 

So what gives with this divergence? Well, for the first time in a long time, it isn’t just about oil for energy stocks.

Gas Boom

“We’ve been struck by the resiliency from energy stocks, despite the weakness from crude,” Strategas Securities LLC partner and head of technical analysis Christopher Verrone wrote in a Tuesday note. Energy stocks’ ability to “disassociate from oil” shows investors see structural tailwinds outweighing “cyclical headwinds,” he wrote.

The tailwinds include bumper earnings reports for energy companies and skyrocketing natural gas prices as Russia threatens European countries with supply disruptions with the war in Ukraine continuing. Henry Hub natural gas prices surged another 6.6% on Wednesday and are up 63% in the third quarter despite limited LNG cargoes from the US as a result of a fire at the Freeport export terminal.

“The names that have done the best in that third quarter period are names that are exclusively tied to natural gas, like EQT,” Bloomberg Intelligence analyst Vincent Piazza said by phone. 

Indeed, Comstock Resources Inc., which derives 91% of its revenues from natural gas, has soared 66% in the third quarter and is the top performing stock in the SPDR S&P Oil & Gas Exploration & Production ETF, which is up 20% so far this quarter. Other notable gainers include W&T Offshore Inc., up 60%, and gas-focused EQT Corp., which has gained 45%.

Dividends and Buybacks

Beyond natural gas, record second-quarter earnings in the middle of July led to super-sized and special dividends and share buybacks that helped propel the stocks. At the same time, companies resisted the urge to ramp up spending even when oil topped $110 -- setting the sector up to perform well when the price retreated.

In the past, oil and gas companies would outspend their cash flows to grow, but now they are focused on returning cash to shareholders, according to Siebert Williams Shank analyst Gabriele Sorbara said. “You can see how cheap these stocks are,” he said. “Some of them are trading at 8% or 9% dividend yields.”

Indeed, Cardinal Energy Ltd. jumped as much as 7.3% Tuesday even as other energy stocks tumbled because it hiked its monthly dividend 20%. 

The earnings bonanza in July also drove a new wave of buyers into the stocks. 

“Quant funds look very hard at your last quarter’s earnings and your last quarter’s cash flows and they use that as a key determinant of what things are worth,” MKM Partners analyst Leo Mariani said by phone. “All of the quant funds out there revalued these energy firms higher.”

As a result, investors remain confident in the stocks even as oil prices keep declining.

“We don’t need higher oil prices for energy stocks to outperform,” Canoe Financial partner and senior portfolio manager Rafi Tahmazian wrote in a note to clients this week. The industry “is extremely profitable at today’s commodity prices.”

©2022 Bloomberg L.P.