Stocks rallied on Friday, finishing the week higher after European Union leaders agreed on a plan to toughen the region's budget rules to help restore market confidence after a two-year sovereign debt crisis.

The agreement went some way to address the structural problems behind the bloc's debt crisis, but investors said more was now needed to relieve stress in the region's troubled debt markets.

The fiscal agreement will help, but not for long, said George Feiger, chief executive of Contango Capital Advisors based in San Francisco.

There is no happy ending to the situation. There are just solutions that are not horrible, he said.

Equities had risen in anticipation of a plan, with the S&P 500 up 6.5 percent since late November. But Wall Street tumbled on Thursday after the European Central Bank dashed hopes for additional bond buying.

There are investors who believe the ECB will eventually have to commit to bigger purchases of euro zone sovereign debt to shore up the battered market.

At least part of Friday's rally was a snap-back from the previous session's losses, traders said.

The Dow Jones industrial average <.DJI> ended up 186.56 points, or 1.55 percent, at 12,184.26. The Standard & Poor's 500 Index <.SPX> was up 20.84 points, or 1.69 percent, at 1,255.19. The Nasdaq Composite Index <.IXIC> rose 50.47 points, or 1.94 percent, at 2,646.85.

For the week, the Dow rose 1.4 percent, the S&P gained 0.9 percent and the Nasdaq was up 0.8 percent.

Banks, which have been pressured by the uncertainty over Europe, rallied after the EU summit. Bank of America Corp rose 2.3 percent to $5.72, while JPMorgan Chase & Co added 3 percent to $33.18. The Financial Select Sector SPDR rose 2 percent.

In the latest sign of resilience in the U.S. economy, consumer sentiment rose to its highest level in six months in early December on signs of a better jobs market and an improving economy, according to a survey by Thomson Reuters/University of Michigan.

The EU summit failed to secure changes to the EU treaty among all the member countries and investors warned the move was far from a panacea. Indications suggest the region is sliding into a recession and questions about how to bring down high sovereign debt yields are still unanswered.

Goldman Sachs suggested that investors short German equities through the benchmark DAX index <.GDAXI> in a note to clients published late on Thursday.

The European summit seems focused on a set of future priorities for increased fiscal risk sharing and the outlining of some of the needed elements of a new fiscal arrangement, but looks to have little to say about alleviating proximate stresses in Greece and Italy and the European banking system more generally, Goldman said.

Still, Italian bonds reversed losses, with traders citing frequent European Central Bank forays into Italian debt markets throughout the day.

Traders also said fast money accounts were covering short positions in bonds of so-called peripheral EU countries.

Some caution signals were sent by major U.S. companies. DuPont and Co

fell 3.1 percent to $45.04 after the Dow component cut its 2011 profit outlook, citing slower growth in some businesses.

Texas Instruments Inc cut its revenue outlook for the current quarter, warning of lower demand. The stock ended flat at $29.94.

Trading volume was 6.71 billion shares on the New York Stock Exchange, NYSE Amex and Nasdaq, below the year's daily average of around 7.95 billion shares.

Advancing stocks outnumbered declining ones by a ratio of 6 to 1 on the NYSE, while on the Nasdaq, advancers beat decliners by a ratio of 5 to 1.

(Reporting By Angela Moon; Editing by Kenneth Barry)