TORONTO - The Toronto stock market ran ahead Tuesday in a broad-based advance led by mining and energy stocks as a weak U.S. dollar helped drive commodity prices higher.

The S&P/TSX composite index gained 161.12 points to 11,585.73.

The TSX base metals sector was 3.18 per cent higher as December copper moved ahead 5.9 cents to US$2.8645 a pound. Teck Resources (TSX:TCK.B) advanced $1.23 to $30.54.

Elsewhere in the sector, HudBay Minerals Inc. (TSX:HBM) shares surged $1.93 or 20.6 per cent to $11.30 after it said it has evidence of a major new copper-gold zone near its Snow Lake concentrator in the Flin Flon area of northern Manitoba.

The TSX energy sector rose 1.93 per cent as the October crude contract on the New York Mercantile Exchange rose $1.84 to US$71.55 a barrel. Suncor Inc. (TSX:SU) gained 77 cents to $39.40.

"I think what it tells me is that those that wish for a correction -- in the sense of 15 to 20 per cent -- are probably going to be wrong because remember when we got a bit of a dip, people come in and buy," Ian Nakamoto, director of research at MacDougall, MacDougall and MacTier, said of the move in the market.

"It tells me there is still cash on the sidelines and also that the big correction people have been looking for, looks less and less likely or if it does happen, it's going to be at much lower levels."

The move up came despite disappointing summer retail sales.

The Canadian dollar was ahead 0.73 cent to 93.54 cents U.S. as Statistics Canada reported that retail sales fell 0.6 per cent in July, led by a 3.4 per cent drop in sales at gasoline stations as fuel prices dropped.

However, performance in other retail sectors was also weak.

In volume terms, retail sales edged down 0.1 per cent in July from June after rising in five of the first seven months of 2009.

"That suggests consumers remain cautious, despite the recovery underway, meaning that it will likely take a real turnaround in the labour market to sustain consumption gains," said CIBC World Markets economist Krishen Rangasamy.

The December bullion contract on the Nymex rose $10.60 to US$1,015.50 an ounce, taking the gold sector up 1.3 per cent. Barrick Gold Corp. (TSX:ABX) advanced 93 cents to $40.25.

The TSX Venture Exchange was up 16.63 points to 1,281.63.

New York markets also climbed despite some disappointing housing data.

The Dow Jones industrial average was up 51.01 points to 9,829.87 as the Federal Housing Finance Agency reported that house prices rose 0.3 per cent in July from the prior month, but June's price increase was revised down to 0.1 per cent from 0.5 per cent.

The housing index is still 4.2 per cent below last year's levels and 10.5 per cent off its peak from April 2007.

The Nasdaq composite index advanced 8.26 points to 2,146.3 while the S&P 500 index was ahead seven points to 1,071.66 as investors also looked to the U.S. Federal Reserve, which started a two-day meeting on interest rates.

The Fed is widely expected to keep rates at their record low of near zero for the time being but investors will be looking for more signals from the central bank on the strength of a recovery.

Most TSX sectors advanced Tuesday with the financial sector up 1.5 per cent. Bank of Montreal (TSX:BMO) climbed 98 cents to $53.86. The utilities sector climbed two per cent with TransAlta Corp. (TSX:TA) ahead 47 cents to $21.98.

In other corporate news, shares in Onex Corp. (TSX:OCX) were down 25 cents to $25 as it announced it will reduce its stake in Celestica Inc. (TSX:CLS) but retain control of the Toronto-based global manufacturing company.

Onex says it will sell 11 million subordinate voting shares of Celestica at $10.30 each to a syndicate lead by CIBC for gross proceeds of $113.3 million. Celestica shares declined 53 cents to $10.

Shares of Magna International (TSX:MG.A) were up 80 cents to $45.47 as chief executive Don Walker said talks are planned with Volkswagen to ease concerns about a deal that will see the Canadian auto parts maker company buy a stake in General Motors' Opel division.