Energy stocks have had an up and down year, mainly due to the continued volatility in oil and gas prices. Overall, the average energy stock is only up marginally this year, given the roughly 4% rise in the Energy Select Sector SPDR ETF. That index has vastly underperformed the red-hot S&P 500, which is up more than 25% year to date.

Because of that relative underperformance, several energy stocks look like compelling bargain buys right now since they're thriving in the current market environment. The three top options are oil giant ConocoPhillips (COP -0.44%), MLP Enterprise Products Partners (EPD 0.90%), and utility Duke Energy (DUK -1.55%). Here's why this trio stands out.

A pipeline and an oil pump at sunset.

Image source: Getty Images.

A $50-billion payday awaits

ConocoPhillips has vastly underperformed the market this year, slumping almost 5% overall. That decline makes absolutely no sense, given the oil producer's strong performance so far this year. The highlight is its free cash flow, with produced $4 billion through the third quarter, nearly all of which was returned to investors via its 3%-yielding dividend and share buybacks.

The company expects to continue generating a gusher of cash over the next decade. Using $50 oil as its baseline, ConocoPhillips can produce $50 billion in free cash over the next 10 years. It aims to use about $20 billion of that money to continue growing its dividend, with the other $30 billion going toward additional share repurchases. To put that into perspective, the company could retire nearly half of its outstanding shares, given the current stock price.

Meanwhile, there's ample upside to that plan, especially since crude is currently over $58 a barrel. Further, the company also has plenty of cushion on the downside, thanks to its massive cash position. That makes ConocoPhillips a low-risk, high-upside way for long-term investors to gain exposure to the oil market.

The best in the business keeps getting better

Enterprise Products Partners has also fallen well short of the S&P 500 this year. Overall, its unit price has only risen about 6% this year, though after adding in its 6.8%-yielding distribution, the total return is nearly 13%. Still, that doesn't come close to fully reflecting the company's strong performance this year.

The midstream giant has generated nearly $5 billion in cash flow through the third quarter, which is up about 14% year over year. That has been enough money to cover its high-yielding payout by an uber comfortable 1.7 times, giving it lots of excess cash to continue investing in growth projects.

At the moment, Enterprise Products Partners has about $9.1 billion of expansions under construction, which should enable it to continue growing both its cash flow and distribution for many more years. Adding to its upside potential is its increasingly attractive valuation. Top all that off with its best-in-class balance sheet, and Enterprise Products Partners' low-risk upside makes it an excellent stock for income-focused investors to buy these days.

An electricity transmission pylon in the evening.

Image source: Getty Images.

Tracking ahead of its plan

Duke Energy has also underwhelmed this year. Overall, the utility's stock price is up about 3%, with its total return closer to 7% after adding in its 4.3%-yielding dividend. That rather lackluster relative performance comes even though the company has grown its earnings per share by 7% so far this year, enabling it to boost its full-year guidance.

Duke's solid financial results this year also kept it on track with its long-term growth plan, which would see it grow its earnings by 4% to 6% annually through at least 2023. Add that to its high-yielding dividend, and the utility could generate total annual returns in the 8% to 10% range, which would be enough to outperform the market in a more typical year. That solid return potential from a low-risk utility makes Duke a great buy right now, especially in light of its relative underperformance this year.

Ideal energy stocks for the long haul

ConocoPhillips, Enterprise Products Partners, and Duke Energy have all underperformed this year despite turning in strong numbers. Because of that, they trade at more attractive values, especially when factoring in their above-average income streams and healthy growth prospects. That combination of factors potentially sets each one up to outperform over the long term, making them top buys in the energy sector right now.