Oil and gas driller Apache Corporation (APA 0.56%) raked in the cash in its third quarter 2018, and it otherwise turned in a very solid quarter overall. However, it didn't quite see the big production gains it reported in the prior quarter. The stock market was clearly confused as to what to make of this, as shares bounced around wildly after the announcement.

Still, there were numerous tidbits of good news for investors in the announcement, among them the restarting of Apache's share repurchase program. Here's how the quarter shaped up for Apache.

Pipelines run past oil wells in a desert landscape

Shares of Apache Corporation, a top yielder in the oil and gas drilling industry, have underperformed the stock market in recent years. Image source: Getty Images.

The raw numbers

Metric Q3 2018 Q3 2017 % Change vs. Q3 2017 Q2 2018 % Change vs. Q2 2018
Adj. production 401,000 BOE/D* 354,000 BOE/D 13.3% 390,000 BOE/D 2.8%
Net earnings $81 million $63 million 28.6% $195 million (58.5%)
Operating cash flow $1.0 billion $554 million 82% $1.1 billion (9.1%)

BOE/D = Barrel of oil equivalent per day. Data source: Apache Corporation. 

The first thing you may notice is that these numbers (and percentages) are kind of all over the place. Both sequential and year-over-year production increases were modest, but year-over-year cash flow increased by more than 80%! Likewise, net earnings were up a decent amount year over year, but were down more than 50% sequentially.

In terms of net earnings, Apache took a a $75 million after-tax loss during the quarter as a result of a bond tender exercise. Without this and other special items, net earnings would have been $244 million, a significant increase on both a year-over-year and sequential basis. 

What happened at Apache this quarter

In short, higher oil prices happened (again), which drove the monster cash flow result for the company. Brent Crude prices -- which govern 70% of Apache's oil output -- began the quarter at nearly $80/barrel, briefly dipped below $70/barrel mid-quarter, and then surged again to finish the quarter above $85/barrel. That's what drove the strong cash flow.

Since Apache is one of the few oil drillers not to cut its dividend between 2014 and 2017 during the oil price slump -- resulting in a current best-in-class yield of 2.8% -- management decided to allocate some of that cash to share repurchases rather than a dividend increase. The company had an existing authorization to repurchase up to 7.8 million shares, and it used that authorization to buy 924,000 shares. In addition, the board approved a further repurchasing plan of up to 40 million shares. 

Operationally, it was pretty much business as usual, with a North Sea well coming online in the company's Callater field, additional seismic testing in the company's land concessions in Egypt, and more wells being drilled at Alpine High

What's next for Apache

CEO John J. Christmann IV is predicting big things for Apache in both Q4 2018 and 2019, despite some of the headwinds facing the company, such as the impact of tariffs on its capital infrastructure spending and potential shipping constraints from the Permian Basin as production explodes.

Christmann predicted a bump in production in the North Sea during Q4, reversing a multiyear trend of quarterly production declines. He also projected that Permian production, after seeing a relatively flat quarter, would resume its upward trend in Q4. This should result in production coming in at the high end of guidance for 2019 (and Apache has been pretty reliable about hitting its projections in recent quarters). These production increases are not expected to require additional capital expenditures; Christmann predicts flat capital spending in Q4 and in 2019. 

Also coming up in Q4, the company -- as previously announced -- will spin off its Permian midstream assets into a separate company called Altus Midstream Company. This is a smart move for Apache, which prefers to be a producer and not a pipeline operator. Future infrastructure improvements at Alpine High will be handled by Altus as opposed to Apache (which will no doubt help to keep capital expenditures low for the parent company). 

Investor takeaway

Although the quarterly results were still positive and the company's situation shows continual signs of improvement, the market is unlikely to reward Apache in the short term. However, this could represent an excellent buying opportunity for long-term investors, as its PE ratio was knocked down to about 16 after the recent market correction. Apache still looks poised to outperform in 2018 and 2019, and beyond.