The Toronto stock market racked up a solid gain Friday amid hopes that China’s slowing growth will persuade officials to take further steps to energize the world’s second-biggest economy.

And results from banking giant JPMorgan Chase raised hopes for the second-quarter earnings reporting season.

The S&P/TSX composite index gained 89.05 points to 11,514.53 while the TSX Venture Exchange edged up 17.76 points to 1,186.96.

The Canadian dollar was up 0.39 of a cent to 98.56 cents U.S.

Stronger than expected earnings from banking giant JPMorgan Chase helped send New York markets higher even as it massively increased the loss from a huge trading blunder in May. The biggest U.S. bank earned US$5 billion, or US$1.21 per share, for the second quarter, much higher than the 76 cents that analysts expected.

It also reported that its loss from an embarrassing trading misstep – which hit second-quarter results – has grown to $4.4 billion, more than double the bank’s original estimate of $2 billion. Its shares ran up 5.9% to US$36.05.

The Dow Jones industrials jumped 203.82 points to 12,777.09.

The Nasdaq composite index gained 42.28 points to 2,908.47 and the S&P 500 index was ahead 22.01 points to 1,356.77.

Earnings expectations for the second quarter are muted as the global economic recovery faltered. Big multinationals also faced headwinds from a U.S. dollar that increased in value as a worsening eurozone debt crisis pushed nervous investors to the safe haven status of American treasuries.

Commodities gained even as China’s economic growth fell to a three-year low of 7.6% during the second quarter, in line with expectations.

Other Chinese data for June showed industrial production slowing to 9.5% year-over-year while retail sales eased a bit but beat expectations, rising 13.7% year-over-year.

In recent weeks, the Chinese authorities have cut interest rates, lowered banks’ reserve requirements to encourage lending and increased spending on infrastructure projects. More moves are now expected.

The Chinese economy has been a major prop for the global economy still recovering from the 2008 financial collapse and recession.

But there are doubts that more stimulus can pump up a Chinese economy, which is being affected by a global slowdown, just like other economies.

“Chances are they will do something sort of marginal,” said Norman Raschkowan, North American strategist at Mackenzie Financial Corp.

“But it’s not going to be anything that’s going to change the direction and the direction is that the global economy is slowing.”

The TSX energy sector climbed 1.4% as the August crude contract on the New York Mercantile Exchange gained US$1.02 to US$87.10 a barrel. Suncor Energy (TSX:SU) rose 56 cents to $29.41 while Cenovus Energy (TSX:CVE) was up 71 cents to $33.28.

The base metals sector rose 2.29% as metal prices also ran ahead with copper up nine cents to US$3.50 a pound. China is the world’s biggest consumer of the metal, which is viewed as an economic proxy as it is used in so many industries. Teck Resources (TSX:TCK.B) climbed 59 cents to $30.68 and First Quantum Minerals (TSX:FM) was ahead 47 cents to $17.53.

Gold ticked US$26.70 higher to US$1,592 an ounce, pushing the gold sector up just over one per cent. Kinross Gold Corp. (TSX:K) gained 47 cents to $8.51 and Goldcorp Inc. (TSX:G) rose 85 cents to $34.53.

Auto parts makers helped push the consumer discretionary sector up 1.2% with Magna International (TSX:MG) ahead $1.84 to $41.37 and Linamar Corp. (TSX:LNR) added 69 cents to $21.32.

All sectors were higher save technology with the financial group up about 0.5%. Manulife Financial (TSX:MFC) advanced 23 cents to $10.88 and TD Bank (TSX:TD) climbed 60 cents to $79.85.

Research In Motion Ltd. (TSX:RIM) shed 21 cents to $7.35.

The TSX ended the week down 145 points or 1.24%.

Traders seemed unfazed by a report showing a slip in consumer confidence in the U.S.

The widely-watched University of Michigan’s index came in at 72 in July, down from 73.2 in May and a recent high of 79.3 in April.

A smooth bond auction from the eurozone’s third-largest economy helped to cement the positive tone in the markets. Italy sold €3.5 billion of three-year bonds at an average yield of 4.65%. That was sharply lower than the 5.3% it had to pay at a similar auction in mid-June when investors were acutely concerned about Greece’s general election and the scale of the problems in Spain’s banks.

In other corporate news, Garda World Security Corp. (TSX:GW) shares gained 28 cents to $8.25 as it said it has acquired McKinnon Services, a 1,500-employee security company based in Quebec City. Financial terms of the deal were not disclosed, but Garda said it’s expected to have an immediate positive impact on financial results.

Gold miner Semafo Inc. (TSX:SMF) picked up after taking a beating from disappointing results at its key mining operation. The company lost more than one-third of its value over two trading sessions Wednesday and Thursday. Its shares were up nine cents to $3.48 Friday, still down from the Tuesday close at $5.28.