(Adds details, analyst comments)
TORONTO, Dec 31 (Reuters) - The Toronto Stock Exchange's main index dipped on Monday, the last trading day of the year, as falling gold shares were joined on the downside by tech heavyweight Research In Motion RIM.TO.
A strong rally in the previous session may have spurred investors to lock in profits.
Meanwhile, data showed slightly higher than expected sales of existing homes in the United States last month, which could partly offset Friday's news of a sharp drop in new home sales in Canada's biggest trading partner.
"Obviously we're going to have a slowdown in the U.S. economy ... and that's the key thing overhanging the (stock) markets," said Sal Masionis, stockbroker at Brant Securities.
"People are asking what that will do to commodities and oil."
The resource-heavy S&P/TSX composite index .GSPTSE drifted in and out of the red in early trading. It was down 20.66 points, or 0.15 percent, at 13,800.68 by late morning with six of its 10 main groups in negative territory.
Shares of BlackBerry maker RIM, led the fall, sagging C$1.63 to C$113.70.
Goldcorp (G.TO), Canada's second-biggest gold producer, dipped 36 Canadian cents to C$33.74 as U.S. spot bullion prices tumbled nearly $5 an ounce.
The TSX gold subsector fell 0.5 percent while the wider materials group gave up 0.4 percent. Energy shares, which rose early in the session, eased 0.1 percent.
The benchmark index has risen modestly in December, and is set to finish about 7 percent higher in 2007. The TSX index rose 14.5 percent in 2006, and more than 22 percent in 2005.
"It's certainly a trend downward ... and on balance, the consensus is for a slow first half (of 2008) and a pickup in the second half," said John Kinsey, portfolio manager at Caldwell Securities Ltd in Toronto.
$1=$0.98 Canadian Reporting by Jonathan Spicer; Editing by Rob Wilson