TORONTO -- North American stock market indices finished Tuesday on a positive note after falling in morning trading amid heightened tensions between North Korea and the United States.
The Toronto Stock Exchange's S&P/TSX composite index advanced 30.67 points to 15,082.70.
In New York, the Dow Jones industrial average gained 56.97 points to 21,865.37, the Nasdaq composite index rose 18.87 points to 6,301.89, and the S&P 500 index edged up 2.06 points to 2,446.30.
"Risk appetite's come back," said Scott Vali, vice-president of equities at CIBC Asset Management.
Earlier in the day, investors had been shaken up by North Korea's launch of a midrange ballistic missile on Monday that crossed over northern Japan and fell into the Pacific Ocean.
Stock indices dipped on the news at the start of the session, with the TSX declining by more than 60 points after 90 minutes of trading, as investors initially turned to traditional safe haven assets like gold, Vali said.
But without "a huge reaction" from the White House, Vali said, investors returned to riskier assets.
U.S. President Donald Trump said "all options are on the table" in a written statement Tuesday in response to North Korea.
Washington and its allies also called an emergency U.N. Security Council meeting for later Tuesday to evaluate options for stopping the nuclear and missile advances that are increasingly putting the U.S. mainland within range.
In commodities news, the price of oil declined for a second day in row as tropical storm Harvey continued dumping record amounts of rain on the Texas Gulf Coast, where several oil companies operate.
The October crude contract retreated 13 cents to US$46.44 per barrel.
Elsewhere, the December gold contract advanced $3.60 to US$1,318.90 an ounce, the October natural gas contract rose 2.2 cents to $2.98 per mmBTU, and the December copper contract gained about 1.9 cents to US$3.10 a pound.
In currency markets, the Canadian dollar was trading at an average price of 79.90 cents US, down 0.22 of a U.S. cent.