(Bloomberg) — Gold erased losses while oil rose as tight races in key battleground states in the U.S. election left investors scrambling to parse the shifting odds in a fraught battle for the presidency.Copper and gold sank earlier, as the unexpected closeness of the race sparked broad risk aversion and a flight to the safety of the dollar. After the dollar slipped heading into the U.S. opening, gold traded little changed and copper trimmed its decline. However, oil held gains, supported in part by a better-than-expected showing from President Donald Trump.Click here for our real-time news updates and analysisWith millions of ballots still to be counted, Trump falsely declared early Wednesday he had won re-election and said he would ask the Supreme Court to intervene. Earlier, Biden said he was “on track to win this election.” However, it looks likely that the final result may not be known for some time, as counting continues in several closely contested states.Delays to any conclusive result over the next few days should keep commodity-market volatility elevated as investors wait for more clarity, said Darius Tabatabai, head of trading at Arion Investment Management.“It’s just illiquidity breeding illiquidity and I really don’t think that will come back properly until the political situation is resolved,” he said. “It’s hard to take a long-term view on something that will grind on and on.”The stakes have never been higher in a presidential election, as whoever wins will have the monumental task of leading the U.S. in its fight against a virus that’s claimed more than 230,000 lives in the country and decimated the economy. On a global level, the next president will also play an integral role in shaping domestic as well as international efforts against climate change, the use of fossil fuels and the pace of energy transition.During his presidency, Trump took a hard-line stance against major oil producers Iran and Venezuela by means of crippling sanctions, tightening global supplies. His support for American shale producers helped the nation’s output rise to a record, adding more supplies to the global pool.A victory by Biden could pave the way for the roll-out of more fiscal stimulus that could lift equity and commodity markets — particularly gold, which benefits from a weaker dollar due to money printing — in the near term. It could also lead to stricter regulation of shale drillers and also signal a detente with Iran, which would unleash millions of barrels a day in fresh crude exports.A Trump win would be “bullish for oil, as OPEC+ can keep cutting without fear that Iranian oil supply will come back into the market any time soon,” said Bjarne Schieldrop, chief commodities analyst at SEB AB.See also: Crude Oil Looking to OPEC+ Move More Than Vote CountsIn the copper market, investors will be looking for clues on the likely path of trade relations between China and the U.S. over the next presidential term, according to Luke Sadrian, chief investment officer at Commodities World Capital LLP.“For copper specifically, the future relationship with China will be massively important,” he said by phone. “My advice would be to sit and wait to see who wins the election, and don’t try to get ahead of it, because everything is so diametrically opposed”For more articles like this, please visit us at bloomberg.comSubscribe now to stay ahead with the most trusted business news source.©2020 Bloomberg L.P.