The Toronto stock market surged Thursday as an agreement to deal with the euro zone's debt crisis pushed commodities higher and the resource sector produced some strong corporate earnings.

By mid-afternoon, the S&P/TSX composite index rose 308.70 points, up 2.53 per cent, to 12,494.76 with all sectors positive.

The Canadian dollar headed for its first close above parity since Sept. 20, rising 1.36 cents (U.S.) to $1.0088 as investors bought up riskier assets in the wake of the agreement.

Story continues below advertisement

U.S. indexes were also sharply higher with the Dow Jones industrials up 353. 93 points, or 2.98 per cent, 12,222.97.

The Nasdaq composite index gained 93.70 points, or 3.53 per cent to 2,7444.37 while the S&P 500 index jumped 44.08 points, or 3.55 per cent, to 1,286.08.

European leaders agreed early Thursday on a plan to provide Greece with more rescue loans to help relieve its crushing debt obligations. It will involve private investors taking bigger losses on the value of their Greek bonds, which would make Greece the first country that uses the euro currency to be rated in default on its debt.

The deal requires banks to take 50 per cent losses on Greece's bonds. Euro zone countries and the International Monetary Fund will also provide an additional €100-billion ($142-billion U.S.) in rescue loans as a second bailout package for Greece.

Story continues below advertisement

The continent's banks will be strengthened, partially so they can sustain deeper losses on Greek bonds.

The deal also calls for a reinforcement of a European bailout fund so it can serve as a €1-trillion firewall to prevent larger economies such as Italy and Spain from being dragged into the crisis.

But some analysts said the relief was a bit overdone, considering the lack of details on how the plan will actually work.

"I think maybe this market probably is getting a little ahead of itself," said Fred Ketchen, manager of equity trading at Scotia Capital.

Story continues below advertisement

"What we really need is some more clarification and that will take a lot of patience because it isn't going to come all of a sudden by snapping your fingers together."

Markets have been depressed for weeks amid fears that a worsening debt crisis would see Greece default on its debt, putting extreme pressure on banks in the region that hold the country's bonds while also threatening the fragile global economic recovery.

The resource-heavy TSX benefited from commodity prices which moved up smartly on expectations of higher demand.

The energy sector rose 3.25 per cent as the December crude contract on the New York Mercantile Exchange gained $3.31 to $93.51 a barrel.

Story continues below advertisement

Metal prices also surged with the December copper contract in New York up 20 cents to $3.69 a pound. A strong earnings report from Teck Resources also helped push the mining sector up 8.5 per cent.

The financial sector also made a strong contribution to TSX gains, up 2.65 per cent.

Bullion prices advanced with the December gold contract $23.50 higher at $1,746.70 an ounce and the gold sector was up 0.39 per cent.

Barrick Gold Corp.'s profit rose 45 per cent to a record $1.37-billion in the third quarter, helped by the strength of gold prices.

Investors were also encouraged by data showing that the U.S. economy grew modestly over the summer after nearly stalling in the first six months of the year. The U.S. Commerce Department said the economy expanded at an annual rate of 2.5 per cent in the July-September quarter, lifted by stronger consumer spending and greater business investment.

Story continues below advertisement

That's nearly double the 1.3 per cent growth in the April-June quarter and a vast improvement over the anemic 0.9 per cent growth for the entire first half of the year.