Canada’s main stock index continued its record-setting pace Tuesday, fuelled significantly by energy gains, as the loonie fell.

The S&P/TSX composite index advanced 22.81 points to 16,025.59, the second consecutive trading day that it’s closed at an all-time high.

Oil and gas shares continued the rallying pace set by the energy sector on Monday, with the December crude contract gaining 23¢ to US$54.38 per barrel.

Surging base metals and health-care stocks also gave the TSX a boost.

“Earnings numbers are coming in very strong. Only 20% of TSX companies have reported this earnings season but of those companies they’re seeing on average 36% earnings growth on a year-over-year basis,” said Craig Jerusalim, portfolio manager of Canadian equities at CIBC Asset Management.

“A lot of that is energy coming off a very weak 2016, however it’s across all sectors that we’re seeing positive growth among the companies that have reported so far.”

In currency markets, the Canadian dollar continued its recent slide following a report that the Canadian economy contracted in August. The loonie was trading at an average price of US77.56¢, down 0.34 of a U.S. cent.

Statistics Canada said Tuesday that real gross domestic product fell 0.1% for the month following no change in July, another indication that the frothy growth of the past year is over and done.

Jerusalim called the loonie’s depreciation a “reality check,” after the Canadian economy began 2017 with strong growth through the first two quarters, that will keep the Bank of Canada on the sidelines.

“We have a weaker dollar relative to the (U.S. Federal Reserve) who are more than likely going to be raising interest rates at least one more time this year and potentially a couple of times next year. And that’s why we’ve seen the U-turn in the Canadian dollar from about US82¢ to US83¢ down to about US78¢ and below,” he said.

The Fed will wrap up a two-day meeting on Wednesday, though most economists expect it to wait until its December gathering to raise rates for the third time this year. More attention is on U.S. President Donald Trump’s choice for the next Fed chairperson, which he’s expected announce on Thursday.

In the meantime, American companies continue to report their earnings results for the July-through-September quarter, with most coming in above Wall Street’s expectations.

The Dow Jones industrial average added 28.50 points to 23,377.24, while the Nasdaq composite index moved up 28.71 points to set a record high 6,727.67.

Meanwhile, the S&P 500’s gain of 2.43 points to 2,575.26 put it on pace to close October with its seventh straight month of gains — its longest such streak in more than four years.

Elsewhere in commodities, the December gold contract was down US$7.20 to US$1,270.50 an ounce, the December natural gas contract gave back US7¢ at US$2.90 per mmBTU and the December copper contract dropped a penny to US$3.10 a pound.