Stocks rallied in early trading on Thursday after European leaders agreed to boost the region's bailout fund and struck a deal with banks and insurers to accept 50 percent losses on Greek bonds.

The S&P 500 rose more than 2 percent, breaking out of a trading range of around 1,230-1,250. The broad index has been struggling to push past the levels for weeks as uncertainties over Europe persisted.

Reached after more than eight hours of hard-nosed talks between European heads of state, the International Monetary Fund and bankers, the deal also foresees a recapitalization of hard-hit European lenders and a leveraging of the bloc's rescue fund to give it firepower of 1.0 trillion euros ($1.4 trillion).

We are rallying today because the active players, mostly hedge fund managers and tactical investors, have been very neutral to even short until now. The market is up a lot, but they are rushing into getting long because they are capitulating, said James Dailey, portfolio manager of TEAM Asset Strategy Fund in Harrisburg, Pennsylvania.

Investors will now focus on data for November, which is expected to get weak, and possibly worse in December. That could bring up a lot of questions and predictions on the Fed move.

The Dow Jones industrial average jumped 232.57 points, or 1.96 percent, at 12,101.61. The Standard & Poor's 500 Index rose 30.20 points, or 2.43 percent, at 1,272.20. The Nasdaq Composite Index shot up 64.07 points, or 2.42 percent, at 2,714.74.

Exxon Mobil Corp was up 0.7 percent to $81.64 after the U.S. oil and gas major said profit rose 41 percent in the third quarter, helped by gains in crude oil prices and higher refining margins.

Dow Chemical Co rose 5 percent at $28.22, even as it narrowly missed quarterly profit expectations.

(Reporting by Angela Moon; editing by Jeffrey Benkoe)