* TSX down 0.5% at 21,880.95
* Posts its lowest closing level since June 28
* Materials group falls 3.1%; metal prices decline
* Shopify surges 17.9% after Q2 revenue beat
Aug 7 (Reuters) - Canada's main stock index fell to a near six-week low on Wednesday, including declines for metal mining shares, as investors eyed numerous challenges to the market outlook and despite a sharp increase in the shares of Shopify.
The Toronto Stock Exchange's S&P/TSX composite index ended down 98.41 points, or 0.5%, at 21,880.95, its lowest closing level since June 28.
It was the fourth straight day of declines for the index, the longest daily losing streak since April, after an earlier attempt to rally petered out.
"Over the next six weeks, I think it's going to be very challenging for this market to keep either volatility down, or to stay on a bid," said Paul Gardner, partner & portfolio manager at Avenue Investment Management. "There are just a lot of negative forces that are hitting the market."
Winding down of yen-funded carry trades and concern the Federal Reserve has waited too long to cut U.S. interest rates have been among the headwinds for the market in recent days.
U.S. stocks also ended lower, with investor jitters stoked by weak demand in a 10-year Treasury auction.
The materials group, which includes metal miners and fertilizer companies, lost 3.1% as gold and copper prices fell.
The consumer staples sector was down 1.5% and heavily weighted financials ended 1.1% lower.
Technology was a bright spot, adding 3.3%, as the shares of Shopify Inc surged 17.9% after the e-commerce company beat analysts' estimates for second-quarter revenue.
Energy shares also advanced, adding 1.3%, as the price of oil settled 2.8% higher at $75.23 a barrel after data showed a bigger-than-expected draw in U.S. crude stockpiles.
Suncor Energy Inc was up 4.4% after the oil producer beat quarterly earnings estimates. (Reporting by Fergal Smith in Toronto and Purvi Agarwal in Bengaluru; Editing by Vijay Kishore and Marguerita Choy)