Canada’s main stock index rebounded Tuesday from three days of losses even though oil prices fell deeply to a 15-month low on concerns about a glut of energy.

The S&P/TSX composite index closed up 54.24 points at 14,416.89 after peaking at 14,502.64 on 383 million shares traded. That snapped a three day losing streak and seven days of losses in nine trading sessions.

The influential materials sector gained 3% as gold prices rose on a dip in the U.S. dollar.

The February gold contract was up US$1.80 at US$1,253.60 an ounce while the Canadian dollar traded at an average of US74.33¢ compared with an average of US74.63¢ on Monday.

However, the energy sector lost more than 2% as the February crude contract fell about 7% or US$3.60 at US$46.60 per barrel.

With production cuts from OPEC and Russian not taking hold until the new year, and the market anticipating softer demand growth, there’s a growing worry about a buildup of inventories that are weighing down prices, at least in the short-term, said Craig Jerusalim, portfolio manager at CIBC Asset Management.

Longer-term, U.S. shale producers can dial back production if companies aren’t profitable at around US$50 a barrel, he said.

“We will eventually see a supply response and as companies stop investing in production and production growth, that will result in a balancing of the supply, demand fundamentals and we’ll see oil prices rise as a result of that,” he said in an interview.

“Layer on any OPEC plus Russian production cuts and that’s ultimately what’s going to rebalance the market in the medium term.”

While crude prices can still dip further in the short-term, they should hover around the mid-$50s, said Jerusalim.

In New York, the Dow Jones industrial average gained 82.66 points at 23,675.64. The S&P 500 index eked out a 0.22 of a point increase at 2,546.16, while the Nasdaq composite was up 30.18 points at 6,783.91.

Markets turned slightly positive at the end of the day after flirting with losses ahead of the Federal Reserve’s decision Wednesday about interest rate increases.

U.S. President Donald Trump tweeted that it was “incredible” for the Fed to even be considering another rate hike, but the market is pricing in about a two-thirds chance of an increase, said Jerusalim.

“Really I think what’s happened throughout the day is investors took risk off of the table in anticipation of this binary event.”

He said data indicates there’s very little indication of a recession in the U.S. or Canada next year. That’s what Bank of Canada Stephen Poloz indicated during year-end interviews with various media.

“The Canadian economy has had some road bumps with energy prices and trade concerns so I think it’s a positive the comments about not seeing a recession in 2019,” Jerusalim added.

“I think it’s encouraging and makes a lot of sense.”

However, markets have lost ground over the past few months, especially in December, as part of a valuation correction.

The January natural gas contract was up 31¢ at US$3.84 per mmBTU and the March copper contract was down nine¢ at US$2.66 a pound.