Canada’s main stock index recovered from yesterday’s NAFTA wobble, helped by gains in the energy sector, as the loonie weakened.

The S&P/TSX composite index was up 38.99 points to 16,286.94 on Thursday, a day after markets fell into the red following reports the United States is poised to pull out of the North American Free Trade Agreement.

“Yesterday it was notable to see that the threat of NAFTA falling apart was enough to create some volatility in the market place. On a day when equity markets were negative, we were happy and relieved to see the markets function the way they should by pricing in uncertainty,” said Kash Pashootan, CEO and chief investment officer at First Avenue Investment Counsel Inc. in Toronto.

“And today we see the continued confidence and appetite for equities surge back into the market place by making up the shortfall of yesterday.”

South of the border, Wall Street resumed its record-setting pace after losing ground on Wednesday.

The Dow Jones industrial average climbed 205.60 points to 25,574.73. The S&P 500 index added 19.33 points to 2,767.56 and the Nasdaq composite index was up 58.21 points to 7,211.78.

The next test for the market may arrive in coming weeks as U.S. companies report how much profit they made in the last quarter of 2017.

American businesses will need to produce big numbers to justify the gains their stocks have made, and expectations are also high that CEOs will unveil encouraging profit forecasts for 2018 after Washington cut their income-tax rates.

On the Canadian corporate scene, shares of Shaw Communications Inc. fell 78¢, or 2.79%, to $27.16 after president Jay Mehr told analysts he thinks Freedom Mobile is ready to take on the Big Three. The arrival of Apple devices last month saw a big boost in the Calgary-based telecommunications company’s wireless subscribers compared to the quarter before it landed the iPhone.

In currency markets, the Canadian dollar closed at an average trading value of 79.78¢ US, down 0.25 of a U.S. cent.

On the commodities front, the February crude contract gained US23¢ to US$63.80 per barrel and the February natural gas contract was up US18¢ to US$3.08 per mmBTU.

The February gold contract advanced US$3.20 to US$1,322.50 an ounce and the March copper contract was unchanged at US$3.23 a pound.

With a file from The Associated Press