Canada's main stock index rose on Friday as higher commodity prices helped resource shares, but losses from earlier in the week meant the index ended the week lower than it started for the first time in more than two months.

The Toronto Stock Exchange's S&P/TSX composite index ended up 63.20 points, or 0.40 per cent, at 15,998.57. Seven of its 10 main sectors closed in positive territory.

It lost 0.25 per cent over the course of the week. Before this week, the TSX had advanced for nine consecutive weeks, a feat not seen since late 1996.

Gains for the index came as data showing a drop in Canada's annual inflation rate gave the Bank of Canada room to wait until next year to raise interest rates again.

The materials group, which includes precious and base metals miners and fertilizer companies, added 1.1 per cent, while the energy group gained 0.5 per cent.

Oil rebounded more than two per cent after falling for five straight sessions as a major U.S. crude pipeline was shut and traders anticipated an OPEC deal to extend curbs on production. 

Spot gold rose 1.2 per cent to US$1,294.23 an ounce and copper prices advanced 0.9 per cent to US$6,800 a tonne. 

The most influential movers on the index included Enbridge Inc (ENB.TO), which rose 1.9 per cent to $44.86, and Teck Resources Ltd (TECKb.TO), which gained 3.4 per cent to $27.98.

Financial shares, which account for 35 per cent of the index's weight, firmed 0.4 per cent.