TORONTO - Higher commodity stocks led the way to a sharply higher close on the Toronto stock market Tuesday as the market clawed back some of a selloff Monday that was triggered by worries about doubtful consumer strength in a U.S. economic recovery.

The S&P/TSX composite index gained 142.25 points to 10,673.84.

The main index fell 316 points Monday after weak U.S. retail sales figures for July and a dismal read on American consumer confidence at the end of last week.

All TSX sectors advanced Tuesday save for a dip in the health care group but analysts say investors should get used to choppy conditions amid a weak recovery.

John Stephenson, portfolio manager at First Asset Funds Inc., said he believed the recovery has begun, but cautioned he thought it would come in "fits and starts."

"There's no certainty -- we gain five per cent, we give up five per cent or six per cent, that kind of market. And it's going to be that way for a year or so," he said.

The TSX energy sector gained 1.89 per cent as the September crude contract on the New York Mercantile Exchange was up $2.44 to US$69.19 a barrel. EnCana Corp. (TSX:ECA) improved $1.46 to $56.50 and Husky Energy Inc. (TSX:HSE) was 97 cents higher to C$31.55 on the TSX.

The Canadian dollar added 0.44 of a cent to 90.76 cents U.S. while the TSX Venture Exchange moved up 6.68 points to 1,166.5.

U.S. indexes also advanced as investors took in positive earnings reports from a pair of U.S. retail heavyweights along with housing data that missed the mark.

The Dow Jones industrial average moved up 82.6 points to 9,217.94 after sliding 186 points on Monday.

The Nasdaq composite index rose 25.08 points to 1,955.92 while the S&P 500 index advanced 9.94 points to 989.67.

Home Depot Inc., the biggest U.S. home improvement retailer reported its second-quarter profit fell seven per cent, as the company continued to be pinched by the recession.

The company's adjusted results beat Wall Street's expectations, and it lifted its guidance for full-year earnings from continuing operations.

Home Depot earned US$1.12 billion for the quarter while revenue dropped nine per cent to $19.07, falling short of the $19.23 billion forecast of analysts polled. Its shares were ahead 82 cents to $26.93.

Target Corp.'s quarterly profit also fell, but it also surpassed analyst estimate and its shares ran ahead $3.11 to US$44.32.

The U.S. Commerce Department says construction of new homes and apartments fell one per cent in July to a seasonally adjusted annual rate of 581,000 units, from an upwardly revised rate of 587,000 in June. Economists polled by Thomson Reuters expected a pace of 600,000 units.

Another report showed wholesale prices fell 0.9 per cent in July, pushing annual inflation to record low.

The base metals sector was 2.4 per cent higher as the September copper contract slipped 0.85 of a cent to US$2.7615 a pound. Teck Resources (TSX:TCK.B) gained 33 cents to C$28.25.

The TSX gold sector improved by 1.3 per cent as the December bullion contract on the Nymex gained $3.40 to US$939.20 an ounce and Barrick Gold Corp. (TSX:ABX) rose 65 cents to $36.92.

Another major driver on the TSX was Research in Motion Ltd. (TSX:RIM). Its shares rose $3.39 to $81.49 as an RBC Capital Markets predicted wider use of smart phones in the coming years.

"We believe smart phones represent the next wave of computing, with RIM positioned for smart phone leadership," RBC's Mike Abramsky wrote in a note to investors.

Also, shares in Rogers Communications (TSX:RCI.B) were up a penny to $30.15 after the company said it has placed more orders for Apple's new iPhone 3GS. The phone is out of stock at a majority of Rogers and Fido retail stores across the country and online after being launched in June.

Rogers is the exclusive carrier of the iPhone in Canada.

In other corporate news, units of New Flyer Industries Inc. (TSX:NFI.UN) fell 65 cents to $7.53 after it said Monday would cutting up to 320 jobs or about 13 per cent of its workforce after a major customer deferred an order of buses.

The cuts came as the company reported a quarterly loss of $14.7 million compared with a loss of $10.7 million.