TORONTO -- Canada's main stock index move higher Tuesday on the strength of the energy sector, which recovered as TC Energy bounced back from a sell-off over prospects for the Keystone XL pipeline.

The Calgary-based company's shares gained 4.8 per cent after shedding 4.5 per cent on Monday over uncertainty about the future of the western Canadian pipeline extension.

"It feels like a bit more of a sober second thought move in the energy stocks today and that's really the big story that's going on in the Canadian market," said Greg Taylor, chief investment officer of Purpose Investments.

U.S. President-elect Joe Biden is expected to sign an executive order as early as inauguration day to rescind the permit issued in 2019 by predecessor Donald Trump.

Taylor said energy investors have realized that Keystone had already been removed from the valuation of TC Energy in many analyst models.

"It's just more people coming back and relooking at it and thinking the sell-off yesterday was overdone," he said in an interview.

The S&P/TSX composite index closed up 12.49 points to 17,957.37. It hit 18,023.29 in intraday trading, just 35 points off its record high earlier this month.

Energy gained 1.9 per cent with shares of Vermilion Energy Inc rising eight per cent and Crescent Point Energy Corp. up six per cent.

The March crude oil contract was up 56 cents at US$52.98 per barrel and the February natural gas contract was down 19.1 cents at nearly US$2.55 per mmBTU.

Taylor said energy stocks look like they're going outperform this year as the rollout of COVID-19 vaccines increases demand as people start driving more and travelling.

The Canadian dollar traded for 78.52 cents US compared with 78.36 cents US on Monday.

In New York, the Dow Jones industrial average was up 116.26 points at 30,930.52. The S&P 500 index was up 30.66 points at 3,798.91, while the Nasdaq composite was up 198.68 points at 13,197.18.

U.S. markets rose closer to their record highs after the Martin Luther King Jr. national holiday on growing expectations for Biden's US$1.9 trillion stimulus package.

Treasury secretary nominee Janet Yellen in her confirmation hearing called on Congress to do more to boost the economy.

At her confirmation hearing on Tuesday, she said in prepared remarks that with interest rates near their record lows, "the smartest thing we can do is act big" to avoid an even worse downturn in the near-term and scarring for the economy in the long-term.

Taylor said the former Federal Reserve chair is well-known as someone who is friendly to markets.

He said the U.S. 10-year bond yield moved up to 1.11 per cent on the positive outlook for the stimulus package.

However, Taylor said it appears stimulus is "baked in" the market right now.

"There's a lot of money that's out there that could flow back into markets from a consumer spending point of view ... but you have to question whether it's already been priced in at these levels and will it do enough to keep markets going higher from here."

Health care, technology and materials were among the winning sectors on the TSX.

Cannabis producer Aphria Inc. gained another 5.3 per cent to push health care higher.

Technology was up 1.4 per cent as shares of BlackBerry Ltd. surged 18.9 per cent on anticipation of proceeds from a legal settlement with Facebook.

Materials gained 0.55 per cent on higher metals prices with Teck Resources Ltd. up 6.9 per cent and First Quantum Minerals Ltd. 5.7 per cent higher.

The February gold contract was up US$10.30 at US$1,840.20 an ounce and the March copper contract was up 3.1 cents at US$3.63 a pound.

This report by The Canadian Press was first published Jan. 19, 2021.