What happened

Shares of the largest independent oil and gas exploration and production company (E&P) in the U.S., ConocoPhillips (NYSE:COP), rose 13.6% in 2018, according to data provided by S&P Global Market Intelligence. That handily beat the returns of the broader stock market; the S&P 500 fell 6.2% over the same time frame.

Conoco's performance was also head and shoulders above its industry's dismal returns, as measured by the SPDR Oil & Gas Exploration and Production ETF, which fell 28.6% for the year. All the other major U.S. E&Ps saw their stock prices fall by double digits during the year. Those declines ranged from Hess' relatively modest 14.7% drop to Devon Energy's 45.6% meltdown.

Oil wells in silhouette against a sunset.

The oil and gas industry was hit hard by falling prices in 2018. Image source: Getty Images.

So what

What the oil market gives, the oil market can take away again. That was the lesson of 2018 for E&Ps. The record-setting margins that some drillers enjoyed in the first three quarters as WTI Crude prices crept above $70/barrel and Brent Crude prices topped $80/barrel seemed likely to be decimated in Q4 as prices crashed. Brent Crude finished the year at just above $50/barrel, while WTI Crude was only a few nickels above $45/barrel. E&P shares followed suit.

Conoco wasn't immune to these price swings: In the first half of the year, its shares went up (like all of its E&P peers'), but in the second half of the year, its shares declined by far less (10.4%) than its nearest peer (EOG Resources, down 29.9%).

What set Conoco apart in the second half of the year? Well, bigger is often better, at least in the oil patch, and Conoco is huge. Its $76 billion market cap is much higher than its nearest peer EOG's $56 billion. Most U.S. E&Ps are in the $10 billion- to $25 billion-market-cap range. That size allowed it to purchase a broader portfolio of assets than its smaller peers. It also had more underperforming assets to sell. And it did a fantastic job of generating cash from those assets and asset sales, which it used to pay down debt and reward shareholders through buybacks and repurchases. Its blowout third quarter proved that it was a consistent driver of profitability. Those advantages helped it mitigate the losses its industry suffered in the back half of 2018.

Now what

2018 was a good year for ConocoPhillips' stock -- particularly in relation to its industry and the broader market. But that doesn't mean the company hasn't taken some lumps. Its stock is still down from where it was five years ago before the big oil price slump of 2014-2017 began. And, like I said, it lost value in Q4 2018 like everyone else.

But oil prices seem to have stabilized -- for now -- and Conoco has a solid plan to create value for its shareholders in 2019. If you're looking to invest in the oil and gas industry, now may be a good time to pick up some stock in this shareholder-friendly company at a discount.

John Bromels has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.