Updated from 3:13 p.m. EDT

U.S. stocks ended Monday's session with impressive gains as credit markets continued to thaw and Federal Reserve Chairman Ben Bernanke endorsed the idea of a new economic stimulus package.

The Dow Jones Industrial Average finished up 413.21 points, or 4.7%, at 9265.43, and the S&P 500 added 44.85 points, or 4.8%, to 985.40. The Nasdaq climbed 58.74 points, or 3.4%, to 1770.03.

Testimony by Bernanke before the House Budget Committee in Washington offered a boost to the major indices. Bernanke said that calming the financial markets would not immediately resolve all the problems faced by the broader economy and voiced approval for a new economic stimulus package.

Treasury Secretary Henry Paulson also made an appearance to discuss details of his agency's bank recapitalization program, saying that there is enough funding available for all qualified banks to take part. He said that the capital infusion is ultimately unlikely to bring additional costs to taxpayers.

Governments overseas continued to offer aid to ailing financial institutions. On Sunday, the Dutch government said it would buy a $13.4 billion stake in ING Groep ( ING) to shore up the company's balance sheet, the Associated Press reported.

Credit markets continued to relax, as three-month dollar Libor, a measure of the rate banks charge one another for large loans, dropped 36 basis points to 4.06%. The overnight rate declined 16 basis points to 1.51%.

A downtrend in interbank lending rates remains intact, Tony Crescenzi, chief bond market strategist at Miller Tabak, wrote on his RealMoney.com blog. Tender offers by the European Central Bank, the Bank of England and the Swiss National bank, which now provide an unlimited supply of dollars, has helped ease the market, he wrote. He also wrote that the Fed's plan to purchase commercial paper should provide additional support, as will money borrowed by the Treasury to provide banks with further capital.

Matthew Smith, vice president and portfolio manager at Smith Affiliated Capital, was less optimistic about the future of the credit markets. Even if rates have decreased, they're still high, and "the banks aren't willing to take someone else's paper in at this point," said Smith.

Part of the problem, said Smith, is that the Fed now pays interest rates on deposits. Banks now face two alternatives, he said: They can earn interest without risk by banking with the Fed, or they can earn a premium lending to other banks in a very risky environment.

"Once you establish that, there's no need for these banks to turn around and lend to each other when they're getting short-term interest from the Fed," said Smith.

Despite their recent declines, lending rates remained elevated, causing wrinkles in other companies' plans. The Journal reported that General Motors ( GM) was having trouble getting funding for a purchase of fellow automaker Chrysler. Shares ticked up 1.6% to $6.53.

Elsewhere, Merrill Lynch ( MER) CEO John Thain said he foresaw job cuts numbering in the thousands for the brokerage, which is slated to be bought by Bank of America ( BAC). Merrill shares added 6.5% to $19.32, and BofA tacked on 5% to $24.25.

Traders were also looking at a heap of quarterly corporate earnings statements.

Biotech Select

Oil-services firm Halliburton ( HAL) swung to a $21 million loss related to a cash settlement of convertible debt, but beat estimates and said that its business would weather a downturn in oil drilling going forward. Shares rocketed 14% to $20.80.

Energy shares were major contributors to the day's rally. The Energy Select SPDR ( XLE), an exchange-traded fund that holds integrated oil and gas companies as well as oil-services names, jumped 11% to $51.11.

Ericsson ( ERIC) announced a 28% decline in third-quarter earnings, but beat analyst estimates. Shares rose 16% to $8.03.

Swiss pharmaceutical company Novartis ( NVS) said its profit climbed 12% year over year on rising sales. The stock added 2.4% to $52.15.

Electronics retailer Circuit City ( CC) was in the news after a report in the Journal said it may close 150 stores and slash its head count. Shares dropped 10% to 35 cents. The Journal also reported that Internet portal Yahoo! ( YHOO) would probably announce layoffs, perhaps as early as Tuesday's earnings report. The stock was down 0.3% to $12.86.

Meanwhile, utility services firm Exelon ( EXC) offered to buy NRG Energy ( NRG) for $6.2 billion in an all-stock deal. Exelon inched up 0.2% to $54.59, and NRG soared 29% to $25.

In analyst actions, Goldman Sachs downgraded Intel ( INTC) to neutral from buy, predicting a decline in profit margins. The stock nevertheless rose 3.5% to $16.04.

BlackBerry maker Research In Motion ( RIMM) was suffering after Morgan Keegan reduced its estimates for the company's revenue growth. Shares were down 8.6% to $53.91.

Shifting to economic data, the Conference Board's leading indicators index for September climbed 0.3%, whereas economists had predicted a decline of 0.2%. The August reading was revised to a 0.9% drop.

As for commodities, crude oil added $2.40 to close at $70.25 a barrel. Gold climbed $2.30 to $790 an ounce.

Action Alerts PLUS

Longer-dated U.S. Treasury securities were edging higher. The 10-year was up 24/32 to yield 3.84%, and the 30-year was gaining 1-12/32, yielding 4.24%. The dollar was stronger vs. its major foreign competitors.

Abroad, European exchanges including the FTSE in London and the Dax in Frankfurt traded higher. In Asian markets, Japan's Nikkei and Hong Kong's Hang Seng closed with gains.