CANADA STOCKS-TSX rides resource rally; Shopify extends losses

(Updates with analyst comments, sector and individual stock moves)

* TSX up 45.51 points, or 0.29 percent, to 15,766.51

* Six of the TSX’s 10 main groups rise

TORONTO, Oct 5 (Reuters) - Canada’s main stock index advanced on Thursday, fueled by a rally in mining and energy stocks as commodity prices rose, but gains were tempered by a sharp fall in shares of Shopify Inc for a second straight day.

The materials group, which includes precious and base metals miners and fertilizer companies, rose for the fourth day in a row on bullish sentiment about demand, particularly from China, and a rally in the price of copper.

The group rallied 0.8 percent, with First Quantum Minerals Ltd jumping 5.2 percent to C$15.88, and Teck Resources advancing 3.7 percent to C$28.76. Ivanhoe Mines Ltd surged 7.1 percent to C$4.58.

Copper prices advanced 2.4 percent to $6,677.5 a tonne.

“Recently, there’s been some decent numbers out of China. That’s driving sentiment ... China right now is consuming a lot of everything,” said Manash Goswami, a Portfolio Manager with First Asset Investment Management Inc.

“There’s been a lot of under-investment in actual mines over the years ... Maybe this is the time we’ll actually see some pick-up.”

At 11:07 a.m. ET (1507 GMT), the Toronto Stock Exchange’s S&P/TSX composite index was up 45.51 points, or 0.29 percent, at 15,766.51. Six of the index’s 10 key sectors advanced.

The energy group climbed 0.8 percent as oil prices heated up on signs that Saudi Arabia and Russia would limit production through next year. U.S. crude was up 2.0 percent to $51 a barrel, while Brent crude added 2.2 percent to $57.02.

Cenovus Energy was up 1.5 percent to C$12.44.

TransCanada Corp edged up 0.2 percent to C$61.02, despite news the company was cancelling certain pipeline projects. Goswami said the move was anticipated and that projects are weighted, with investors taking into account other factors in its valuation of the company.

Tempering some of the gains was Shopify’s sharp retreat in heavy trading. Shares fell 3.5 percent to C$124.41, extending Wednesday’s losses after short-seller Citron Research said the stock was overvalued and criticized the Canadian ecommerce software provider’s marketing practices.

Advancing issues outnumbered declining ones on the TSX by 182 to 60, for a 3.03-to-1 ratio on the upside.

The index posted 12 issues that hit new 52-week highs. (Reporting by Solarina Ho; Editing by James Dalgleish)