Anadarko Petroleum (NYSE:APC) was a disappointment to investors last year. It vastly underperformed the market, losing 23% of its value as the S&P 500 rallied 19%. This underperformance came despite a significant improvement in the company's financial situation and ability to operate at lower oil prices. That turnaround should be even more evident when the company reports fourth-quarter results in early February.

Those results, as well as what it might say about the future, could propel Anadarko's stock much higher next month, making it a compelling oil stock to consider buying before January ends.

An oil pump with the sun behind it.

Image source: Getty Images.

The turn the market seems to have missed

Anadarko Petroleum has been making it clear that better days lie ahead for the past several months. In late September, for example, the company announced plans to repurchase up to $2.5 billion of its stock, with the expectation that it would buy back $1 billion in shares by the end of 2017. Several factors fueled that program. First, thanks to asset sales, the company had built up a $6 billion war chest, with share repurchases being a "very attractive use of our cash given the value of our assets and the highly accretive nature of this program," according to CEO Al Walker. In fact, at the time the company could buy back as much as 10% of its outstanding shares with that authorization.

Another reason Anadarko felt comfortable spending that cash on share repurchases was because it had driven down costs and improved margins to such an extent that it could generate enough cash flow at $50 oil to fund a strong capital program. That was evident in November, when the company unveiled its plan for 2018, with it expecting to spend $4.2 billion to $4.6 billion on projects that would increase its oil output 14% this year. Furthermore, because Anadarko could finance that budget at $50 oil, it would generate significant free cash flow, with it on pace to produce more than $700 million this year given where oil and gas prices were at the time. They have only improved since then, which suggests the company could generate even more free cash flow this year.

A pipeline and an oil pump at sunset.

Image source: Getty Images.

February could be full of surprises

The significant improvement in oil prices over the past few months suggests that Anadarko could have good things to say when it reports earnings on Feb. 7. Currently, analysts only expect the company to earn an adjusted $0.03 per share. While that would be an improvement from the adjusted loss of $0.50 per share it reported in the third quarter, it seems very low. That's because not only were oil prices more than 30% higher by the end of the year, but the company's focus on growing margins would have boosted results even if oil didn't budge. On top of that, it expected to repurchase $1 billion of stock in the quarter, which could have reduced its share count by around 4%, providing a similar boost to earnings per share. Those factors suggest that the company could post expectation-crushing results.

In addition to that, Anadarko is on pace to generate significant excess cash this year, which it doesn't need since it can grow just fine at $50 a barrel. In fact, at $60 oil, the company can increase its oil production by a 10% to 14% annual clip through 2020 while generating $3 billion to $4 billion in excess cash. With plenty of money already sitting on its balance sheet and no need to accelerate its growth rate given that the oil market is already well supplied, it seems increasingly likely that Anadarko could announce an expansion of cash returns to investors when it reports results. For example, it could significantly boost its dividend, which currently yields a paltry 0.3% after it slashed it 81.5% in 2016 to conserve cash. In addition to that, the company could increase its share repurchase authorization as well as pay off additional debt. By unveiling what it plans to do with this excess cash, Anadarko could give investors a clear indication that it's focused on increasing the value of the company over growing for the sake of growth, which has been an industrywide problem in recent years.

Waiting for the wakeup call

While Anadarko struggled during the oil market downturn, it has not only turned itself around but also become a cash flow machine. That should become even more apparent when the company reports results next month. That said, the market has yet to grasp this potential, which is why shares trade for such a cheap price that Anadarko is on pace to buy back a meaningful amount of stock using just a portion of its cash. That's why now looks like a great time to buy this oil stock before the market wakes up to its potential.

Matthew DiLallo 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.