The Toronto stock market closed lower Tuesday amid falling gold stocks and plans by Canadian Pacific’s biggest shareholder to lighten its position in the railway.

The S&P/TSX composite index lost 15.83 points, its third straight loss, to 12,593.97.

The Canadian dollar was down 0.63 of a cent to 96.67 cents US, giving up most of Monday’s 0.85-cent jump as the green back strengthened broadly and Canada’s merchandise trade deficit with the world rose sharply during April. Statistics Canada said the deficit went from $3 million in March to $567 million the following month.

U.S. indexes closed lower despite strong data from the housing sector with the Dow Jones industrials down 76.49 points to 15,177.54, the Nasdaq fell 20.11 points to 3,445.26 and the S&P 500 index slipped 9.04 points to 1,631.38.

Canadian Pacific Railway (TSX:CP) weighed on the TSX, down $3.74, or 2.76 per cent, to $131.76 after Bill Ackman’s Pershing Square Capital Management, CP’s biggest shareholder, said Monday that it plans to sell up to seven million of the railway’s shares — about a third of its holding — over the next six to 12 months. The stock has soared since Ackman won the battle to install new board members and a new chief executive, Hunter Harrison, who formerly held the top executive job at Canadian National (TSX:CNR).

The railway was cut to underperform from sector perform by RBC Capital Markets. RBC also set a price target of $104 per share. RBC said Pershing’s move will result in limited upside for the stock and put investor focus back on the fundamentals.

“I give him (Ackman) full marks for what he’s done at Canadian Pacific and I don’t blame him for taking some money off the table,” said Ian Nakamoto, director of research at MacDougall, MacDougall and MacTier.

“It’s going to be a tougher grind from here.”

The telecom sector erased early losses to finish slightly higher after Industry Minister Christian Paradis said Mobilicity and other new wireless carriers won’t be allowed to sell spectrum to big carriers. The move was a setback for Telus (TSX:T) which had asked permission to acquire Mobilicity and its spectrum. The wireless industry has been calling on Ottawa to clarify the rules ahead of the next spectrum auction, which Paradis has postponed to next year to allow more time for new entrants to prepare. Telus shares rose two cents to $35.81.

The gold sector was the biggest decliner, down about 1.4 per cent while August gold on the New York Mercantile Exchange fell $14.70 to US$1,397.20 an ounce. Barrick Gold (TSX:ABX) faded 38 cents to C$21.58.

Consumer staples were also weak, down 1.15 per cent with grocer Loblaw Cos. (TSX:L) down $1.30 to $49.34.

The metals and mining sector was the leading advancer, up 0.69 per cent as July copper edged up four cents to US$3.37 a pound. First Quantum Minerals (TSX:FM) climbed 29 cents to C$18.67.

The energy sector was slightly higher as July crude on the Nymex slipped 14 cents to US$93.31 a barrel. Cenovus Energy (TSX:CVE) gained 31 cents to C$31.31.

On the economic front, U.S. home prices soared 12.1 per cent in April from a year earlier, the biggest gain since February 2006. Real estate data provider CoreLogic also says prices also rose 3.2 per cent in April from March, much better than the previous month-to-month gain of 1.9 per cent.

Also on Tuesday, the Commerce Department reported that the U.S. trade deficit widened 8.5 per cent to US$40.3 billion in April, with a broad European recession and slowing economies in Asia hurting exporters.

Tuesday is probably the lightest economic data day of the week, but the pace picks up on Wednesday with the ADP private payrolls report for May and the ISM’s survey of activity in the services sector. Most important will be the non-farm payrolls report for May on Friday.

Jim Paulsen, chief investment strategist at Wells Capital Management in Minneapolis, said it’s likely that traders are looking ahead to Friday since the data could help determine what the Federal Reserve will do next.

“You gotta believe that people are getting ready for the end of the week,” Paulsen said.

Canadian employment data also comes out on Friday.