With U.S. hydrocarbon production continuing to test multidecade highs, there are numerous ways for investors to profit. One way is by investing in the very companies that explore for and produce oil and natural gas -- generally the riskiest part of the business, but also the one with the highest potential returns.

Two companies that have been in my personal portfolio for some time now are Devon Energy (NYSE:DVN) and Chesapeake Energy (NYSE:CHK). Though their valuations have increased significantly since I purchased their shares, I believe both still have plenty of long-term upside. Let's take a closer look at which, if either, may belong in your portfolio.

Photo credit: Marathon Oil. 

Comparison of strategies
Devon and Chesapeake are very similar in one important respect. Both were originally very heavy into producing natural gas but, following the slump in natural gas prices after 2009, have aggressively transitioned toward producing oil and natural gas liquids, or NGLs, which are more profitable in the current commodity price environment.

This year, Chesapeake has allocated 80% of its capital budget toward drilling in liquids-rich areas, including the Eagle Ford shale of south Texas, the Mid-Continent region, the Utica shale in Ohio, and the Marcellus north. By contrast, the company is spending less than 15% of its capital budget on gas-rich zones such as the Haynesville, the Marcellus south, and the Barnett.

Similarly, Devon is also concentrating the vast majority of its $4.8 billion-to-$5.2 billion capital budget for the year on liquids-rich opportunities and, unlike Chesapeake, has completely curtailed dry gas drilling. The company plans to spend about $1.5 billion in the oil-rich Permian and $1.1 billion on its newly acquired assets in the oil-rich Eagle Ford, which are expected to drive 20% year-over-year growth in oil production.

New strategies driving much better performance
Thanks to Devon's new strategy, liquids now account for 44% of the company's total production, up from 39% a year ago. This improving production mix drove a 26% year-over-year jump in the company's fourth-quarter operating cash flow and a 15% increase in its cash margin per barrel of oil equivalent. As Devon targets 20% growth in oil production this year, cash flow and margins should continue to strengthen.

Chesapeake's new strategy is also paying off so far, with the company reporting a 32% year-over-year jump in crude oil production for the full year 2013, which helped boost the liquids share of companywide production to 25%, up from 20% in 2012, and drove an impressive 34% year-over-year increase in EBITDA and a 26% jump in operating cash flow. However, Chesapeake's near-term outlook isn't nearly as good as Devon's.

Largely because of sales of producing properties over the past year, Chesapeake expects to grow oil production by just 1%-5% this year and is guiding for full-year 2014 cash flow of $5.1 billion to $5.3 billion, the midpoint of which suggests only 5% year-over-year growth. On the plus side, however, capital expenditures are expected to fall to an estimated $5.4 billion this year, which should help reduce the company's funding gap and further alleviate concerns about its leverage.

Photo credit: LINN Energy LLC

Which is the better buy?
Both companies are targeting mainly liquids-rich opportunities in an effort to boost margins, EBITDAs, and cash flows. But while Chesapeake's near-term growth outlook is clouded by the sale of some $11 billion worth of assets over the past two years, Devon finds itself ideally positioned to grow liquids production at double-digit rates as it ramps up activity in the Permian and Eagle Ford.

Devon is also light-years ahead of Chesapeake from a balance sheet and liquidity perspective, with plenty of cash on hand to finance new acquisitions as it sees fit. As of year-end 2013, the company boasted more than $6 billion in cash and cash equivalents, with long-term debt of just under $8 billion, compared with Chesapeake's $0.9 billion in cash and equivalents and long-term debt of $12.9 billion.

Now for valuation -- arguably the most important determinant of a stock's future returns. By some measures, both companies look undervalued compared with their peer group. Chesapeake shares trade at around 12 times forward earnings, which I think is quite reasonable given the company's less-than-stellar growth prospects.

But on an enterprise value-to-EBITDA basis, the company looks somewhat undervalued, with an EV/EBITDA of around 5.8. This frequently used ratio is a useful method of valuing comparable oil and gas companies because it uses EBITDA as a proxy for cash flow and neutralizes the impact of the company's capital structure. Generally, the lower the ratio, the more undervalued the company. Most similarly sized independent E&Ps have EV/EBITDA ratios ranging from 6 to as high as 12.

Devon looks considerably more undervalued than Chesapeake on the basis of this metric, sporting an EV/EBITDA of around 4.7. It also trades at just around 11.5 times forward earnings, which I also think may be unwarrantedly low, given its strong liquids production growth outlook, and represents a meaningful discount to other Permian- and Eagle Ford-focused peers.

Investor takeaway
Overall, I think both Chesapeake and Devon present a compelling long-term risk-reward scenario, though Devon is certainly a safer bet given its robust balance sheet, more attractive oil/gas mix, and stronger outlook for liquids production and cash flow growth. I plan on holding on to my shares in both companies for as long as my investing thesis holds and may consider accumulating a larger position in Devon.

Arjun Sreekumar owns shares of Chesapeake Energy and Devon Energy. The Motley Fool owns shares of Devon Energy. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.