Canada’s main stock index edged higher Wednesday as geopolitical anxiety sent investors searching for safety in gold and the energy sector rose as the price of oil ended an unprecedented slump.

The backdrop was a series of geopolitical news from fresh anxiety about the status of the USMCA trade deal, trade talks between the U.S. and China, Italy resubmitting its deficit budget, Brexit negotiations, the U.S. pledging to hold off on imposing auto tariffs and OPEC seemingly ready to cut oil production.

“On the equity markets today really we’ve seen a pop in volatility because there is a lot going on on the macro front and investors are really just driving for direction,” says Candice Bangsund, portfolio manager for Fiera Capital.

Meanwhile, U.S. technology stocks were again hit, driven by concerns about Apple Inc. that has spilled over into the rest of the tech space.

“So the Canadian market is holding up quite well and that’s because of the gold exposure. Gold is getting flight to safety flows today and that safe haven bid that’s bolstering the gold sector and of course the Canadian equity market,” she said in an interview.

The December gold contract was up US$8.70 at US$1,210.10 an ounce and the December copper contract was up US2.3¢ at US$2.71 a pound.

The S&P/TSX composite index closed up 1.34 points to 15,133.12.

The key energy and materials sectors led while health care lost 5% on a big drop by Canopy Growth Corp. after it missed expectations and lost $330.6 million in the third quarter.

Energy did well after oil prices rose for the first time in 13 trading sessions, the longest consecutive days of losses on record.

The Organization of Petroleum Exporting Countries initially warned Wednesday that its global demand outlook for 2019 was deteriorating faster than expected. But later in the day oil prices surged on speculation that OPEC and its allies were going to cut production by more than expected at 1.4 million barrels per day.

That came after Saudi Arabia suggested last weekend that OPEC could increase production at its meeting next month in Vienna, prompting a reaction from U.S. President Donald Trump who tweeted that he hopes that doesn’t happen.

“Today we’re finally seeing rumours that the cut to production could actually be more than what the market was anticipating so that’s been what’s driving prices,” said Bangsund.

The December crude contract was up US56¢ at US$56.25 per barrel and the December natural gas contract was up US73.6¢ at US$4.84 per mmBTU.

Bangsund said she’s bullish on crude, forecasting West Texas Intermediate will reach US$70 to US$75 and that global demand will remain strong. She said the selloff was overdone, presenting a buying opportunity that contributed to the price increase.

“You could see oil sort of bounce around here but longer term we’re still bullish on crude prices and with that OPEC support I think that’s going to place the floor under prices and if anything it’ll improve the supply-demand balance in the marketplace and help to boost prices.”

In New York, the Dow Jones industrial average lost 205.99 points to 25,080.50. The S&P 500 index was down 20.60 points to 2,701.58, while the Nasdaq composite was down 64.48 points to 7,136.39.

The Canadian dollar traded at an average of US75.56¢ compared with an average of US75.52¢ on Tuesday.