President Donald Trump's threat to tear up the North American Free Trade Agreement is falling on deaf ears in Canadian markets.

Magna International Inc. and other Canadian companies that rely on trade with the U.S. and Mexico are rising even as Mr. Trump attacks the "worst trade deal ever made" and negotiators exchange barbs over "troublesome" U.S. demands to overhaul the pact. Canadian stocks are on the cusp of a record high, while the loonie has gained 6.4 per cent this year versus the U.S. dollar.

Investors are looking past the bluster of the stalled trade talks, betting that either a deal will get done, or that a collapse won't have the dramatic impact that some economists are predicting.

Story continues below advertisement

"Sensible minds will prevail," paving the way for a deal, Bharat Masrani, chief executive officer of Toronto-Dominion Bank, said in an interview. Toronto-Dominion is Canada's largest lender by assets, with more branches in the U.S. than in Canada.

A basket of stocks most likely to be affected by the death of NAFTA is up 31 per cent since Mr. Trump's election as U.S. president, and most are holding up well even after the trade rhetoric soared during the fourth round of talks that ended last week.

Car parts rally

Auto suppliers are considered one of the most at-risk sectors if NAFTA disintegrates, yet Martinrea International Inc. is up 70 per cent since the election, Linamar Corp. has gained 55 per cent and is close to a two-year high. Magna International has added 32 per cent, closing Oct. 20 at a two-year high. Ski-Doo maker BRP Inc., which has plants in Canada, the U.S. and Mexico, is up 59 per cent and both major Canadian railways have seen double-digit gains.

Of the Canadian companies that could be hit if Mr. Trump follows though on his threats, only dairy producer Saputo Inc. is down since the U.S. election. The Montreal-based company has been hurt by U.S. demands to dismantle Canada's dairy quotas and tariffs.

It's unlikely Nafta will be blown up because the U.S. would "instantly put itself at a disadvantage," said Brett House, deputy chief economist at Bank of Nova Scotia, Canada's third-biggest bank. Even if the trade deal was scrapped, the average tariff that the U.S. would charge outside of NAFTA would be about 3.5 per cent, while Canada's would be 4.3 per cent and Mexico's would be 7.1 per cent, meaning U.S. exporters would have to pay more than their Canadian and Mexican counterparts.

What's more, Canada and the U.S. may be able to fall back on a bilateral trade agreement that was in place before Mexico was added via the NAFTA deal 23 years ago. That would lessen the blow for Canadian companies in a post-Nafta world.

Story continues below advertisement

Investors in Canada and Mexico have been shrugging off "every tweak, every hiccup, every inflammatory outburst from Washington," Mr. House said. Most of Canada's export-oriented manufacturing sectors are operating at capacity and could divert their products to other markets if needed, he added.

Even if NAFTA fell apart, investors need only look at Canada's lumber stocks for reassurance that life goes on without free trade.

The U.S. slapped duties of as much as 31 per cent on softwood lumber imports from Canada this year in a move to protect its domestic industry. Shares of producers have surged to all-time highs since then as a shortage of timber, exacerbated by several devastating hurricanes in the southern U.S., boosted demand for Canadian wood even with the higher tariffs.

"There's such a shortage of supply of this stuff in the United States that the price can get pushed up by tariffs and it's not going to reduce the demand for Canadian goods at all," Mr. House said in an interview. "It just makes things tougher on American consumers."

Still, some analysts are warning that investors may be overly complacent about the potential for Canadian stocks to fall if Nafta is scrapped.

"We would expect both the currency and the Canadian equity market to sell off in such a scenario," Ian de Verteuil, head of portfolio strategy at Canadian Imperial Bank of Commerce, wrote in a recent note.