TORONTO -- Canada's main stock index eked out gains Wednesday even though the cannabis sector sustained losses, while U.S. stock markets headed lower.

"It's a pretty quiet day," said Anish Chopra, managing director with Portfolio Management Corp.

There was no significant market moving economic news or geopolitical headlines, U.S. President Donald Trump's congressional address Tuesday evening didn't earn a lot of news while corporate earnings have been largely positive, he said in an interview.

"The earnings generally have been reasonable (and) there was nothing coming out of the State of the Union (speech) that would have an impact on equities."

The S&P/TSX composite index closed up 9.62 points to 15,712.31 after hitting an intraday high of 15,745.38.

The consumer discretionary sector led by gaining nearly one per cent, followed by utilities, real estate and financials.

Health care dropped 3.5 per cent as cannabis names like Aphria Inc. lost nine per cent after rejecting a hostile takeover bid and other pot firms Cronos Group Inc., the Green Organic Dutchman Holdings, Hexo Corp. and Aurora Cannabis Inc. all fell by between 3.5 and 9.6 per cent.

The influential energy sector was essentially flat even though oil prices rose slightly.

The March crude contract was up 35 cents at US$54.01 per barrel and the March natural gas contract was unchanged at US$2.66 per mmBTU.

The April gold contract was down US$4.80 at US$1,314.40 an ounce and the March copper contract was up 1.95 cents at US$2.84 a pound.

Earlier, a Bank of Canada deputy governor said the effects of U.S. trade unknowns, lower oil prices and weaker housing and consumer spending were behind the recent deceleration in economic growth.

To help the economy get through this "temporary" soft patch, Timothy Lane is expecting the lower Canadian dollar to provide support.

The Canadian dollar traded at an average of 75.82 cents US compared with an average of 76.14 cents US on Tuesday.

While the Toronto market hit its highest level in four months, U.S. markets fell.

In New York, the Dow Jones industrial average was down 21.22 points at 25,390.30. The S&P 500 index was down 6.09 points at 2,731.61, while the Nasdaq composite was down 26.80 points at 7,375.28.

Shares of tech-related companies like Google-parent Alphabet, Amazon, Microsoft, Netflix and Facebook declined between 0.58 and 2.7 per cent.

"You've got a backdrop of reasonable U.S. economic growth, China seems to be stabilizing... It's just a bit of a quieter economic backdrop," added Chopra.