TORONTO -- The Toronto stock market closed higher Thursday, led by advances in mining stocks that have sold off this week amid signs of slowing economic growth around the world.

The S&P/TSX composite index gained 49.06 points to 11,996.34 after sinking to a five-month low Wednesday while the Canadian dollar gained 0.06 of a cent to 97.47 cents US.

U.S. indexes were lower following sharp losses Wednesday as traders balanced a disappointing earnings report from investment bank Morgan Stanley, a positive read on the number of Americans seeking unemployment benefits last week and a key manufacturing index that didn't meet forecasts.

The number of Americans seeking unemployment benefits increased just 4,000 last week to a seasonally adjusted 352,000. The slight gain kept applications at a level consistent with solid hiring and suggested that March's sluggish hiring may have been temporary.

But the Federal Reserve's Philadelphia Fed index dropped to 1.3 in April from two in March. Economists had expected the manufacturing gauge to rise to four.

The Dow Jones industrial average was 81.45 points lower at 14,537.14.

The Nasdaq composite index fell 38.31 points to 3,166.36 and the S&P 500 index was down 10.4 points to 1,541.61, falling below its 50-day moving average of 1,543.

Earnings at Morgan Stanley totalled $1.2 billion or 61 cents, down about 12 per cent from a year earlier while revenue totalled $8.5 billion, down five per cent from a year earlier. Its shares were off 5.4 per cent to US$20.31.

It has been a very choppy week on the TSX, which sustained triple-digit slides Monday and Wednesday. Losses were led by steep drops in mining stocks as commodity prices retreated after the International Monetary Fund cut its forecast for global growth to 3.3 per cent this year from its forecast in January of 3.5 per cent.

The IMF data deepened pessimism about the strength of the global recovery as data released earlier in the week had shown growth in China slowing earlier this year and left the TSX down about 3.5 per cent year to date.

"I think the real challenge is that you see this ongoing rotation between sectors as people try to find some area that is going to do spectacularly well -- but you're in a two per cent global growth world," said Norman Raschkowan, North American strategist at Mackenzie Investments.

"So commodity prices aren't going to go anywhere. It doesn't mean that they're going to collapse, it just means that you're not going to get your earnings growth from commodity price increases and in the meantime, the problem many of the producers have is that their costs keep going up."

New York indexes have also had a volatile week and are off the highs of the year reached at the end of last week, when the Dow was up 13.43 per cent year to date.

Commodity prices were higher Thursday.

The gold sector was the biggest advancer, up about 2.8 per cent as the June contract gained $9.80 to US$1,392.50 an ounce. A rising U.S. dollar and the prospect of troubled eurozone countries selling off part of their gold reserves to tackle debt problems have sent gold to their lowest levels in over two years, with prices falling $140 on Monday alone.

Goldcorp Inc. (TSX:G) gained 63 cents to C$28.58.

Barrick Gold (TSX:ABX) shares added 27 cents to $18.44 even after Moody's Investors Service placed the miner under review for a potential ratings downgrade. The move came after a Chilean court last week ordered a halt to construction at Barrick's $8 billion Pascua-Lama project due to environmental concerns. Barrick shares are down about 30 per cent since April 5.

Copper, viewed as an economic bellwether, continued to plumb 18-month lows because of falling demand prospects. On Thursday, the May copper contract on the New York Mercantile Exchange shed early losses to rise two cents to US$3.20 a pound. Copper has fallen about 12 per cent year to date.

The base metals sector was up 1.94 per cent after steep losses on Monday and Wednesday. Teck Resources (TSX:TCK.B) gave back 27 cents to C$25.15 while First Quantum Minerals (TSX:FM) gained 68 cents to $16.11.

Oil prices have also lost ground this week following the Chinese and IMF data. But on Thursday, the May crude contract on the Nymex gained $1.05 to US$87.73 a barrel after touching a four-month low earlier in the morning, and the energy sector was up 1.18 per cent. Suncor Energy (TSX:SU) advanced 35 cents to C$28.33.

EnCana Corp. (TSX:ECA) ran up 59 cents to $19.48 as natural gas futures rose 19 cents, or 4.5 per cent, to US$4.40 per 1,000 cubic feet as inventories grew less than expected last week. The last time natural gas hit that level was July 2011.

Techs led TSX decliners Thursday with Celestica (TSX:CLS) down 13 cents to $7.90 while BlackBerry (TSX:BB) dropped 49 cents to $13.80.

A technical problem that left some BlackBerry users unable to download content from its apps store has been fixed. BlackBerry says customers who were affected will gradually be able to regain access to the virtual storefront throughout the day. The company did not say how many BlackBerry users were affected by the short outage, which began Thursday morning.

The TSX Venture Exchange added 9.34 points to 932.94.