The intensifying trade war between the U.S. and China has roiled stock markets this week and sparked concerns about the global economy — but there’s a silver lining to these tariffs for Canada, economists suggest.

In a new report, National Bank Financial (NBF) notes that Canada may actually benefit from the trade war between the U.S. and China due to “trade diversion” effects.

“A 1% reciprocal tariff increase between those two economies makes Canadian goods relatively more competitive, with the resulting increase in exports lifting Canada’s real value added by about 0.8%,” it says.

That said, there’s a limit to trade diversion effects, NBF notes, adding that, at some point, global trade volumes and GDP will be hurt by the tariff increases.

“The resulting hit to commodity prices and negative spillovers on the U.S. economy won’t be good for Canada,” it says.

“In other words, the U.S.-China trade war can only be beneficial to Canada if it doesn’t escalate beyond a certain point,” it concludes.

Indeed, the bigger cost of the trade war may actually be on confidence, suggests CIBC World Markets. It notes that the actual GDP impact for the U.S. is relatively small. “The real costs of a trade war… are all in our heads,” it says.

“Just eyeballing the S&P 500’s response to the headlines, in investors’ eyes, and likely CEOs’ as well, the uncertainties and adjustment costs inherent in trade disruptions are no small matter for confidence,” it says. “With global growth already decelerating last year, it would take less of an additional shock to put the whole expansion at risk.”

Given the risk to confidence, and to equity markets, CIBC says that it doesn’t expect the trade war to last too long.

“The tumble in equity markets wasn’t much fun for investors. But if its message gets into the heads of the two leaders who need to sign on to a compromise, it could prove to be short term pain for longer term gain,” it says.