TORONTO -

The Toronto stock market closed slightly higher at the end of a volatile session Wednesday, losing most of the day's gains in the final minutes of trading despite the U.S. Federal Reserve saying that economic activity continues to pick up from the worst downturn since the 1930s.

And the central bank pledged to leave interest rates near zero "for an extended period" to encourage a fragile recovery.

The S&P/TSX composite index, up as much as 162 points during the session, closed 45.3 points higher at 11,071.2.

The Fed added that the housing market also has grown stronger, a key ingredient to a sustained recovery.

"They were slightly more optimistic, saying household spending appears to be expanding," said Benjamin Reitzes, economist at BMO Capital Markets. "Before, they said it appeared to be stabilizing."

"So that's a little more optimistic but other than that there wasn't any meaningful changes."

The latest market gyration reflects investor unease with a market that is still up about 45 per cent since the lows of early March. And investors wonder if economic prospects justify such a jump.

"As far as I'm concerned, it's stagnant to going nowhere and we are really into what I keep seeing and determining in my own mind as nothing more than a gambling market at the present time," said Fred Ketchen, manager of equity trading at Scotia Capital.

"It's a trading market -- you buy them then you turn around and sell them out."

The Canadian dollar rose 0.38 of a cent to 94 cents US.

The Toronto stock market was earlier lifted amid stronger reports on the U.S. service sector and employment, which also boosted optimism about the American economy.

TSX gains were led by the base metals sector, up 2.75 per cent, with December copper up 3.7 cents to US$2.993 a pound. Teck Resources (TSX:TCK.B) was ahead 46 cents to $31.84.

The TSX energy sector advanced 0.57 per cent as the December crude contract on the New York Mercantile Exchange gained 80 cents to US$80.40 a barrel. Nexen Inc. TSX:NXY) gained 66 cents to $24.42 .

The gold sector was ahead 0.47 per cent as bullion closed at another record high. December gold gained $2.40 to US$1,087.30 an ounce. Barrick Gold Corp. (TSX:ABX) moved up 97 cents to $42.94.

The TSX also got a lift from Magna International (TSX:MG.A). Its shares climbed $4.34 or 10.1 per cent to $47.34 after General Motors Co. said Tuesday it will keep its European Opel unit and restructure it instead of selling a 55 per cent stake to the Canadian autoparts maker and its partner, Russian lender Sberbank. GM CEO Fritz Henderson said Europe's business environment and GM's overall health have both improved since it put the division up for sale.

Market heavyweight Research In Motion weighed on the TSX, losing $2.50 to $61.39 after brokerage Piper Jaffray & Co. maintained its neutral rating on the stock, but lowered its price target from US$67 to US$63. In New York, the stock was down $2 to US$57.61.

The stock was punished earlier in the week in the wake of a downgrade to sell from buy by a Citigroup analyst on worries about competition in the smartphone market.

The TSX Venture Exchange was ahead 4.6 points to 1,331.35.

In New York, the Dow Jones industrial average rose 30.23 points to 9,802.14.

The Nasdaq composite index dipped 1.8 points to 2,055.52 while the S&P 500 index was up 1.09 points to 1,046.5 as traders took in some positive employment data two days before the U.S. government releases its October non-farm payrolls report.

The ADP employment report said the U.S. private sector shed 203,000 jobs in October. That's down from the 227,000 jobs lost in September and was the seventh straight month of declining job losses. Economists expect the U.S. government's report to show that, overall, 175,000 jobs were lost last month.

The Institute for Supply Management's services index fell to 50.6 in October from 50.9 in September. Although the index didn't meet forecasts, the ISM said new orders, which are an indicator of future business activity, grew faster.

The TSX was also supported by some positive earnings reports.

HudBay Minerals Inc. (TSX:HBM) shares climbed $1.43 to $15.85 after it said Tuesday that it earned $20 million, or 13 cents per share for the quarter ended Sept. 30 compared with a profit of $2.8 million or two cents per share a year ago. Revenue totalled $194.6 million, down from $247.4 million.

Fertilizer company Agrium Inc. (TSX:AGU) said quarterly net income declined to US$26 million or 16 cents per diluted share in the third quarter, down 92 per cent from a year earlier. The decline was in line with a warning issued by the company on Oct. 23. Revenue slipped to $1.8 billion from $1.9 billion in the third quarter of 2008. Agrium shares dipped eight cents to $51.23.

In other corporate news, oilsands junior Opti Canada Inc. (TSX:OPC), a minority partner in the Long Lake project in northern Alberta, said it was exploring "strategic alternatives," which may include selling assets or the entire company. The operator of Long Lake is Nexen Inc. (TSX:NXY). The two companies had to put production at Long Lake on hold earlier this year due to problems with the project's water treatment equipment. Its shares surged 21 cents or 11.05 per cent to $2.11 .