Stocks rallied Monday as investors cheered news that the government has agreed to backstop troubled bank Citigroup.
It was the market's best two-day run since after the crash of 1987 but proved to be a nail-biter at the end, with stocks yo-yo'ing a couple hundred points in the final 10 minutes of trading, after being up more than 550 points.
The Dow Jones Industrial Average ended up 396.97, or 4.9 percent, at 8443.39, adding to Friday's nearly 500-point gain.
The Nasdaqand S&P 500 index advanced more than 6 percent each.
Citigroup shares jumped 57 percent, ending just shy of $6 a share, clawing back most of its losses from last week. The government agreed to guarantee over $300 billion of Citi's troubled assets and pump $20 billion from the Troubled Asset Relief Program (TARP) into the bank, in exchange for preferred shares with an 8 percent dividend.
"The markets love a bailout," Brian Gendreau, investment strategist at ING Investment, told Reuters. "It seems to have instilled a bit of confidence in the sector itself."
Indeed, the news juiced the banking sector: Morgan Stanley Merrill Lynch and Bank of America all gained around 30 percent.
But market pros weren't convinced that the bailout would fix what's ailing the market.
"The Citigroup bailout is still a halfway measure," investor Barton Biggs, managing partner of Traxis Partners, said on CNBC. "The banks aren't going to start lending again until the bad loans are off their balance sheets. This doesn't do it."
In economic news, existing-home sales fell 3.1 percent to an annual rate of 4.98 million units in October from a downwardly revised 5.14 million pace in September. That was roughly in-line with the 5.05 million rate economists had expected.
Housing stocks soared, with Centex ending up 27 percent and Lennar gaining 26 percent. Home-improvement retailers also rallied, with Home Depot up 11 percent and Lowe's up 14 percent.
Oil stocks advanced as oil rose more than $4.50, settling at $54.50 a barrel. Dow components Chevron and ExxonMobil rose 5.4 percent and 3.9 percent, respectively.
Tech stocks posted some sharp gains, with Apple up 13 percent and Amazon up 12 percent. Google , however, fell 1.9 percent.
Retailers also rose sharply, with upscale department store Neiman Marcus up 25 percent and teen chain Abercrombie & Fitch up 19 percent.
Wal-Mart, the stallion of the shopping season, was the only decliner on the Dow, falling 0.3 percent.
>> Check the pulse of the holiday-shopping season atCNBC.com's Holiday Central.
Stocks briefly pared gains earlier after President-elect Barack Obama named his economic team, as expected. New York Federal Reserve President Timothy Geithner was named Treasury secretary, while former Treasury Secretary Lawrence Summers tapped to direct the National Economic Council and Christina Romer, a professor at the University of California, Berkeley, was named head of the White House Council of Economic Advisers.
News of Obama's team helped the Dow Jones Industrial Average close above the psychologically important 8,000 level on Friday.
On the earnings front, Campbell Soup beat expectations amid strong sales of condensed soups, which are more profitable for the company than ready-to-eat soups. But Campbell shares declined 7.9 percent as the company delivered a disappointing full-year outlook.
Xerox shares jumped 18 percent after the company issued an outlook in-line with forecasts.
The world's biggest brewer, Anheuser-Busch Inbevlaunched a deeply discounted rights issue to help fund the purchase of the Bud beer maker by the Belgian company.