The optimism helped stocks come back from earlier sharp losses that drove the benchmark S&P 500 down more than 3 percent as news Bank of America was seeking aid from Washington stoked fears about the health of the financial sector.

Stocks gained further following a CNBC report, citing sources, that the size of the government guarantee for Bank of America is to be between $100 billion and $200 billion.

Investors had also fretted about the fate of Citigroup a day before the embattled bank is due to announce more losses and lay out a plan about its strategic direction.

In response to indications that the recession is deepening, Democratic leaders in the U.S. House of Representatives unveiled an $825 billion tax cut and spending bill.

A Senate vote on the remaining $350 billion financial rescue package was expected after the market closes.

A steep drop in the price of oil below $35 a barrel helped consumer-oriented sectors, including retailers and airlines, as investors hoped lower energy costs will take some pressure off cash-strapped consumers. The S&P retail index <.RLX> was up 4.8 percent, while the airline index <.XAL> jumped 8.3 percent.

Standout beneficiaries included home improvement retailer Home Depot , which rose more than 5 percent to lead the Dow's advance, offsetting a drag from Bank of America, which fell more than 13 percent.

"Oil was down dramatically over 10 percent earlier today and equities, which were down more steeply, have rallied back handsomely," said Peter Kenny, managing director at Knight Equity Markets in Jersey City, New Jersey.

The Dow Jones industrial average <.DJI> rose 39.19 points, or 0.48 percent, to 8,239.33. The Standard & Poor's 500 Index <.SPX> added 4.40 points, or 0.52 percent, to 847.02. The Nasdaq Composite Index <.IXIC> was up 23.96 points, or 1.61 percent, at 1,513.60.

(Additional reporting by Ellis Mnyandu; Editing by James Dalgleish)