Last year was the best of times and then the worst of times for the oil industry. Oil prices went from scorching hot -- touching a four-and-a-half-year high in early October -- to turning cold by year end, closing nearly 20% lower for the year. That sell-off in the oil market took most oil stocks down with it, as the S&P Oil & Gas Exploration and Production ETF (which holds nearly 70 oil stocks) slumped 28.6% in 2018.

However, last year's slump could lead to a big bounce back in 2019 if oil prices begin rebounding off their lows. While that rising tide would likely lift all boats, Noble Energy (NASDAQ:NBL), Devon Energy (NYSE:DVN), and Cimarex Energy (NYSE:XEC) could be among the best performers. Here's why.

An oil pump with a beautiful sunset in the background.

Image source: Getty Images.

Doing everything right

Noble Energy's stock sank 35.6% last year. That slump comes even though 2018 was a strong year for the oil and gas company. Production rose sharply through the third quarter, with its output in the U.S. up 18% year over year while its Israeli assets set sales records. Meanwhile, the company did a great job keeping a lid on costs, as capital expenses came in at the low end of its guidance range while operational costs were below expectations. Noble Energy also continued shoring up its balance sheet by closing $358 million in asset sales, which boosted its liquidity to $4.7 billion. That strong balance sheet, when combined with its cash flow, enabled Noble to continue paying its dividend while repurchasing $233 million in its stock.

Noble Energy's performance last year puts it in a solid position for 2019. The company's low-cost business has it set up to grow production at a 20% compound annual growth rate (CAGR) through 2020, while its cash flow could expand at a 35% CAGR assuming oil averages $50 a barrel, which is right around the current price. Moreover, Noble estimates that it can generate $1.5 billion in excess cash over that time frame, giving it even more money to repurchase its beaten-down stock. Those dual fuels of growing at a high rate while returning more cash to investors could enable Noble to produce high-octane returns in 2019 if it can just get a little nudge from higher oil prices.

A shrinking supply of stock

Shares of Devon Energy tanked last year, falling 45.6%. That plunge came even though the company made significant strides. One of the biggest has been on its balance sheet, where debt declined 40%, due in part to the sale of the company's midstream businesses for $3.125 billion. Those sales, when combined with some other noncore asset divestitures as well as the free cash flow generated by Devon's operations, put an extra $5 billion into its coffers last year.

Devon is currently using $4 billion of that money to buy back stock. It had already spent $2.7 billion through the third quarter of last year to retire 13% of its outstanding shares. It expects to complete its current program in early 2019, which could reduce its share count by more than 20%. Meanwhile, with more cash likely coming in the door during 2019, Devon could increase its buyback program, which could send shares higher this year, especially if oil prices improve.

The silhouette of an oil pump at dusk with clouds in the background.

Image source: Getty Images.

Reshuffling its portfolio to deliver better performance

Cimarex Energy was among the worst performers in its peer group; its stock plunged nearly 50% last year. That crash comes even though the company made several smart moves. Among the biggest were cashing in on some noncore assets that bolstered its balance sheet, which Cimarex then used to acquire rival Resolute Energy for $1.6 billion in cash and stock.

Resolute Energy's assets fit perfectly with Cimarex Energy's position in the Delaware Basin. Thanks to them, Cimarex can generate higher returns while reducing its costs, which should enable the combined company to produce higher earnings and cash flow during 2019 than Cimarex could have done as a stand-alone entity. Those stronger results, which would be even better if oil improves, could provide plenty of fuel for Cimarex Energy's stock to rebound this year.

Like a phoenix rising from the ashes

Last year was a tough one for oil investors, as the market went from euphoric buying to panic selling in a matter of weeks. That sell-off, however, could end up being a great buying opportunity in hindsight, because oil stocks that cratered in 2018 could be among this year's biggest gainers if oil prices bounce back. That's why investors might want to consider taking a contrarian approach and buying solid oil companies like Noble Energy, Devon, and Cimarex that are coming off a rough year, since they stand the best chance at bouncing back in 2019.

Check out the latest Noble Energy, Devon Energy, and Cimarex Energy earnings call transcripts.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.