Gold futures finished lower for Wednesday’s session, contributing a loss for the month as prices responded to a strengthening U.S. dollar that was been weighing on commodity prices.

The bullion, however, tallied an eighth straight quarterly gain, buoyed by haven demand for the precious metal.

“The stats show that it was a great quarter for the metals, but September was a lousy month,” said Brien Lundin, editor of Gold Newsletter, adding that a “small uptick in real interest rates” was the primary reason for the month’s loss for gold.

“Considering the blistering move gold had made earlier in the quarter to over $2,000 an ounce, and the fact that it had failed to build upon that rally, the minor rise in real rates was all that was needed to shake the weak hands out of the gold market and start a sell off,” he told MarketWatch.

On Wednesday, December gold
GCZ20,
+0.83%

retreated $7.70, or 0.4%, to settle at $1,895.50 an ounce. December silver
SIZ20,
+1.81%

lost 95 cents, or 3.9%, to end at $23.494 an ounce.

For the month, gold lost 4.2%, but advanced 5.2% over the three-month period ended in September, according to Dow Jones Market Data, tracking the most-active contract. Meanwhile, silver shed nearly 18% in September, but rallied by 26% for the quarter.

More recently, gold’s value has waxed and waned in lockstep with the dollar.

A resurgence in the greenback is viewed by commodity investors as making purchasing the yellow metal less compelling for overseas buyers and undercutting demand. The dollar was up 1.8% month to date, as measured by the ICE U.S. Dollar Index DXY.

The move for the dollar comes after an acrimonious presidential debate between President Donald Trump and former Vice President Joe Biden, as the race for the White House heats