(Adds portfolio manager comment, details; updates prices to close)
* TSX ends down 40.34 points, or 0.30 percent, at 13,433.49
* Seven of TSX's 10 main groups rise; three biggest groups fall
* Index gains 2.7 percent on week
By Alastair Sharp
TORONTO, Nov 20 (Reuters) - Canada's main stock index pulled back on Friday as weakness in heavyweight energy and material stocks amid volatile oil price action and a disappointing drop in retail sales tarnished a week of decent gains.
The materials group fell 2.5 percent and energy names lost 1.9 percent, as gold fell toward a six-year low and U.S. oil slumped before short-covering pushed it back above the $40 a barrel level at the settlement.
"Technically, oil looks like it is breaking down," said Bryden Teich, associate portfolio manager at Avenue Investment Management. "The forward curve has come in, storage is filling up and people are concerned about supply coming online."
Suncor Energy Inc, whose strong balance sheet has made it a favorite of fund managers unwilling to completely avoid the sector, fell 1.4 percent to C$36.60.
Pipeline company Enbridge Inc lost 2.2 percent to C$48.52 and Cenovus Energy Inc shed 2.8 percent to C$19.51.
Energy companies account for one-fifth of the Toronto Stock Exchange's S&P/TSX composite index's weight, while the materials sector, which includes miners and fertilizer producers, accounts for almost 9 percent.
The index closed down 40.34 points, or 0.30 percent, at 13,433.49. It gained 2.7 percent on the week, but investors remain cautious about the prospect of further gains.
"The overall environment doesn't feel great, but we're just trying to find our way through this," Teich said.
Canadian retail sales unexpectedly fell by 0.5 percent in September, pointing to soft growth heading into the fourth quarter.
Potash Corp lost 2.8 percent to C$26.67. The province of Saskatchewan, home to mines operated by the company and its peers, said it hopes to revise its taxes on production of the crop fertilizer to avoid big revenue drops in years when prices sag.
Gold prices turned lower after a two-day bounce, leading to a similar reversal in two of Canada's biggest gold miners.
Barrick Gold Corp fell 4.7 percent to C$9.57, while Goldcorp Inc ended down 2.7 percent at C$15.75. (Reporting by Fergal Smith; Editing by David Gregorio and Dan Grebler)