The stock market has rallied this year. The S&P 500 is up more than 18%, while the tech-heavy Nasdaq 100 has surged over 35%.

However, not all stock market sectors have been in rally mode this year. Energy stocks have underperformed, with those in the S&P 500 falling by an average of 4%. Because of that, many energy stocks trade at a compelling discount. Devon Energy (DVN 0.19%) and NextEra Energy (NEE -1.36%) are among the many top energy stocks currently in the discount bin.

A bottom-of-the-barrel valuation

Shares of Devon Energy have shed about a quarter of their value this year. While oil prices are down, WTI, the primary U.S. oil benchmark price, has only fallen about 4% in 2023. Because of that, Devon looks like a bargain, given the cash it can produce in the coming year.

Devon Energy recently provided its preliminary guidance for 2024. The oil and gas company expects to produce $3.2 billion in free cash flow next year, a 20% increase from 2023 (assuming roughly flat oil prices at around the recent price of $80 per barrel).

Lower capital spending is the main factor driving Devon's improved free cash flow. The company set its capital budget at around $3.5 billion next year, a 10% reduction from 2023. Devon plans to drill enough wells to maintain its current production rate (rather than increase production) while also benefiting from service cost deflation.

That forecast has shares of Devon Energy trading at a bargain price.

A slide showing Devon Energy's valuation.

Image source: Devon Energy.

As that slide shows, Devon trades at around an 11% free cash flow yield based on the cash flow it can produce at an average oil price of $80 a barrel next year. That's more than double the free cash flow yields of the S&P 500 and Nasdaq, implying Devon's stock trades at a wide discount to the market.

That discounted share price drives Devon's plan to allocate more of its free cash flow toward share repurchases next year. The company had targeted paying up to 50% of its free cash flow in dividends (base plus variable). Instead, it will likely allocate less cash to variable dividends to repurchase more of its dirt cheap shares next year.

Growth on sale

Shares of NextEra Energy have lost nearly a third of their value this year. The main factor has been rising interest rates. Higher rates have weighed on the value of income-producing investments like utilities to push up their dividend yields to compensate investors for their higher risk profiles compared to bonds.

In addition, rising rates have made it more expensive to borrow money to fund expansion-related investments. That latter issue has hit NextEra's renewable energy affiliate, NextEra Energy Partners, hard. It forced that entity to slow its growth rate, since it doesn't have the financial flexibility to acquire additional assets from its parent.

However, NextEra Energy doesn't expect rising rates to affect its growth. The utility recently reaffirmed its long-term outlook, including its expectation that adjusted earnings per share will increase by 6% to 8% per year through 2026. Furthermore, NextEra noted that it would be disappointed if it didn't deliver earnings growth near the top end of its range.

The company's large backlog of renewable energy and utility projects powers its growth forecast. It also has lots of financial flexibility to fund those new investments, even without being able to drop down additional assets to NextEra Energy Partners.

The sell-off in NextEra Energy's shares has it trading at a discounted valuation compared to its peers.

A slide showing NextEra Energy's valuation compared to its peers'.

Image source: NextEra Energy.

As that slide shows, NextEra Energy trades at a price/earnings-to-growth (PEG) ratio of 2.0 times. That's a discount to its peers' 2.5 times PEG ratio. This discount is quite a reversal for NextEra Energy, which has historically traded at a significant premium to its peer group.

High-quality energy stocks at a discount

Devon Energy and NextEra Energy have underperformed the market by a wide margin this year. Because of that, they trade at a steep discount. That makes them attractive options for investors seeking bargains in today's market, where cheap stocks are getting harder to find.