TORONTO, March 7 (Reuters) - Canada’s main stock index retreated on Tuesday as lower commodity prices weighed on mining and energy shares, while the industrial and financial services groups also lost ground.

Copper, gold and oil were among a string of commodities to trade lower, pressured by rising copper inventories and U.S. oil production levels as well as expectations for a U.S. interest rate hike this month.

“It appears that both oil and copper have rolled over from a technical analysis perspective, which has caused the TSX to decline,” said Robert McWhirter, president and portfolio manager at Selective Asset Management Inc.

Still, the index has gained 2.1 percent this year after climbing 17.5 percent in 2016. In February, it posted a record high of 15,943.09.

“In spite of any near term grinding that’s going on in the stock market, we still think that we’ve got another two years ahead of us (of rising stock prices),” McWhirter said.

“You only usually run into trouble when short-term interest rates are higher than long-term interest rates. At the moment that yield inversion hasn’t happened.”

Eight of the index’s 10 main groups ended in negative territory on Tuesday, with the materials group, which includes precious and base metals miners and fertilizer companies, losing 0.6 percent.

First Quantum Minerals Ltd fell 3.8 percent to C$14.26 and Lundin Mining Corp was down 4.4 percent at C$7.84.

Enbridge Inc’s Line 2A pipeline in Alberta, which was shut after a leak, will return to normal operations on Friday, according to a company notice to shippers seen by Reuters.

Its shares rose 1.6 percent to C$56.13, but the overall energy group fell 0.5 percent.

Brookfield Asset Management Inc added 0.5 percent to C$48.45 after saying it would take control of two SunEdison units for $2.5 billion.

But the financials group dipped 0.1 percent, while industrials retreated 0.5 percent, with Bombardier Inc down 4.3 percent to C$2.23, its lowest close this year.

Valeant Pharmaceuticals International Inc fell 5.8 percent to C$15.70 after Deutsche Bank cut its target price on the stock.

Canada posted its third consecutive monthly trade surplus in January in another signal that the economy is gaining momentum. (Additional reporting by Alastair Sharp; Editing by Lisa Von Ahn and James Dalgleish)