TORONTO -- Canada's main stock market index regained some ground Wednesday as rising oil prices helped boost the energy sector and the Royal Bank of Canada posted record third-quarter earnings.

Energy was definitely the leader as the sector gained 1.7 per cent, followed closely by cannabis-heavy health-care stocks, said Michael Currie, vice-president and investment adviser at TD Wealth.

"Energy is leading because we had a nice day for oil," he said in an interview.

Crude hit a two-week high after rising 3.1 per cent in part due to talk of U.S. sanctions on Iran and a big drop in U.S. crude stockpiles. They fell by 5.8 million, almost four times more than had been anticipated.

A dip in the value of the U.S. dollar usually helps the Canadian dollar.

"Normally you would see the Canadian dollar perk up a little more than it did on that kind of news on oil," Currie said.

The Canadian dollar averaged 76.83 cents US, up 0.12 of a U.S. cent.

The S&P/TSX composite index was up 50.37 points at 16,347.34 after hitting an intraday high of 16,397.08 with 200.2 million shares traded.

The health-care sector gained 1.55 per cent as Canopy Growth Corp. continued its hot streak, gaining $1.84 or 3.66 per cent at $52.10. Bausch Health Companies Inc. (formerly Valeant Pharmaceuticals) gained 3.56 per cent to $30.24.

Financials was up, led by the Canadian Western Bank and the Royal Bank of Canada. The country's largest bank by market capitalization delivered a record $3.1 billion in net income for its fiscal third quarter, up 11 per cent from a year ago and hiked its quarterly dividend.

"We're seeing good numbers and of course that was the first one to report of the big banks and it is the biggest and so good news to start and that's got a big push in Toronto," Currie added.

Information technology, materials and real estate sectors all gained while utilities, consumer staples, industrials, consumer discretionary and telecom services closed down.

In New York, the Dow Jones industrial average was down 88.69 points at 25,733.60. The S&P 500 index was down 1.14 points at 2,861.82, while the Nasdaq composite was up 29.92 points at 7,889.10.

Most of the decrease came in response to Federal Reserve minutes which pointed to a faster pace of interest rate hikes and the fact that the S&P 500 is coming off an all-time high hit during Tuesday trading.

Growing impeachment talk concerning U.S. President Donald Trump following a guilty plea by his former lawyer Michael Cohen and the fraud conviction of his one-time campaign chairman Paul Manafort isn't having an impact on markets, said Currie.

"On the Main Street side of things it's a big topic 1/8but 3/8 on the Wall Street side of things people are kind of dismissing it as a bit of a non-event," he said.

The October crude contract was up US$2.02 at US$67.86 per barrel and the October natural gas contract was down two cents at US$2.94 per mmBTU.

The December gold contract was up US$3.30 at US$1,203.30 an ounce and the September copper contract was down 2.2 cents at US$2.67 a pound.