The index recovered from a fresh 2-1/2-year low earlier in the session. Still, it has fallen 5.6 percent in the first two weeks of 2016 as a deep slump in oil prices weighs on the resource-linked market. It tumbled 11 percent in 2015, its worst year since the global financial crisis of 2008.

“The TSX bears the brunt of any concerns about global growth,” said Elvis Picardo, strategist and vice president of research at Global Securities in Vancouver.

However, concern shown at the start of the year has been overdone, he said. He is looking “for some kind of retracement of recent losses,” expecting the congestion area around the 12,000 threshold to provide “very strong support.”

Energy stocks rose 4.3 percent, helped by the rally in oil prices.

Enbridge rose 4.6 percent to C$44.78, while Canadian Natural Resources was up 4.8 percent at C$25.90.

U.S. crude prices settled at $31.14, up 2.2 percent

Canadian National Railway Co rose 1.7 percent to C$74.16, while Valeant Pharmaceuticals International Inc rose 5.4 percent to C$129.25.

The Toronto Stock Exchange’s S&P/TSX composite index closed up 165.62 points, or 1.36 percent, at 12,336.03. Nine of the 10 main sectors on the index were higher.