The Toronto Stock Exchange’s main index set a new record Wednesday, while indices south of the border slipped for a second consecutive day after the U.S. Congress passed a tax bill that is anticipated to boost corporate profits.

The S&P/TSX composite index gained 26.32 points to 16,159.67, led by gains in two of its heaviest-weighted sectors, energy and gold. It previously hit 16,136.59 on Dec. 13.

Shares in the energy sector gained an average of 1.9%, while those in the global gold sector advanced an average of 1.19%.

The prices of the corresponding commodities also rose Wednesday, with the February crude contract advancing 53¢ to US$58.09 per barrel and the February gold contract rising US$5.40 to US$1,269.60 an ounce.

However, the biggest gain on the index came from a company in neither sector. BlackBerry Ltd. shares surged 11.6%, or $1.62, to $15.59 after the Waterloo, Ont.-based company announced an unexpected adjusted net profit and revenue above analyst estimates for its most recent quarter.

On Wall Street, indices dipped for the second consecutive day.

The Dow Jones industrial average shed 28.10 points to 24,726.65, the S&P 500 index fell 2.22 points to 2,679.25 and the Nasdaq composite index lost 2.89 points to 6,960.96.

Now that the tax reform bill is a done deal, the markets are asking what’s next, said Allan Small, a senior investment adviser at HollisWealth.

“There are many companies out there that this tax break is going to benefit,” he said, but he doesn’t know that the market fully understands yet how much companies will increase spending, create new jobs or take other actions.

FedEx, for example, said Wednesday that it would be able to grow its business thanks to the corporate tax cut, he said.

“That is what the administration is betting on, the President is betting on with this whole thing, and time will tell,” Small said.

In currency markets, the Canadian dollar closed at an average trading price of US77.87¢, up 0.27 of a U.S. cent.

Elsewhere in commodities, the January natural gas contract retreated about US6¢ to roughly US$2.64 per mmBTU and the March copper contract gained about US5¢ to roughly US$3.20 a pound.