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

The S&P/TSX composite index jumped 279.38 points or 2.29% to 12,465.44 with all sectors positive. The TSX Venture Exchange gained 44 points or 2.8% to 1,614.8.

The Canadian dollar closed above parity with the U.S. dollar for the first time since Sept. 20, rising 1.36 cents to 100.88 cents US as investors bought up riskier assets in the wake of the agreement.

A sharp rise in financial stocks helped take U.S. indexes sharply higher with the Dow industrials jumping 339.44 points to 12,208.48.

The Nasdaq gained 87.96 points to 2,738.63 while the S&P 500 index jumped 42.59 points to 1,284.59.

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% losses on Greece’s bonds. Eurozone countries and the International Monetary Fund will also provide an additional C100 billion in rescue loans as a second bailout package for Greece.

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 C1-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.

“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 three per cent as the December crude contract on the New York Mercantile Exchange gained $3.76 to US$93.96 a barrel. Suncor Energy (TSX:SU) was up $1.54 to C$32.80.

Imperial Oil (TSX:IMO) gained 93 cents to $42.86 after third-quarter profit more than doubled to $859 million on strong performance from Cold Lake and higher production at the Syncrude oilsands property. Earnings per share of $1.01 handily beat estimates.

Metal prices also surged with the December copper contract in New York up 20 cents to US$3.69 a pound. A strong earnings report from Teck Resources (TSX:TCK.B) also helped push the mining sector up 7.72%.

Teck stock gained $3.02 or 8.09% to C$40.35 after the miner reported an adjusted third-quarter profit of $742 million, or $1.26 per share. The results were up sharply from $452 million, or 77 cents per share, a year ago. Record revenue of $3.4 billion in the third quarter was up 40%. Teck also announced a 33% increase in its semi-annual dividend to 40 cents a share.

Elsewhere in the group, First Quantum Minerals (TSX:FM) advanced $2.64 to $21.24.

The financial sector also made a strong contribution to TSX gains, up 2.84%. Scotiabank (TSX:BNS) gained $1.45 to $53.03 and Manulife Financial (TSX:MFC) climbed 92 cents to $13.94.

The gold sector was up slightly as bullion prices advanced with the December gold contract $24.20 higher at US$1,747.20 an ounce.

Barrick Gold Corp.’s (TSX:ABX) profits rose 45% to a record US$1.37 billion in the third quarter, helped by the strength of gold prices. The company, which reports in U.S. dollars, says the results were equal to $1.37 per share, coming in above analyst expectations of $1.34 per share, according to Thomson Reuters. Its shares were ahead 42 cents at C$48.61.

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% in the July-September quarter, lifted by stronger consumer spending and greater business investment.

That’s nearly double the 1.3% growth in the April-June quarter and a vast improvement over the anaemic 0.9% growth for the entire first half of the year.

In other earnings news, Potash Corp. of Saskatchewan Inc. (TSX:POT) more than doubled its profits in the latest quarter to US$826 million or 94 cents a share on higher production and record sales. Its shares lost early momentum and moved up 71 cents to $50.46.

Domtar Corp. (TSX:UFS) reported third-quarter net earnings of US$117 million or $2.95 per share, compared with US$191 million a year ago. Sales revenue for the three months ended Sept. 30 totalled $1.42 billion, down from $1.47 billion. Its shares were ahead $4.81 to $83.25.

Energy company Nexen Inc. (TSX:NXY) earned $200 million or 38 cents a share for the quarter ended Sept. 30, beating estimates by seven cents a share. The company also said that ongoing political strife in Yemen may cause it to halt its long-running operations in the Middle Eastern country. Its shares were off 12 cents to $16.67.

In the U.S., Exxon Mobil said its net income rose 41% in the third quarter to US$10.33 billion as higher oil and natural gas prices made up for lower production. The world’s largest publicly traded oil company said revenue rose 32% to US$125.3 billion. Its shares ticked 98 cents higher to US$82.05.