Bullion's price has barely budged as stocks soared to record high after record high since mid-October and, with a month and a half to go, is on track to post its narrowest trading range of any year since 2005. Physical gold demand, meanwhile, hit an eight-year low in the third quarter.

But that masks solid underlying support from investors. While gold's price performance during this autumn's stock market boom has been underwhelming, they have not been bailing out of the metal.

"In theory, and in the past, when you have exceptional markets and low volatility, gold was much, much lower - but nobody's selling gold," Davis Hall, head of FX and precious metals at Indosuez Wealth Management, said.

"At some point, this stock market run is going to run into some profit-taking, for one reason or another," he said. "As a hedge, gold's definitely still the best viable alternative for high exposure to global equity positions."

Last time there was a strong retracement in equities, during the financial crisis of 2008, it precipitated a years-long rally in gold that took it to record highs near $2,000 an ounce, even after stocks started to recover.

Hedge funds and money managers have cut their net long positions in Comex gold futures in the past seven weeks, but after strong inflows in the third quarter, positioning remains elevated compared to the start of the year.

And while inflows into bullion-backed exchange-traded funds have been sparse this year -- helping to drive that eight-year low in gold demand in the last quarter -- there have been no significant outflows.

The past quarter's drop in physical demand sounds dramatic, particularly as gold is tipped to repeat that performance in the full year. However, for gold, this is less disastrous than it sounds.

Unlike most other commodities, physical demand is typically dictated by price, rather than the other way round. This is particularly true in huge Asian markets such as China and India, where investors buy for the long term and have an eye for a bargain.

Much more important for setting gold prices is investment appetite. There have been plenty of headwinds for that, not just in terms of rising stocks and a stronger dollar - which makes gold more expensive for holders of other currencies - but also the prospect of another rise in interest rates this year.

Federal Reserve interest rate policy has been the single biggest driver of gold investment over the last decade, with ultra-low rates in the wake of the financial crisis keeping the opportunity cost of holding non-yielding bullion at a minimum. Its subsequent decline through to early last year was largely a reflection of expectations that rates would start to normalise.

The Fed has indeed pressed ahead with rate hikes, but these have been relatively benign so far. With moderate Jerome Powell now tipped to take over from Janet Yellen as head of the U.S. central bank early next year, confidence in a continuation of that policy is growing.

"With Jerome Powell, Fed policy will remain relatively unchanged in the next quarter, and that will represent good news for gold," Arnaud du Plessis, portfolio manager at CPR Asset Management, said. "If (more hawkish candidate) John Taylor had been selected, the situation would definitely have been different."

Meanwhile there is plenty in the wider markets to support gold.

The flattening of the U.S. yield curve suggests that investors may be rotating out of nominally safer short-dated U.S. Treasuries and into riskier assets such as equities, Mitsubishi analyst Jonathan Butler said. This, he said, has traditionally been seen as an indicator of trouble ahead.

"It does seem like we have another canary in the coal mine here," he said. "Equities are making new all-time highs, the dollar's doing okay, but yields are signalling that something is not quite right in the fixed income market."

"There is still an element of support for gold to hedge some of the riskier equity trades."

(Reporting by Jan Harvey; Editing by Veronica Brown and Adrian Croft)

By Jan Harvey