The storm clouds in the energy sector seem to be parting. Image source: DieselDemon via Flickr

Peter Lynch has been called an investing legend. That's what happens when you earn investors a 29.2% annual return over a 13-year period and trounce the market and your peers. One of the keys to his success was to buy cyclical companies after they'd been beaten down in a downturn and await the eventual cyclical recovery. 

The energy industry is clearly in a downturn right now. While it's clear that an upswing is imminent, there are signs that we're starting to scrape bottom. So, with Lynch as our guide and the energy industry as our target, here are three energy stocks that we think the famed investor might buy today if he were still managing his legendary mutual fund. 

Jason Hall: One of the things Lynch wrote about in the must-read One Up on Wall Street is how lucrative cyclical stocks can be -- if you follow the industry well enough to know the difference between buying on the low side of an industry downturn, so you can profit from the eventual recovery, versus catching the proverbial falling knife. It looks to me like National Oilwell Varco (NOV -1.03%) is getting close to that upswing.

Yes, oil prices are still way down, and onshore and offshore oil well development is expected to stay weak for the foreseeable future, and that's not necessarily great news for National Oilwell. But we're still talking about one of the most important suppliers for the oil and gas industry.

Frankly, it looks like NOV's stock is beaten down much more than may be warranted. The company's stock price and, more important, key valuation metrics like price to earnings and enterprise value to EBITDA are at or approaching levels we haven't seen since the 2008-2009 market collapse:

NOV Chart

NOV data by YCharts.

Don't get me wrong: I'm not calling the bottom here. But I am most definitely saying that National Oilwell is a great company that plays a critical role serving the oil and gas industry, and right now the market is heavily discounting the company's stock.

It may take a little time to play out, but I'm convinced that five years from now, National Oilwell Varco stock will have absolutely crushed the market. 

Matt DiLallo: Another oil-related stock in that same vein is Halliburton (HAL -0.26%). Once its merger with fellow oil-field service provider Baker Hughes closes, it will be toe-to-toe with Schlumberger as one of the the largest oil-field service companies in the world.

This is an industry where size matters, and Halliburton is getting bigger at the right point of the cycle. The company expects its merger with Baker Hughes to generate about $2 billion in cost savings, which will be critical to increasing margins during the downturn, while delivering really strong margin growth when conditions improve.

That catalyst aside, there are some signs on the horizon that conditions in the oil market are at least not going to get any worse. Halliburton President Jeff Miller painted the following picture on the company's second-quarter conference call:

So now that the rig count appears to be scraping along a bottom, what happens next? The exact timing's difficult to predict, but the previous cycles would point us to the following progression of how the story should play out as we move forward. First, activity stabilizing means the healing process can begin with respect to pricing and margins. This will then allow our input cost savings to catch up, and our efficiency programs and well solutions can begin driving margins up. Price improvement will then be a challenge until we see capacity tightening in the market. Therefore, any margin improvement will likely be the result of lowering our cost base.

In other words, we're closer to the bottom than the top, which is opening up the door for investors to buy a strong company that's getting stronger but at a lower point in the commodity price cycle. That's exactly the type of scenario Lynch would be looking for before snapping up shares in a company like Halliburton -- one that's poised to really benefit from the eventual uptick. 

Tyler Crowe: I think one of the mistakes so many of us make when trying to pick companies in a cyclical market is that we focus more on the idea of cheap instead of value. There are a ton of companies in the energy space that are cheap, but one company that I believe actually has a lot of value and would be fitting for a Lynch-type portfolio is Helmerich & Payne (HP -2.48%).

Helmerich & Payne operates in one of the less-talked-about sectors in the industry; it owns and leases land rigs to producers and oil services companies. However, the rigs that H&P owns are part of the reason that America's oil boom has been possible. The company has by far the largest fleet of AC-powered rigs that are capable of performing the work necessary for tapping shale wells.

Image source: Helmerich & Payne investor presentation.

What is even more encouraging about H&P's fleet is that the company has taken the necessary measures over the year to ensure that it doesn't have a large stock of older, less capable rigs on the market that drag on profitability. That fleet advantage has allowed it to generate a premium rate for its rigs as well as keep a higher percentage of its fleet utilized during the downturn.

Image source: Helmerich & Payne investor presentation.

On top of that, the company has been able to maintain a strong balance sheet that should allow it to survive this market downturn. It currently has more cash on hand than total debt outstanding, and it's still generating positive income and free cash flow today despite the major decline in rig activity in the U.S.

Shares of Helmerich & Payne aren't trading at some of the bargain-basement valuations that you can find with other rig companies or even the broader energy industry. But with shares pretty much trading on par with tangible book value and a dividend yield greater than 5.5%, there's a lot of value in a share of Helmerich & Payne today.