TORONTO -

The Toronto stock market closed higher Friday as rising metal prices lifted mining stocks amid another record high close for bullion.

The S&P/TSX composite index gained 46.92 points to 11,407.68 with gains held back by declining consumer discretionary and tech stocks.

The TSX was up 157.26 points or 1.39 per cent for the week as investment sentiment improved on optimism that U.S. interest rates will stay close to zero for an extended period and that governments are in no rush to stop injecting massive amounts of stimulus into global economies.

The Canadian dollar rose amid a big improvement in the domestic trade deficit, up 0.5 of a cent to 95.19 cents US.

Canada's trade deficit with the rest of the world narrowed to $927 million in September from $2 billion the month before. Statistics Canada says exports rose 3.5 per cent to $30.3 billion, while there was little change in imports. Automotive products, industrial goods and materials, and machinery and equipment were the main sources of growth for exports.

The reading was far worse in the U.S. where the trade deficit widened more than expected in September: up 18.2 per cent to US$36.5 billion as the price of imported oil rose to its highest level in nearly a year.

The gold sector was the major advancer Friday, up 2.62 per cent -- and up 2.15 per cent for the week -- as the December contract on the New York Mercantile Exchange gained $10.10 to US$1,116.70 an ounce. Barrick Gold Corp. (TSX:ABX) climbed 85 cents to $45.10 while Goldcorp Inc. (TSX:G) advanced 87 cents to $46.25.

The base metals sector was up 1.32 per cent as December copper moved up 2.5 cents to US$2.96 a pound. Teck Resources (TSX:TCK.B) climbed 46 cents to $33.48 and HudBay Minerals (TSX:HBM) advanced 26 cents to $16.

Western Coal Corp. (TSX:WTN) shares fell nine cents to $2.68 as it said third-quarter profit plunged 95 per cent, falling to just under $2.2 million. Revenue fell to $107.6 million from $167.4 million.

The TSX energy sector was ahead 0.5 per cent as the December crude contract on the Nymex moved down 59 cents to US$76.35 a barrel. The decline came on top of a US$2 drop Thursday after data showed higher-than-expected oil gasoline inventories in the U.S., in turn raising concerns about the strength of a recovery. EnCana Corp. (TSX:ECA) moved back 84 cents to $58.41.

Suncor Energy Inc. (TSX:SU) shares rose 45 cents to $36.89 after it said it is budgeting $5.5 billion for capital spending in 2010, with about one-quarter of the money going to growth projects, including the Firebag oilsands project in northern Alberta. Stage 3 of the Firebag project was half complete when it was deferred earlier this year.

Retail stocks dragged the consumer discretionary sector lower, with Canadian Tire (TSX:CTC.A) down $2.12 to $56.12.

But shares in Montreal toymaker Mega Brands Inc. (TMX:MB) surged 54 cents or 63.53 per cent to $1.39 after it reported a $72-million profit for the third quarter. That's a vast improvement over the $122.1-million loss that Mega Brands had a year earlier as a result of lingering problems from a line of magnetic toys.

On Monday, Mega Brands announced it had won a $72-million settlement related to its ill-fated acquisition of Magnetix and the stock has soared about 189 per cent since last Friday's close.

Teck sector heavyweight Research In Motion Ltd. (TSX:RIM) was also a drag, stepping back 68 cents to $65.95.

The TSX Venture Exchange was up 9.15 points to 1,359.9.

New York markets closed higher despite the trade data and a disappointing reading on consumer confidence, with the Dow Jones industrials up 73 points to 10,270.47, gaining 247 points or 2.46 per cent this week.

The Nasdaq composite index gained 18.86 points to 2,167.88 while the S&P 500 index edged up 6.24 points to 1,093.48 as the University of Michigan's November reading on consumer confidence came in at 66, far less than the 71 reading that economists had expected and down from 70.6 in October.

Lawrence Creatura, equity market strategist and portfolio manager at Federated Clover Capital Advisors in New York, said investors were able to look past the consumer confidence figure and instead focused on earnings reports from retailers because they are a more reliable indicator about the economy.

"It's probably safe to say that investors are rationally more focused on what consumers do rather than what they say," he said.

There are also high hopes for the October retail sales report coming out Monday. Economists expect sales rose 0.9 per cent.

Abercrombie and Fitch said Friday its third-quarter profit fell 39 per cent on an ongoing slump in sales. But results from the teen retailer were better than analysts had expected.

And J.C. Penney said its net income dropped 78 per cent in the third quarter on a big pension-related expense. Sales at stores open at least a year, a key gauge for retailers, slid 4.6 per cent. But the company boosted its profit and sales outlook.