The Toronto stock market racked up a solid gain Friday as commodity prices took off in the wake of strong retail and manufacturing data.

The S&P/TSX composite index jumped 169.84 points to 12,081.73 while the TSX Venture Exchange gained 24.98 points to 1,557.61.

A willingness to take on greater risk also sent the Canadian dollar higher, up 0.89 of a cent to 98.96 cents US.

The loonie was also lifted by data showing that Canadian manufacturing sales were up sharply in August.

Statistics Canada said manufacturing sales rose by 1.4% to $47.6 billion, which was the highest level since October 2008. Economists had expected a gain of 0.5%.

U.S. markets were also higher amid retail sales data that beat expectations. Retail sales increased 1.1% in September, the largest gain in seven months and led by rising auto sales. Economists had expected a gain of 0.8%.

The Dow Jones industrial index gained 166.36 points to 11,644.49.

The Nasdaq composite index was up 47.61 points to 2,667.85 and the S&P 500 index climbed 20.92 points to 1,224.58.

Markets had earlier backed away slightly in the wake of a disappointing read on American consumer confidence.

The University of Michigan’s consumer sentiment index for October dropped almost two points to 57.5, less than the 60 reading that had been forecast.

But analysts say the American retail and Canadian manufacturing reports indicate that the fragile economic recovery remains intact.

“The reports are fairly consistent with what we’ve been seeing, that these numbers and most of the data we’re seeing are consistent with low growth but not recessionary conditions,” said Robert Gorman, chief portfolio strategist at TD Waterhouse.

“In other words, we have felt throughout (that a double-dip recession) was unlikely and the more we see, the more we are of that view.”

U.S. markets were also supported by an earnings report from search engine Google Inc., which blew past expectations.

Google earned US$2.7 billion, or $8.33 per share, in the three months ended in September. That was up 26% from nearly $2.2 billion, or $6.72 per share, a year earlier.

The company’s third-quarter revenue of US$9.7 billion was 33% higher than for the same period last year and its stock was up about 5.85% to US$591.68 in New York.

Traders also eyed a meeting in Paris of finance ministers and central bank governors of the world’s 20 leading economies, including Canada. They are discussing how to save Greece from bankruptcy, deal with Europe’s wider debt crisis and restart global economic growth.

Despite the high stakes, leaders have kept expectations low for Friday and Saturday’s Group of 20 meeting in Paris. They have promised a plan by the end of the month and this weekend is likely to be dominated by closed-door negotiations.

Markets ended the week higher on growing confidence that European leaders are finally serious about finding a comprehensive way to deal with the government debt crisis and the serious threat it poses to the financial sector.

The TSX ran up 4.25% but remains 15.7% below its highs of the year from early March. The Dow industrials rose 4.87% this week.

“It’s a little more of a coherent story at this stage and there are a lot of big issues to sort out, but you get the sense that it’s past rhetoric and they’re now trying to grapple with the mechanics of exactly what they will do,” added Gorman.

“I think the sentiment surrounding that is certainly a lot more positive, no question.”

The meeting takes place against a background of some ratings agency downgrades on Thursday.

Standard & Poor’s cut Spain’s long-term debt rating, citing the country’s weak growth prospects and risks facing its banks.

And Fitch downgraded its outlook for three European banks and said it was reviewing ratings for a host of others, citing ongoing exposure to sovereign debt in Europe’s weaker economies and sluggish growth prospects.

The TSX financial sector was up 0.48% following the downgrades with most of the strength coming from insurers. Sun Life Financial (TSX:SLF) gained 54 cents to C$26.45 and Manulife Financial (TSX:MFC) rose 48 cents to $12.94 .

Oil prices moved higher with the November crude contract on the New York Mercantile Exchange ahead $2.57 at US$86.80 a barrel.

Crude has wandered most of this week above US$80 after jumping from US$75 last week amid investor optimism that Europe will soon unveil a plan to contain its debt crisis.

The energy sector gained 3.39% with Suncor Energy (TSX:SU) ahead C$1.55 at C$30.69 and Canadian Natural Resources (TSX:CNQ) up $1.21 at C$32.94.

The mining sector rose 3.9% as copper prices advanced with the December contract on the Nymex up 10 cents to US$3.41 a pound. Teck Resources (TSX:TCK.B) gained $1.25 to C$36.69 and First Quantum Minerals (TSX:FM) climbed 69 cents to C$17.17.

Quadra FNX Mining (TSX:QUX) said it expects 2011 consolidated copper production to be at the lower end of its previously stated guidance range of about 240 million pounds. It said that as a result of declining metals prices, third-quarter revenue will be decreased by about US$6 million. Its shares were ahead 17 cents at $10.39.

The gold sector was up over 1.5% as the December contract in New York gained $14.50 to US$1,683. Barrick Gold Corp. (TSX:ABX) rose 76 cents to C$48.76 and Goldcorp Inc. (TSX:G) rose 94 cents to $48.84.

In other corporate news, shares of Finning International Inc. (TSX:FTT), the world’s largest dealer of Caterpillar heavy equipment, fell 62 cents to $20.04. Vancouver-based Finning warned that the costs of its new parts distribution system and a B.C. strike will squeeze tens of millions of dollars from its profits.

Toy maker Mattel Inc. said Friday that strong sales worldwide of its iconic Barbie brand and “Cars 2” toys helped third-quarter net income rise nearly 16% to US$300.8 million or 86 cents a share, which met expectations. Its shares dropped one per cent to US$27.51.