The turbulent stock market has thrilled gold investors.

The price of gold has gained more than 8% since the beginning of October. The S&P 500 has plunged 14% during the same time frame.

And investors who’ve bought gold mining stocks have done even better than those who just own the precious metal. Newmont, a gold miner whose stock is in the S&P 500, has soared more than 13% since October. And Barrick Gold, which merged with Randgold last year to create the world’s largest gold miner, is up nearly 20%.

Why is gold doing so well? Gold performs well when investors are nervous, as they clearly are right now.

Stocks have made a nice comeback in 2019 on reports of progress in US-China trade talks and recent hopes that the Federal Reserve may slow down its pace of rate hikes this year. But investors are still worried: The CNN Business Fear & Greed Index, a measure of market sentiment, has shown signs of Extreme Fear in the market for the past month.

“Fears over an economic slowdown and trade conflicts loom large. US stocks in December posted their worst month since February 2009, while perceived ‘safe havens’ such as gold, the Japanese yen and US government bonds garnered more interest,” said BlackRock global chief investment strategist Richard Turnill in a report this week.

The global political turmoil isn’t going away overnight either. And that also should be good for gold.

“In a world where the inward looking nationalist urge appears to be spreading globally, where not just the Fed, but the ECB (and others) have exploded their balance sheet and where global relationships … are being redrawn by the minute, perhaps there will be a place for gold in 2019,” wrote market analysts at research firm BTIG.

A new gold rush?

Investors put nearly $5 billion into gold and precious metal funds in the fourth quarter of last year — a time when the stock market was in freefall mode — according to data from EPFR Global, a firm that tracks mutual fund data.

By way of comparison, investors took out about $60 billion from US stock mutual funds during that time frame.

Recent interest rate hikes by the Federal Reserve helped fuel the gold rally, too. Investors flocked to gold due to worries that higher rates will eventually slow down the economy, even though the Fed is touting the hikes as a sign of the economy’s strength.

“The interest in gold is one of several signals that investors see the cost of higher US interest rates starting to outweigh any benefits,” analysts at EPFR Global wrote.

But what about those recent comments from Fed chair Jerome Powell? His remark last week that the Fed would likely be more “patient” with regards to future rate hikes helped fuel a monstrous stock market rally Friday.

If the Fed pauses with its rate increases and that stabilizes Wall Street, will that lead to a big pullback in gold? Not necessarily.

Long-term bond yields have been falling lately, noted Simona Gambarini, a markets economist with Capital Economics, in a report this week. The US 10-Year Treasury bond now has a yield of about 2.7% — down from a high of nearly 3.25% last October.

This sharp drop in long-term bond yields should be good for gold because conservative investors tend to favor fixed income assets over gold when they can expect a big payoff down the road from the interest on the bonds.

So if yields continue to fall, gold looks more attractive. Gold may also be a safer bet than the casino that is bitcoin and other cryptocurrencies.

Yes, gold is not something that any investor should go overboard with and make a big portion of their portfolio. But it might be a better investment than people think, including Warren Buffett, who famously referred to it as a cube that just sits there and does nothing.