Stocks rebounded from an early selloff on Wednesday after investors turned optimistic on U.S. budget talks in Washington.

The S&P 500 closed at 1409.93, up 10.99 points or 0.8 per cent – recovering nearly 25 points from their intraday low. The blue-chip Dow Jones industrial average closed at 12,985.11, up 106.98 points or 0.8 per cent. In Canada, the S&P/TSX composite index closed at 12,140.33, up 28.70 points or 0.2 per cent – marking an impressive 135-point reversal.

The turnaround followed remarks from John Boehner, the Republican House Speaker, who told reporters that budget talks can "avert this crisis sooner rather than later." As well, President Barack Obama said he hoped a deal could be reached before Christmas.

Story continues below advertisement

A deal is necessary to avoid the so-called fiscal cliff of automatic tax increases and spending cuts that will kick in at the start of the New Year, threatening to push the U.S. economy into recession. The fiscal cliff has been an on-again, off-again concern among investors for the past couple of months, but had been weighing on sentiment earlier this week.

The Federal Reserve released its Beige Book of economic conditions, noting that the U.S. economy continues to expand "at a measured pace." However, the Wall Street Journal reported that the Fed will likely continue its stimulative bond-buying campaign in 2013 because of sluggish growth.

Despite the comeback by stocks, commodities remained in the dumps. Gold fell to $1,716.50 (U.S.) an ounce, down $25.80. Crude oil fell to $86.49 a barrel, down 69 cents.

That had a mixed impact on some Canadian commodity producers. Suncor Energy Inc. fell 0.5 per cent but Barrick Gold Corp. rose 0.5 per cent.

Story continues below advertisement

Inmet Mining Corp. surged 17.4 per cent after it rejected a second takeover offer from First Quantum Minerals Ltd., for $70 (Canadian) a share. Inmet shares closed at $62.

SNC-Lavalin Group fell 2.3 per cent after its former chief executive, Pierre Duhaime, was arrested on fraud-related charges.

Canadian Tire Corp. fell 0.2 per cent after it dismissed three key executives and announced an $85-million deal to acquire the Pro Hockey Life chain.