Stocks climbed on Thursday as signs of progress on the U.S. debt talks and concrete action from Europe on its own debt crisis heartened investors.

Unexpectedly robust earnings results from Morgan Stanley , whose shares rose 11 percent to $24.20, extended a relief rally in bank stocks after Goldman Sachs' dismal trading profits stunned the market earlier in the week.

But the biggest news was on a possible U.S. debt deal to save the United States from an unprecedented default.

We started drifting until we got a report that the president and the speaker of the House were close to an accord, and the market shot up like a rocket at that point, said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama.

The KBW Capital Markets index <.KSX> rose 2.9 percent.

In Europe, following a summit, euro zone leaders agreed the private sector would provide a net 37 billion euros to a second bailout package for Greece, with the total official financing around 109 billion euros.

The Dow Jones industrial average <.DJI> gained 152.50 points, or 1.21 percent, to 12,724.41. The Standard & Poor's 500 Index <.SPX> rose 17.96 points, or 1.35 percent, to 1,343.80. The Nasdaq Composite Index <.IXIC> advanced 20.20 points, or 0.72 percent, to 2,834.43.

Stocks rallied to session highs after the White House said it saw momentum for a balanced deficit deal, but denied reports that U.S. President Barack Obama and Republican U.S. House of Representatives speaker John Boehner were close to a pact.

Transportation shares also contributed to gains after Union Pacific Corp posted higher quarterly profits. Shares of the railroad company rose 4.6 percent to $104.40, and the Dow Jones transportation index <.DJT> was up 1.7 percent.

Biotechnology issues also rose. Alexion Pharmaceuticals Inc jumped 9.1 percent to $56.77 after the drugmaker posted better-than-expected quarterly earnings and raised its 2011 outlook. The NYSEArca biotech index <.BTK> climbed 1.8 percent.

On the downside, Dow component Intel Corp shed 0.8 percent to $22.81, a day after the chipmaker trimmed its forecast for 2011 personal computer unit sales.

After the closing bell, Microsoft Corp shed 0.8 percent to $26.87 after the world's largest software company greater-than-expected 30 percent increase in fiscal fourth-quarter profit, but profit from its core Windows product fell on soft personal computer sales.

Volume saw an upswing with about 8.22 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, above the daily average of 7.49 billion.

Advancing stocks outnumbered declining ones on the NYSE by 2,418 to 581, while on the Nasdaq, advancers beat decliners 1,752 to 814.

(Reporting by Chuck Mikolajczak; Editing by Chizu Nomiyama)