What if you could find an oil company that had amazing prospects for growth, and go back in time and buy it before those prospects became clear? I'd certainly jump at that chance.

That's exactly what investors can do right now with Apache (APA 0.68%). And it's why this stock may be the best bargain in the oil patch today. Here's what you need to know.

Pipelines leading to oil refinery at sunset.

Apache needs to invest in pipelines and other infrastructure to exploit its major Alpine High discovery. Image source: Getty Images.

Same old story, different ending

Apache isn't much different from many other upstream oil exploration and production companies like ConocoPhillips (COP 1.13%). It buys the mineral rights to patches of land -- or, in some cases, sea -- and extracts the oil and gas from those patches and sells it to make money. However, because of the costs and the lead time involved, fluctuations in the price of oil hit upstream companies harder and more quickly than their midstream or downstream peers. 

Indeed, since oil prices collapsed in 2014, Apache's stock has fallen along with Conoco's and everybody else's:

APA Chart

APA data by YCharts.

It's tough to pick out Apache's light blue line among all the other companies in this chart, except for one brief period: Starting in about September 2016 through the end of that year, Apache's price jumps higher than the rest before sliding back down again. 

The reason for the jump was Apache's announcement of a massive oil and gas find in the West Texas Permian Basin, on a land position the company had been quietly building up on the cheap. Now, when I say massive, I mean at least 3 billion barrels of oil and 75 trillion cubic feet of natural gas. And when I say, "cheap," I mean an average cost of just $1,300 per acre.

But it's not like another company can come in and replicate Apache's success. Here's why.

High-risk, high-reward

A lot of companies have holdings in the massive Permian Basin, a major oil and gas deposit in Western Texas and Southeastern New Mexico. ConocoPhillips, for example, owns 1 million acres there. 

Apache's big find, dubbed Alpine High, on the other hand, is located along the southwestern edge of the Basin. It's an area that most of the industry didn't think had much oil and gas potential. That's why Apache was able to buy up so much acreage so cheaply. For land in more attractive parts of the Basin, companies routinely pay $30,000 or more per acre -- more than 23 times what Apache paid for its Alpine High position.

And now that everybody knows what kind of deposits are located underneath Alpine High, you can bet that nobody's going to sell any nearby land for the kind of prices Apache paid. Of course, it was a huge gamble: If the industry had been right and Apache had been wrong, it would have ended up nearly $400 million poorer with little to show for it.

But Apache's big risk brought a big reward. A big reward that hasn't begun to pay off yet.

Why it's a bargain

According to one analyst from Stifel, Alpine High alone is worth about $18 per share of Apache, and the company paid less than $1 per share to buy the position. Apache believes it's worth even more, estimating at least 2,000 drilling locations with a present value range of $4 million to $20 million per well, worth a minimum of about $21 per share. 

But after the announcement in September 2016, the company's share price only rose from $51.67 to $59.05, less than $8 per share (although still a significant 14.2% gain). And since then, the stock has fallen back again, and is currently trading just above $50 a share. That's right: The stock is trading for less today with Alpine High factored in than it was before Alpine High was announced.

So, even if we say that the actual worth of Alpine High is less than Stifel's or the company's estimate, and is "just" $16/share to $17/share, that's still about one-third of the stock's current value. Which means that either Apache's stock was insanely overvalued (by about 50%) prior to the Alpine High announcement, or it's undervalued right now. The latter seems far more likely.

Worth the wait

The market has some valid reasons for undervaluing Apache's stock. For one thing, the company can't start exploiting Alpine High right away; it will require building up the region's infrastructure first. But Apache has indicated that it's willing to devote significant amounts of money and time to bring Alpine High online, even if that means selling off other assets to do so.

The market doesn't like that, because it means there will be a period of decreased production for the company after the other assets are sold but before Alpine High is fully operational. Apache is devoting $500 million, or 25% of its overall 2017 capital spend, to the project.

There's also the possibility that Apache has overestimated the amount of oil and gas at Alpine High, and that it's worth less than everyone assumes. That's certainly a risk, but one that comes with any energy producer.

Investor takeaway

Right now, investors have an opportunity to buy into Apache's Alpine High discovery at or near the pre-discovery price. Even though the oil and gas industry is on the rocks right now, such a move seems likely to reward patient investors.

Those looking for some reassurance might want to wait until after Apache announces Q1 2017 earnings in May, which will almost certainly include an update on Alpine High. However, that earnings report could also send the stock up...or further down. Either way, Apache is probably a buy.