TORONTO - The Toronto stock market posted a small gain Monday after U.S. home sales numbers came in much better than expected for the month of June, an encouraging -- if not overly inspirational -- sign of economic recovery.

The S&P/TSX composite index gained 31.86 points to 11,746.07.

This followed a report from the U.S. Commerce Department that sales of new homes jumped 24 per cent last month to a seasonally adjusted annual pace of 330,000 -- significantly higher than the 6.7 per cent increase that economists had forecast.

However, the overall pace of home buying was the second slowest on record following a dramatic decline in May.

The U.S. housing market boomed earlier in the year on the strength of federal tax credits. Since those credits expired, the number of people looking to buy has dropped and the lacklustre economy has exacerbated this.

Recent economic data like the home sales numbers has been "not too hot, not too cold," and markets are having a hard time finding inspiration, said Sid Mokhtari, market technician at CIBC World Markets.

"It is a recovery but it's a slower recovery and I think that's why (the TSX) is probably going to stay within a tight range," he said.

The September crude contract on the New York Mercantile Exchange was unchanged, closing at US$78.98 a barrel after tropical storm Bonnie petered out when it reached the Gulf of Mexico, failing to damage the region's oil infrastructure as had been feared.

The Toronto energy sector added 0.7 per cent. Shares in Suncor Energy Inc. (TSX:SU) gained 30 cents to C$33.68.

"With oil at about $80, the energy sector is enjoying a relief rally and that's what's pushing the TSX index," Mokhtari said.

Gold stocks lost 1.4 per cent as the August bullion contract slipped $4.70 to close at US$1,183.10 an ounce. Shares in Goldcorp Inc. (TSX:G) lost 64 cents to C$41.60.

The base metals sector edged up 0.2 per cent as the September copper contract gained 3.8 cents to settle at US$3.22 a pound. Shares in Teck Resources Ltd. (TSX:TCK.B) fell 12 cents to C$36.88.

The financial sector added 0.9 per cent following the U.S. home sales report and speculation that some big Canadian banks could be looking to snap up American business as the economic recovery south of the border continues to falter. Bank of Montreal (TSX:BMO) stock gained $1.07 to $62.85.

The Canadian dollar added 0.34 of a cent to 96.86 cents US.

The TSX Venture Exchange was up 8.48 points to 1,403.46.

New York markets moved higher on the better-than-expected home sales data and an improved profit outlook from shipping giant FedEx Corp. (NYSE:FDX).

The Dow Jones industrial average added 100.81 points to 10,525.43, moving the index back into positive territory for the year. The Nasdaq composite index was up 26.96 points at 2,296.43 while the S&P 500 index gained 12.35 points to 1,115.01.

Shares in BP PLC (NYSE:BP) added nearly five per cent amid rumours that CEO Tony Hayward will step down following a disastrous oil leak in the Gulf of Mexico.

In economic news, Canada's federal bankruptcy office said the number of personal and business insolvencies fell sharply in May to 11,526, down nearly 13 per cent from a year earlier.

Canadian earnings season will get going in earnest this week and will help give direction to the Toronto stock market. On Tuesday, telecom giant Rogers Communications Inc. (TSX:RCI.B) and diversified miner Teck Resources Ltd. are among the companies scheduled to report.

On Monday, forestry company Tembec Inc. (TSX:TMB) agreed to invest $300 million in its flagship Temiscaming pulp mill in Quebec after unionized workers agreed to concessions to make the facility more productive, a union representative said Monday. Shares in Tembec added 13 cents or 6.7 per cent to $2.06.

And Western Forest Products (TSX:WEF) said it has reached a tentative agreement covering some 2,400 workers at sawmilling and woodland operations on the B.C. coast. Shares in the company gained half a cent to 34 cents.

Shares in Silvercorp Metals Inc. (TSX:SVM) fell 24 cents or 3.5 per cent to $6.63 after the company estimated its ore production for the current quarter will be down 10 per cent as a consequence of heavy rain last month. Silvercorp said it will spend about $1 million to repair and clean up four mines in China's Ying mining district within 30 days.

And BlackBerry-maker Research in Motion's (TSX:RIM) stock lost 51 cents to $57.18 after the United Arab Emirates declared the smartphones a potential threat to national security, saying the devices operate beyond the jurisdiction of national laws and are open to misuse.