A surging energy sector helped lift the Toronto Stock Exchange’s (TSX) main index out of negative territory on Friday as the loonie got a boost from positive jobs data.

The S&P/TSX composite index added 5.17 points to 16,020.16, with energy stocks rising alongside strengthening oil prices as the December crude contract climbed by US$1.10 to US$55.64 a barrel.

For most of the trading day, the commodities-heavy TSX had been dragged down by Canadian mining companies feeling some heat from lower metal prices.

The December gold contract dropped by US$8.90 to US$1,269.20 an ounce and the December copper contract was down by US3¢ to US$3.12 a pound.

“Oil is kind of the only thing giving some positive moves to the market today,” said Luciano Orengo, a portfolio manager at Manulife Asset Management Ltd. “There’s a lot of reasons for that. Some U.S. inventories have finally been going consistently down. nother thing happening that’s giving energy a bit of a boost is that OPEC is meeting in Vienna on Nov. 30 and it came out today that Saudi Arabia and Iraq strongly support extending the OPEC production cuts past next March.”

In currency markets, the Canadian dollar was trading at an average price of US78.35¢, up 0.36 of a U.S. cent, following a Statistics Canada report released on Friday that showed the economy added 35,300 jobs in October.

Read: Economy added 35,300 jobs in October as unemployment rate rises: StatsCan

“It was pretty good quality data,” said Orengo. “Initially you saw the Canadian dollar rally on that but it gave up some of those gains later in the day.”

South of the border, it was another mostly calm but positive day for Wall Street after a report showed that the U.S. job market strengthened last month, though not by as much as expected.

Still, another spurt higher for Apple Inc. and other technology stocks helped the S&P composite 500 index set a new record Friday. It was up by 7.99 points to 2,587.84, as the index closed out an eighth straight week of gains.

Record highs were also set on the Dow Jones industrial average, which advanced 22.93 points to 23,539.19, and the Nasdaq composite index, which gained 49.50 points to 6,764.44.

Elsewhere in commodities, the December natural gas contract was up by US5¢ to US$2.98 per mmBTU.