The entire oil industry has been punished by the stock market over the past few years, and oil and gas producers such as ConocoPhillips (COP -0.41%) have been hit even harder than integrated majors like ExxonMobil (XOM -0.09%)

But ConocoPhillips has been working overtime to right the ship, and its stock has been trending higher. Here are three charts to show where the company stands today.

Gas fracking rig at sunset

ConocoPhillips has sold off oil sands assets in Canada in hopes of outperforming in a troubled industry. Image source: Getty

The mix chart

In late March, Conoco announced it had sold many of its low-margin Canadian assets to Canadian oil and gas company Cenovus for $13.3 billion. It planned to use the proceeds to reduce its overall debt load to $20 billion and to double its share-repurchase authorization to $6 billion. 

Conoco followed up its Cenovus sale with the sale of its San Juan Basin assets for an additional $3 billion in mid-April. The two sales together favorably altered the company's overall assets:

Chart of ConocoPhillips' portfolio details

Image source: ConocoPhillips investor presentation. All figures presented on a pro forma basis as if transactions were completed on Jan. 1, 2017. Adjusted operating costs is a non-GAAP measure. 

The transactions, naturally, lowered the company's overall production from about 1.5 million barrels of oil equivalents per day to around 1.1 million to 1.2 million boe/d. It also lowers the amount of the company's reserves. But it's giving the company a more favorable product mix, as the company reduces the percentage of its bitumen production and ups its percentage of oil. 

Critically, though, the asset sales also allow the company to lower its adjusted operating costs from $6 billion to $5.3 billion. Lowering operating costs is crucial to being able to turn a profit in this era of low oil prices, but until Q2 2017, Conoco hadn't reported positive quarterly earnings since 2015. We can hope these changes mean that the positive quarterly earnings will continue and not be a one-time occurrence.

The returns chart

ConocoPhillips' stock has performed comparatively well over the past year, but that's primarily due to the big asset sale in March. The debt and operating cost reductions from the transactions are significant, not to mention the flexibility it allows the company in buying back shares. 

So let's look at a chart of Conoco's return on capital employed. This tells us how well Conoco's management is doing at deploying the company's (and its investors') cash effectively:

COP Return on Capital Employed (TTM) Chart

COP Return on Capital Employed (TTM) data by YCharts

Oh, how the mighty have fallen! Both Conoco's and Exxon's returns on capital employed have taken a big hit since oil prices peaked in 2014. However, Exxon has at least managed to keep its returns positive since then. Of course, Exxon has profitable downstream operations to fall back on while Conoco does not. Conoco struggled to do so in 2016 but seems to be on an uptrend. Still, its returns on capital on a trailing-12-month basis are negative, which should make investors wary.

The cost chart

An oil company's returns, though, are a function of oil price and production costs. Conoco claims its average cost of supply is now $35/barrel. You'd think that would yield spectacular returns, even with oil hovering around $50/barrel. But unfortunately, it doesn't give the whole picture; this chart does:

Chart of ConocoPhillips' costs and returns

"Burden" here represents capital infrastructure, foreign exchange, price inflation, and G&A. "Average Capital" is a five-year weighted average, adjusted for dispositions. Image source: ConocoPhillips June 1 Investor Presentation.

So there's a lot going on in this chart; let's break it down. The average cost of production is indeed $35/barrel (the brightly colored lines in the left-hand graph), but you need to add a $5-$15 burden -- cost adjustments including overhead (the dim lines in the left-hand graph) -- to get to the true cost of supply, which can be as high as about $50/barrel. 

The company estimates it will earn a 30% return with oil prices at $50/barrel, and at $60/barrel or even $65/barrel, the returns would be even higher (although the costs will increase correspondingly as shown in the right-hand graph). 

What the graph conveniently ignores, however, is the possibility that oil prices will drop. In June and July, for example, the average price of Brent Crude was below $50/barrel -- even hitting $45/barrel at one point. If oil were to drop to, say, $40/barrel, the company might be able to cut some costs a bit further, but like the limbo, there's a limit to how low one can go. 

Investor takeaway

Conoco has made some big strides in improving its operations. Notably, it finally posted positive quarterly earnings in Q2 2017. But it has struggled to earn a decent return on its capital for investors and still has a substantial debt load. And while its cost cutting moves have placed it in a much better financial position if oil prices increase, it's unclear how well the company will be able to manage itself if they don't. 

In short, things are looking up for ConocoPhillips, and investors convinced of an impending oil recovery may want to take this opportunity to buy the stock and take advantage of potential share buybacks. However, before declaring it a definite buy, I'd like to see at least a few consecutive quarters of positive net income to prove Q2 2017 isn't just a fluke.