Surprising bears who thought the market was poised for a steep tumble, the S&P 500 has roared higher in 2023, climbing more than 12%. Naturally, many investors are ecstatic about the market's performance, but those who are eager to go shopping may find it difficult to find worthy stocks trading at reasonable prices.

Fortunately for budget-minded investors -- or even those who are contrarians -- energy stock Devon Energy (DVN 0.19%) and renewable energy specialist Enphase Energy (ENPH 3.80%) are two stocks that currently present great buying opportunities. Let's see why two fool.com contributors find them so compelling despite their recent declines. 

Devon Energy, a fixed dividend with upside exposure to the price of oil

Lee Samaha (Devon Energy): The company's overall dividend is highly likely to follow the direction of the price of oil, so the stock will suit investors looking for energy exposure. As such, if you aren't optimistic about the outlook for the price of oil, then read no further. However, if you like the outlook for oil and gas, Devon Energy, whose stock is down 25% so far this year and down 60% from its all-time high, is a worthy candidate to capture some upside from energy prices.

The company pays a fixed and variable dividend to investors. As with most businesses, Devon pays a dividend from its free cash flow (FCF); that's the fixed part, which equated to $0.20 in the last quarter. Management then calculates what's left of FCF after the fixed dividend is taken out and defines it as "excess free cash flow." Its stated policy is to pay up to 50% of the excess FCF in dividends. In the last quarter, management paid the total 50% allocation, resulting in a variable dividend of $0.29, making a total dividend of $0.49 for the quarter.

For reference, annualizing the $0.49 dividend results in $1.96, implying a 3.7% dividend yield. 

DVN Dividend Per Share (Quarterly) Chart

DVN Dividend Per Share (Quarterly) data by YCharts.

While the dividend is far from the $0.72 paid in the first quarter and previously, it reflects the dip in the price of oil and gas from the second quarter of 2022. You can see this in the decline in Devon Energy's total oil equivalent (per barrel of oil equivalent) price realized from $64.70 in last year's second quarter to $42 in the second quarter this year. 

Still, with gas prices having stabilized and oil back up above $85 a barrel, Devon Energy's outlook is improving. In addition, the company is ramping up oil production, sees "deflationary trends" in its costs continuing into 2024, and has brought forward capital spending to drive volume growth.

It all speaks to the possibility of the company increasing FCF and dividends next year -- something to look out for for income-seeking investors who like energy.

Scott Levine (Enphase Energy): After soaring to all-time highs at the end of 2022, shares of Enphase Energy have sunk 53% so far in 2023 to the chagrin of those who sought to power their portfolios with this leading solar stock. Although the stock's poor performance doesn't reflective some catastrophe that the company suffered, investors are concerned about the company's lack of revenue growth. Enphase reported a quarter-over-quarter decline in revenue from Q1 2023 to Q2 2023 -- unlike the sales growth it achieved during the same period in 2022 -- and it seems sales will continue to shrink in the third quarter. Management forecast Q3 2023 revenue of $550 million to $600 million. Should the company achieve the midpoint of this guidance, it will represent a quarter-over-quarter decline of 20%.

Enphase has grown its offerings considerably over the past years. While the company primarily focused on supplying microinverters to the residential solar market, it has transitioned to making its microinverter business just a part of a more comprehensive suite of products. Today, Enphase offers electric vehicle (EV) chargers, battery storage, and energy management solutions.

Emerging as a leader in its field, Enphase has consistently generated FCF for the past five years -- a noteworthy achievement considering the company's still in growth mode. And it's not as if the money it's printing is nominal. In 2022, FCF accounted for 30% of the company's sales, resulting in Enphase generating FCF of $3.80 per share.

With its ample cash generation, Enphase is open to extending its streak of acquisitions in pursuit of future growth. On the company's second-quarter 2023 conference call, CEO Badri Kothandaraman said the company is looking for potential acquisitions and it is in a good financial position to do so.

Which of these buys is best for you?

Representing different aspects of the energy industry, Devon Energy and Enphase Energy afford investors exposure to oil as well as renewable energy -- and both are valid options. For those interested in supplementing their passive income, Devon Energy is a strong consideration, while investors looking for a growth-oriented stock may choose to power their portfolios with Enphase.