(Bloomberg News) U.S. stocks rallied this week, erasing the 2011 decline for the Standard & Poor's 500 Index, as better-than-estimated economic data boosted confidence in the world's largest economy.

Bank of America Corp., General Electric Co. and Walt Disney Co. climbed more than 6.7 percent to lead advances in the Dow Jones Industrial Average. Energy producers and financial companies led a surge by all 10 groups in the S&P 500, adding at least 4.8 percent. Akamai Technologies Inc. soared 20 percent after agreeing to buy startup competitor Cotendo Inc. Oracle Corp. tumbled 11 percent after reporting quarterly earnings that missed analysts' estimates.

The S&P 500 climbed 3.7 percent for the week to 1,265.33, including a 3 percent surge on Dec. 20, the biggest one-day rally of the month. The Dow rose 427.61 points, or 3.6 percent, to 12,294, extending its 2011 gain to 6.2 percent. The Dow is at the highest level since July 27, when a political battle about the U.S. debt ceiling led stocks on a seven-day decline.

"The fundamentals here in the U.S. have been improving and I think investors were poised to want to see the equity prices move up," Mark Luschini, chief investment strategist at Philadelphia-based Janney Montgomery Scott LLC, which manages $54 billion, said in a telephone interview. The U.S. economic data "puts us on a path to avert the recession going into 2012."

Erasing Losses

The S&P 500 erased its decline for 2011, rising 0.6 percent for the year, after better-than-forecast economic reports sparked a four-day rally. Gauges on employment, consumer confidence and housing starts added to expectations that the U.S. economy can weather Europe's debt woes. The S&P 500 slumped 1.2 percent on Dec. 19 amid concern leaders weren't making enough progress in taming the euro-zone crisis.

Wall Street strategists forecast the S&P 500 will end the year at 1,278, or 1 percent higher than its current level. With four trading days left in 2011, the benchmark index for U.S. equities would need to climb about 0.2 percent each day to reach their projection. On average, the S&P 500 gains 1 percent in the last four days of the year, according to data dating back to 1928 compiled by Bloomberg.

The S&P 500 gained 3 percent on Dec. 20 on a report showing builders broke ground in November on more houses in the U.S. than at any time in the past 19 months. Meanwhile, concern about Europe's debt crisis eased as German business confidence unexpectedly grew and Spain sold more bills in an auction than the maximum target.

Jobless Claims

Stocks rose further during the week as the number of applications for unemployment benefits unexpectedly dropped last week to the lowest since April 2008. Confidence among U.S. consumers rose more than forecast in December, to a six-month high, as Americans began wrapping up their holiday spending.

"I'm going to call this a sign of relief over Europe combined with incrementally positive economic news," Frederic Dickson, who helps oversee $28 billion as chief market strategist at D.A. Davidson & Co. in Lake Oswego, Oregon, said in a telephone interview. "The positive news carried investors past the fact that there were a number of negative earnings surprises this week."

Investors also shifted their attention toward the U.S. political scene. The U.S. Congress passed a two-month payroll tax cut extension after House Republicans surrendered on whether to endorse the measure days before its scheduled Dec. 31 expiration.

'Domestic Threat'

"The most important thing that happened was the agreement in Washington to extend the payroll tax cuts and unemployment benefits," David Kelly, who helps oversee $394 billion as chief market strategist for JPMorgan Funds in New York, said in a telephone interview. "That removes probably the biggest domestic threat to the economy in 2012."

Gauges of energy and financial shares added 5.4 percent and 4.9 percent, respectively, for the biggest advances among 10 industry groups in the S&P 500. The Morgan Stanley Cyclical Index rallied 4.1 percent amid economic optimism. GE jumped 7.2 percent to $18.23, while Walt Disney increased 6.7 percent to $37.70. Chevron Corp., the second-largest U.S. energy company by market value, gained 6.6 percent to $107.50. JPMorgan Chase & Co. rose 5.3 percent to $33.57.

The European Central Bank awarded 489 billion euros ($645 billion) in loans to the region's banks in the latest attempt to tame the debt crisis, far more than the median forecast for 293 billion euros in a Bloomberg survey of economists.

"There's some expectation that U.S. banks are benefiting from European banks pulling back, allowing them to increase deposits and market share," Luschini said.

Justice Department Probe

Bank of America rose 7.7 percent, the most in the Dow, to $5.60 after agreeing to a record $335 million settlement of a U.S. Justice Department probe into fair-lending lapses at its Countrywide Financial Corp. mortgage unit.

Akamai Technologies, operator of a server network that lets businesses speed data delivery, rose the most in the S&P 500 after agreeing to buy Cotendo for about $268 million in cash. The stock advanced 20 percent to $31.93.

Expedia Inc. gained 14 percent to $30.04. The online travel agency completed the spinoff of TripAdvisor Inc.

Cintas Corp. rose 14 percent, the most since October 2008, to $34.88. The provider of restroom supplies and entrance mats raised its fiscal year 2012 profit forecast to at least $2.16 a share, above the average analyst estimate of $2.03 a share.

Oracle declined 11 percent, the most since October 2008, to $26.06. The world's second-largest software maker reported quarterly earnings that missed analysts' estimates as customers held off on purchasing database and applications software.

Business-software companies are taking longer to close deals as companies gird for slow economic growth in the U.S. and the possibility of a recession in Europe next year, said Rick Sherlund, an analyst at Nomura Holdings Inc.

Red Hat Inc. tumbled 13 percent, the biggest decline in the S&P 500, to $41.59. The largest seller of the open-source Linux operating system reported third-quarter billings and deferred revenue that missed some analysts' estimates.