The price of an ounce of gold, which has already smashed through one record after another, recently hit $2,000 — a milestone that experts say could reveal a lack of confidence in the soaring stock market.

“Gold has become the safe haven of choice,” said Matthew Miller, an equity analyst at CFRA Research with a focus on metals and mining. “A lot of the stock market gains this year have just assumed that everything is going to be fine. If that doesn’t happen, we think the stock market gains that happened are certainly at risk.”

Today’s economic and market conditions create a perfect storm for soaring gold prices.

“The market is not confident that we have witnessed the end of the coronavirus outbreak,” said Giles Coghlan, chief currency analyst at HYCM, a U.K.-based brokerage. “Stock markets may be making modest daily gains — but the chance of a second outbreak of cases, which seems to be increasingly likely, could result in these gains’ being lost.”

“There are a lot of skeptics out there looking at the stock market and saying there are a lot of cracks in the real economy.”

Historically, the biggest drawback of investing in gold is that it doesn’t pay dividends, like a stock, or interest, like a bond. “There is an opportunity cost of holding gold,” Miller said.

But the Federal Reserve’s open-ended pledge to hold interest rates near zero has thrown a wrench into the equation. With the return on the 10-year Treasury bond hovering right around one-half of 1 percent, more investors are concluding that the trade-off of forfeiting those paltry returns is worth the added perception of security.

“There is a big market sentiment impact in 2020,” Miller said. “There are a lot of skeptics out there looking at the stock market and saying there are a lot of cracks in the real economy. It’s a matter of what does the real economy look like when you take away all the stimulus that’s out there.”

President Donald Trump’s protectionist agenda has diminished America’s standing on the world stage, along with the perception of the U.S. dollar as a dependable safe haven. Even before the pandemic, the price of gold had been rising as more countries backed away from the U.S. dollar as the world’s de facto reserve currency.

“Gold is a competitor to the dollar as a safe haven in times of great risk, but possibly, at long last, the dollar is beginning to show some signs of vulnerability,” said Jeffrey Frankel, a professor of capital formation and growth at Harvard University’s Kennedy School of Government.

But that doesn’t mean you should be dumping the mutual funds in your 401(k) and loading up on gold, experts said.

“Even if you thought gold was a hedge against inflation or chaos, it’s an extremely volatile asset. It’s not like a bond,” said Bryan Routledge, an associate professor of finance at Carnegie Mellon University.

Frankel said, “Just because the price has been going up recently and just because it’s hit an all-time high is not a reason to buy it, because that’s not an indication it’s going to stay at that price.”

“Beware the temptation to jump on a bandwagon, because small investors are often the ones to lose.”

Ordinary Americans are most vulnerable to buying in at this point without a strategy, Frankel said. “Beware the temptation to jump on a bandwagon, because small investors are often the ones to lose, on average, by getting into a rally at the end,” he said.

Miller said, “Some of the best advice we can give investors is just stick to your strategy, especially if you have a long time horizon to retirement.”

Routledge said that it’s understandable that people want to try to protect their nest eggs but that the reality is that the pandemic has changed the equation in a fundamental way. “When you have risks that affect the whole macroeconomy, there’s nothing we can do to smooth out the fact that consumption and production are way down,” he said.

“People want to find some sort of insurance in a financial crisis and own a safe asset. But there just aren’t safe assets in a financial crisis,” he said.