North American stock indexes capped of the week on a flat note amid heightened North Korea-U.S. tensions, as the loonie strengthened against a weakening greenback.

Rallying gold and materials stocks weren’t enough to lift Toronto’s S&P/TSX composite index out of the red, which dropped 0.69 of a point to 15,454.23 in a largely broad-based decline.

Despite the TSX’s minor slip Friday, the commodity-heavy index has gained more than 280 points on the week.

“We had a decent run,” said Michael Currie, vice-president of TD Wealth Private Investment Advice. “We’ve got to take the positives out of the week.”

In New York, stock indexes finished the day uneven with little movement in either direction.

The Dow Jones industrial average gave back 9.64 points to 22,349.59, while the S&P 500 index edged up 1.62 points to 2,502.22 and the Nasdaq composite index added 4.23 points to 6,426.92.

The small trades on Wall Street suggested investors were shrugging off the latest wave of ramped-up tensions between the U.S. and North Korea, said Erik Davidson, chief investment officer for Wells Fargo Private Bank.

He also noted that the VIX, a measure of how much volatility investors expect in stocks, was little changed.

Geopolitical tensions ratcheted up after President Donald Trump authorized stiffer sanctions in response to North Korea’s nuclear weapons advances, drawing a furious response from Pyongyang. Trump expanded the Treasury Department’s ability to target anyone conducting significant trade in goods, services or technology with North Korea, and to ban them from interacting with the U.S. financial system.

North Korean leader Kim Jong Un retaliated by calling Trump “deranged” and saying he’ll “pay dearly” for his threats.

In currency markets, the Canadian dollar was trading at an average price of US81.19¢ , up 0.15 of a cent.

On the commodities front, the November crude contract added US11¢ at US$50.66 per barrel and the October natural gas contract was up US1¢ to US$2.96 per mmBTU.

The December gold contract advanced US$2.70 to US$1,297.50 an ounce and the December copper contract was up US1¢ at US$2.94 a pound.

With files from The Associated Press