TORONTO -- Canada's main stock index avoided slipping into the red Tuesday as the price of gold hit a seven-year high.

The precious metal moved above US$1,600 an ounce for the first time since March 2013.

The movement is likely a safety trade, says Dominique Barker, portfolio manager at CIBC Asset Management.

"The macro environment is not great and seems to be risky and so to me it makes sense," she said in an interview. "You've got gold up, you've got the 10-year treasuries also pricing in some risk and yet the equity markets continue to be resilient which doesn't' seem to compute with those other signals."

The materials sector gained nearly 2.1 per cent on the day, led by a 10.5 per cent increase by Eldorado Gold, followed by several other producers.

The April gold contract was up US$17.20 at US$1,603.60 an ounce and the March copper contract was up 0.45 of a cent at US$2.60 a pound.

Energy was up slightly even though the April crude contract was down three cents at US$52.29 per barrel while the March natural gas contract was up 14.4 cents at US$1.98 per mmBTU.

Gold's performance helped to offset decreases by several industrial companies, led by Bombardier Inc. The transportation manufacturer's shares plunged 9.7 per cent in the first day of trading after it announced a deal to sell its railway division to France's Alstom.

Investors are satisfied with the price, said Barker.

"But now the recognition is that we're left with the biz jet segment which is more cyclical and therefore it means that it's riskier and therefore we're seeing some volatility in the share price."

Air Canada's shares slipped 2.6 per cent after the airline said it was bracing for a rough first quarter as the effects of the novel coronavirus and the continued grounding of its fleet of Boeing 737 Max jets bite into sales.

Its weaker outlook came as the Montreal-based company reported fourth-quarter results that came up short of analyst predictions. Profits of $152 million or 56 cents per diluted share fell 57 per cent below expectations, according to financial markets data firm Refinitiv. They compared favourably, however, with a net loss of $360 million or $1.33 per diluted share in the fourth quarter of 2018.

Canada's two railways were also lower on the day.

Consumer discretionary decreased as shares of Spin Master Inc. dropped 5.3 per cent following the announced departures of two senior executives and Dollarama slipped 4.6 per cent after the discount retailer launched a U.S. commercial paper program to issue up to US$500 million.

The S&P/TSX composite index closed up 9.98 points at 17,858.34.

In New York, the Dow Jones industrial average was down 165.89 points at 29,232.19. The S&P 500 index was down 9.87 points at 3,370.29, while the Nasdaq composite was up 1.56 points at 9,732.74.

The Canadian dollar traded for 75.43 cents US compared with an average of 75.48 cents US on Friday.

The Dow was driven down by a 1.8 per cent decrease in Apple Inc. shares after it said the coronavirus means its revenue will fall short of previous forecasts in the fiscal second quarter because production has been curtailed and consumer demand for iPhones has slowed in China.

"Personally I'm surprised by the market's resilience to just take in bad news because I see things as being pretty risky at the moment and I'm surprised by how resilient the market continues to be under this macro environment," said Barker.