TORONTO - The Toronto stock market closed sharply higher as commodity and financials stocks bounded ahead in the wake of an improved take on the economy by the U.S. Federal Reserve.

Traders were seemingly unfazed at data released Thursday showing that U.S. retail sales fell unexpectedly in July while more Americans filed for unemployment benefits.

"Somehow I think there has to be a disconnect... because what the data is telling us and what the markets are telling us are two different things," said Adrian Mastracci, portfolio manager at KCM Wealth Management in Vancouver.

"This recession will come out but you want the underpinning to be there, you want a solid foundation (and) we're not there. We have nothing near a solid underpinning, in my humble view."

The S&P/TSX composite index ran ahead 165.69 points to 10,825.56 after the U.S. central bank said Wednesday at the end of its two-day meeting that the economy appears to be "levelling out" rather than shrinking at a slower rate.

But investors were taken aback by grim U.S. data showing that retail sales fell 0.1 per cent in July, while economists expected a gain of 0.7 per cent.

Results would have been even worse had it not been for a boost in auto sales thanks to the Cash for Clunkers autos trade-in program. Excluding autos, retail sales fell 0.6 per cent, compared with expectations for a gain of 0.1 per cent.

The U.S. government also said the number of workers filing new claims for unemployment benefits last week rose to a seasonally adjusted 558,000, compared with expectations for 545,000.

"There is really no positive spin to put on these numbers," said BMO Capital Markets senior economist Jennifer Lee.

"The U.S. consumer remains very weak. The jobs situation, while slowly improving, is still dismal."

Commodity and financial stocks led advancers. The energy sector moved up 1.88 per cent as the September crude contract on the New York Mercantile Exchange moved ahead 36 cents to US$70.52 a barrel. EnCana Corp. (TSX:ECA) gained $1.39 to C$57.16 while Canadian Natural Resources (TSX:CNQ) moved ahead $1.47 to $63.89.

The Canadian dollar was off 0.05 of a cent to 91.83 cents US and the TSX Venture Exchange climbed 14.48 points to 1,200.5.

New York markets registered modest gains despite the economic reports amid positive earnings from Wal-Mart Stores Inc.

The Dow Jones industrial average was 36.58 points higher to 9,398.19.

The Nasdaq composite index gained 10.63 points to 2,009.35, while the S&P 500 index was up 6.92 points to 1,012.73.

Wal-Mart reported second-quarter profit virtually unchanged from a year ago, but results beat Wall Street expectations.

The world's largest retailer said it is boosting its profit outlook as it benefits from a series of cost-cutting moves.

Wal-Mart earned US$3.44 billion in the quarter. Revenue fell 1.4 per cent to US$100.08 billion and its shares advanced $1.37 to US$51.88.

The Toronto financials sector moved up 1.23 per cent with Royal Bank (TSX:RY) ahead $1.13 to $50.71.

The December bullion contract on the Nymex was up $4 to US$956.50 an ounce, taking the gold sector 2.78 per cent higher as Goldcorp Inc. (TSX:G) gained $1.05 to $39.52.

The base metals sector advanced 4.8 per cent as the September copper contract ran up 8.6 cents to US$2.91 a pound after surging almost nine cents on Wednesday. Teck Resources (TSX:TCK.B) improved $1.13 to $29.80.

Canadian-based auto parts giant Magna International (TSX:MG.A) says it has ironed out the final details in its bid to buy General Motors's European Opel unit. The company says "the open questions have been closed" in negotiations between GM and Magna management, and the contract will now go to GM's board. Magna adds it is not clear when GM would make its decision. The company's shares rose 80 cents to $52.42.

Monsanto Co., the world's biggest seed maker, reaffirmed its full-year profit outlook at the low end of its previously announced guidance.

The St. Louis-based company said Thursday it expects its 2009 earnings to fall in a range of $4.40 per share to $4.50 per share and its shares gained $1.57 to US$84.03.

In Canadian earnings news, T-shirt maker Gildan Activewear Inc. (TSX:GIL) reported third-quarter profits of US$41.5 million or 34 cents per share, down from a US$54.5-million profit or 45 cents per share a year earlier. Sales declined 19.2 per cent to US$307.8 million but its shares ran ahead $1.31 to $19.73.

Canadian Tire Corp. (TSX:CTC.A) shares were ahead $2.61 to $58.49 after the retailer said second-quarter profit rose 6.1 per cent to 107.3 million even though sales declined amid a miserable economic climate for retailers.

After the market closed, Canadian autoparts maker Linamar Corp. (TSX:LNR)reported a $48.4-million net loss or 75 cents per share for the second quarter. Linamar sales fell to $378 million from $625.4 million a year earlier, when the Ontario-based autoparts maker had a profit of $32 million or 48 cents per share. Its shares closed before the announcement at $13.09, up 49 cents.