By Twesha Dikshit and Fergal Smith
Sept 26 (Reuters) - Canada's main stock index edged higher on Friday as commodity prices rose and economic data pointed to Canada's economy avoiding a recession, but the index still lost its weekly winning streak.
Canada's monthly gross domestic product rebounded from three months of contraction to grow by 0.2% in July as mining, manufacturing and wholesale trade boosted growth, data showed.
"Canada is likely to avoid a technical recession, with July GDP showing a rebound from the second quarter’s contraction and Q3 growth tracking in line with our forecast," Maria Solovieva, an economist at TD Economics, said in a note.
Solovieva's forecast for the third quarter is annualized growth of 0.7%.
Toronto's S&P/TSX composite index .GSPTSE ended up 29.30 points, or 0.1%, at 29,761.28.
It was led by a gain of 1.9% for the materials sector .GSPTTMT, which includes metal mining shares, as the price of gold XAU= moved closer to its recent record high.
Perpetua Resources Corp PPTA.TO was a standout, with its shares adding 11.2%. The company said it's in talks with a number of companies, including Glencore GLEN.L, about partnership to refine antimony in the United States.
The price of oil CLc1 also rose, settling 1.1% higher at $65.72 a barrel, as Ukraine's drone attacks on Russia's energy infrastructure cut the country's fuel exports.
The energy sector .SPTTEN and heavily weighted financials .SPTTFS both added 0.2%.
Still, the TSX inched 0.02% lower for the week, after seven straight weekly gains.
"Some of the market participants are simply just locking in some gains here," said Robert Gill, portfolio manager at Fairbank Investment Management. "It's been a very heated market and they're rotating out of some overextended sectors, in particular technology."
The technology sector .SPTTTK fell 2.1%, with e-commerce firm Shopify SHOP.TO down 2.3%.