Image source: Getty Images.

This has been a memorable year for investors. In April, investors were present for seven stock market events that hadn't occurred for at least a decade. This included the worst two-week stretch ever to begin the year for all three major indexes, followed by the biggest intra-quarter rally since 1933 for the S&P 500. We also witnessed West Texas Intermediate oil and natural gas hit 12- and 17-year lows earlier in the year. 

But one of the biggest surprises this year has been gold's resurgence. After a multi-year downtrend, the lustrous yellow metal posted its best quarter in 30 years during Q1. For the year, spot gold prices have surged by more than $280 an ounce to $1,341 as of Friday's closing value.

Last week, investors witnessed yet another first. The correlation between gold futures and the stock market hit its lowest level ever recorded at minus 0.63 -- and we're talking about more than 30 years of recordkeeping here. For reference, a reading of 1 would represent a perfect correlation, 0 would mean indifference, and -1 would imply perfect opposition. Historically, the average correlation is -0.06. Based on FactSet data going to back to 1984, the opposition in movements between gold and the stock market has never been stronger.

Despite this opposition, it's my strong belief that both gold and the stock market could do something we're not used to: They could both simultaneously rise and head to new all-time highs.

Image source: Getty Images.

Here's why gold and the stock market could both hit all-time highs

Gold is typically viewed as a safe-haven investment when uncertainty abounds or economic growth has slowed. It also tends to do well when the U.S. dollar is weakening. Conversely, stocks do well when the economy is running on all cylinders; and generally, when the economy is doing well, so is the U.S. dollar. The two investment theses would appear to be polar opposites, as the recent FactSet data implies.

However, there's a wildcard factor that could lead both gold and the stock market to head higher: near-record-low global yields.

Think about this for a moment: Investors are buying gold usually due to fear, uncertainty, or lack of a better investment opportunity. If there was a way to generate a near-guaranteed 5% yield through bonds, we'd likely see little interest in gold. However, the opportunity cost of forgoing government bonds in favor of gold is incredibly low at the moment. Buying U.S. Treasury bonds, U.K. Gilts, German Bunds, or Japanese government bonds, would lead to a return that would underperform the current rate of inflation, resulting in real money losses. Low opportunity costs caused by low yields should precipitate continued interest in the shiny yellow metal in the years to come.

While stock markets typically like rising interest rates, since it's a signal of a growing economy and the Fed's efforts to stave off inflation, low lending rates have given growth stocks a real chance to shine. Businesses have been able to hire at an exceptional rate, merger and acquisition activity in high-growth industries, like biotech, has soared, and it's all been fueled by cheap and available capital. As long as yields remain low, businesses will be enticed to borrow, which can lead to hiring, acquiring, and even improved shareholder yields via buybacks and dividends. This is a recipe for higher stock prices.

It's not often we see a strong correlation between gold and the stock market, as the historical data tends to suggest indifference, but the recipe is there for both to soar to new heights.

Image source: Getty Images.

The smartest way you can take advantage of gold's surging spot price

The most obvious way investors may consider taking advantage of gold's rising price is to buy the physical metal itself. Although gold is far less volatile than the companies that mine it, investors would probably generate far better returns by focusing on individual mining stocks or the ETFs of individual mining companies. By purchasing individual mining stocks or ETFs, you're able to take advantage of profit growth over time, the maneuvering of management, and the potential for shareholder yield via dividends and share buybacks, and, finally, you'll have more fundamental data with which to base your trading decisions off of.

So what are your best options? As we've seen previously, royalty and asset streaming companies are likely to be the smartest plays for precious-metal investors. Instead of dealing with the high costs of developing and maintaining mines, companies like Royal Gold (RGLD 0.25%) and Silver Wheaton (WPM 0.51%) forge long-term or life-of-mine contracts with mining companies. In exchange for a large amount of upfront cash that miners can use to develop a new mine or expand an existing mine, Royal Gold and Silver Wheaton wind up with production that costs these companies just a fraction of the current spot price. The difference between what these royalty companies pay and the current spot price for gold and/or silver leads to high margins with minimal overhead.

For example, Royal Gold just announced a 38% increase in fiscal fourth-quarter earnings less than two weeks ago, while generating record revenue of $94.1 million. The company's operating cash flow grew 12% year-over-year to $49.2 million as a result of paying around $400 an ounce for delivered gold. Similarly, Silver Wheaton announce cash operating margins of $12.72 per silver ounce and $866 per gold ounce during its Q2 report. Average cash costs were a mere $4.46 an ounce for silver and $401 for gold.

In short, an increase in the spot price of gold will have an immediately positive impact on the margins of both Royal Gold and Silver Wheaton, and as such could push the valuations of both companies substantially higher.