Legendary investor John Templeton aptly summed up the wisdom of resisting the "group think" of Wall Street: "To buy when others are despondently selling and to sell when others are euphorically buying takes the greatest courage, but provides the greatest profit."

Which brings us to the most exciting contrarian play seen all year: Goldcorp (GG) . The mining company released third-quarter results before the market's opening bell on Thursday, and on the surface, it's terrible news. But here's the real story, and why you should buy this stock now, before the rest of the investment herd catches on.

Sporting a market cap of $11.7 billion, Goldcorp is the world's largest gold miner by market value. On Thursday, Goldcorp reported a third-quarter loss that missed Wall Street's estimates and made investors run for the hills. Despite an impressive 42% year-over-year jump in production, declining bullion prices over the quarter took their toll on the company's operating results.

The company's net loss expanded to $192 million, or 23 cents a share, from $44 million, or 5 cents a share, during the same quarter a year earlier.

Image placeholder title

GG data by YCharts

Goldcorp is now down more than 24% year to date, compared with a year-to-date drop of 2.74% for the SPDR Gold Trust (GLD) - Get Report and a gain of about 1% for the S&P 500.

Goldcorp looks like a dog to be avoided at all costs, right? As I'll soon explain, the situation is just the opposite.

Meanwhile, many popular but terrible stocks commonly held in retirement accounts are on the verge of collapse. If you own them, dump them now! Click here for the 29 stocks in this year's "Stock Market Hall of Shame."

Gold prices have now steadied at around $1,160 an ounce, an increase of 4% so far during the month of October. But many analysts are saying that the recent rally in gold will lose its shine, as the Federal Reserve gets ready to hike rates sometime in December or early 2016.

The textbook theory is that rising U.S. interest rates should dampen the price of gold because higher rates drive up the "opportunity cost" of holding nonyielding bullion, while boosting the dollar, in which it gold is priced. Consequently, Goldman Sachs currently sees the Midas metal falling 17% from current levels by year-end.

It's revealing that Vancouver, Canada-based Goldcorp hasn't let its ostensibly poor third-quarter results dissuade it from a strategy that emphasizes greater production at ever-lower costs, to position the miner for an eventual rise in gold prices.

Management on Thursday reaffirmed its 2015 forecast for production at the high end of between 3.3 million and 3.6 million ounces of gold, all-in sustaining costs of $850 to $900 an ounce and capital expenditures of $1.2 billion to $1.4 billion.

Fact is, it's not just the paranoia of Fed-bashing, "hard money" zealots who await the Apocalypse. Inflation really does pose a threat in 2016, even as Janet Yellen gets ready to take away the punch bowl.

TheStreet Recommends

After the yellow metal's brutal pounding in recent years, gold bugs are poised for vindication. New data suggest that the inflation beast is stirring from its long slumber, which means the classic inflation hedge of gold could be on the verge of a comeback.

To be sure, job creation is tepid, labor costs are low and energy prices remain in check -- all arguments against rampant inflation. But this argument ignores seven years of "easy money" and ultralow interest rates. The bill for this extraordinary worldwide stimulus is about to come due.

What's more, Chinese, Japanese and European central bankers indicated this week that they're on the verge of cutting rates and easing lending. At the same time, eurozone leaders are abandoning fiscal austerity in favor of new government spending to jump start their economies' sputtering growth.

Inflation pressures are now muted in the U.S., largely because of lower fuel costs, but depressed energy prices will inevitably rise as population growth and emerging-market development continue their upward trajectory over the long term.

Adding to international instability is the massive amount of private and pubic debt that's sloshing around the globe. The agonies of Greece, Puerto Rico and other profligate nations are probably only a taste of what's to come -- and that's bullish for gold.

And even though the global recovery isn't as strong as anyone would like, it is real and gaining traction. The time to purchase inflation hedges is now, before the rest of the investment crowd belatedly tries to get in on the action and pushes up their prices.

Gold is ready to regain its luster as investors embrace a commodity that's historically been a safe haven during times of rising inflation and geopolitical uncertainty.

As this aging bull market enters its seventh year, investors can expect at least moderate corrections in the global equity markets in the coming months. Overseas anxieties, notably over eurozone squabbling and the bursting of the Chinese stock market bubble, only make a global correction more likely.

Why do I prefer a gold miner rather than the bullion itself? During past inflationary environments, gold mining shares rose faster than the inflation rate. And the most promising gold miner now is Goldcorp.

Goldcorp enjoys many advantages over its smaller and more volatile rivals, such as Barrick Gold and Newmont Mining that include production growth combined with low cash costs, a strong balance sheet and operating jurisdictions that are politically safe.

The company's existing assets, combined with several expansion projects in the pipeline, lay the groundwork for substantial production growth for the rest of the decade.

Goldcorp currently boasts one of the lowest all-in production costs of any primary gold producer in the world. If gold rises this year, Goldcorp's low production costs would pay off in a big way. Management also has demonstrated its commitment to reinvesting profits for future growth.

As global turmoil and uncertainty show no sign of abating, Goldcorp makes an effective hedge to protect you on the downside, while also offering considerable opportunity for appreciation.

Meanwhile, when the long-awaited global correction finally hits, a wide range of weak stocks are certain to take a dive. Click here for the full list of stocks you should sell now.

John Persinos is editorial manager and investment analyst at Investing Daily. At the time of publication, the author held no positions in the stocks mentioned.