NEW YORK — U.S. stocks surged 3 percent Thursday as an agreement by European leaders to help contain the region’s two-year debt crisis lifted a cloud hovering over markets.
Optimism that a deal would be struck to prevent widespread financial distress fueled the market’s rebound in October. The S&P 500 is up more than 13 percent this month, on pace for its biggest monthly gain since October 1974.
But some traders said implementing the agreement will present major challenges, observing that the devil is in the details.
After more than eight hours of talks, European heads of state, the International Monetary Fund and bankers sealed a deal that also foresees a recapitalization of hard-hit European lenders and a leveraging of the bloc’s rescue fund to give it firepower of $1.4 trillion.
The agreement includes provisions for write-downs on Greek bonds, though decisions on how to recapitalize hard-hit European banks and boost the EU’s rescue fund have not been finalized.
``People had limited expectations for the leadership to do something decisive, and if the market is correct, this is a game changer that will prove bullish for the market down the road,’’ said Robert Schaeffer, a money manager at Becker Capital Management in Portland, Ore.
The Dow Jones industrial average was up 339.51 points, or 2.86 percent, at 12,208.55. The Standard & Poor’s 500 Index was up 42.59 points, or 3.43 percent, at 1,284.59. The Nasdaq Composite Index was up 87.96 points, or 3.32 percent, at 2,738.63.
The day’s gains lifted the S&P 500 above its 200-day moving average for the first time since the beginning of August, a sign of an improving trend for stocks after five straight months of losses.