TORONTO -- North American stock markets surged Thursday to rebound from dramatic losses earlier in the week over the escalating trade war between the U.S. and China.

"Mathematically it's a full recovery, in investors' minds that's a different thing," says Michael Currie, vice-president and investment adviser at TD Wealth. "There's still a lot of negativity and concern after all the news on Monday."

While the Toronto stock market was closed Monday for the Civic holiday, U.S. stocks plunged to their worst loss of the year on worries that a worsening trade war would damage the global economy. The Dow Jones Industrial Average lost 767 points while the Nasdaq composite fell 3.5 per cent.

The S&P/TSX composite index closed Thursday up 139.31 points at 16,404.53.

"It's hard to believe this is the third day in a row up this week because it feels it has been a disaster, but huge numbers," Currie said in an interview.

In New York, the Dow Jones industrial average was up 371.46 points at 26,378.53. The S&P 500 index was ahead 54.13 points at 2,938.11, while the Nasdaq composite was up 176.33 or 2.24 per cent to 8,039.16.

Markets got a lift from positive export data out of China, good U.S. labour market numbers and China pegging the yuan a little stronger than expected.

"So I guess those things in combination you got people feeling that maybe the plunge on Monday was a little bit overdone, but I must admit I'm a little surprised at just how incredibly quickly it's come back."

With the recovery, the TSX is just 1.6 per cent off its record high while U.S. markets are about four per cent below their peaks.

The Canadian dollar traded at an average of 75.37 cents US, up compared with Wednesday's average of 75.06 cents per share.

Nine of the 11 major sectors of the TSX rose, led by technology. It gained two per cent as Shopify Inc. climbed 4.3 per cent to become the 11th largest company on the exchange by market capitalization.

Energy was up 1.5 per cent with Crescent Point Energy Corp. increasing 6.9 per cent on a recovery in crude oil prices from Wednesday's dramatic decrease.

The September crude contract was up $1.45 at US$52.54 per barrel and the September natural gas contract was up 4.5 cents at US$2.13 per mmBTU.

Materials was also higher with Eldorado Gold rising 5.3 per cent following an analyst upgrade. The sector increased despite a dip in gold prices from the six-year high set Wednesday.

The December gold contract was down $10.10 at US$1,509.50 an ounce and the September copper contract was up 3.65 cents at US$2.61 a pound.

Consumer staples was up with Saputo Inc. shares gaining 4.2 per cent and High Liner Foods rising 15.6 per cent. The heavyweight financials sector also rose as shares of the TMX Group closed 12.1 per cent higher.

Consumer discretionary and telecom were the lone sectors to lose ground, but only marginally. Telecom fell despite a 6.7 per cent gain in Cineplex Inc. shares.