* TSX down 6.32 points, or 0.05 percent, at 13,395.99
* Five of 10 main groups decline
* RIM, Potash lead gains (Updates to close, adds details, comments)
By Solarina Ho
TORONTO, Jan 5 (Reuters) - Toronto's main stock index closed little changed on Wednesday, recovering from earlier losses with the help of advances by Research In Motion RIM.TO and Potash Corp. (POT.TO)
Five of the index's 10 main groups ended lower, but offsetting declines was a 1.1 percent rise among technology stocks, mostly powered by Research In Motion, which was up 4.54 percent at C$61.70.
Soft commodity prices helped keep the pressure on the resource-heavy index, which saw the materials group retreat 0.48 percent.
Barrick Gold (ABX.TO) fell another 3.39 percent to C$49.84 after Tuesday's 2.88 percent as gold prices extended their decline amid further profit-taking and a strong U.S. dollar. [GOL/]
Kinross Gold (K.TO) slipped 2.21 percent to C$17.74 while Goldcorp (G.TO) declined 1.26 percent to C$43.94.
The energy group pared earlier declines to finish down a modest 0.15 percent as oil prices bounced back above $90 a barrel on stronger than expected U.S. economic data. [ID:nN05600530]
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE finished down 6.32 points, or 0.05 percent, at 13,395.99.
"It's awfully resilient, all things considered. We had a big run up to the end of the year and one would've thought we'd have a bigger selloff ... it's come back a fair bit," said Ian Nakamoto, director of research at MacDougall, MacDougall & MacTier.
In individual company news, Potash shares climbed 3.53 percent to C$161.50. The fertilizer giant was bolstered by strong quarterly profit from fellow producer Mosaic Co. (MOS.N) [ID:nN05218018]
($1=$1.00 Canadian) (Reporting by Solarina Ho; editing by Rob Wilson)