Bernanke gave a somber view of the economy, which was echoed by a separate report showing new home sales unexpectedly slumped to a record low in January. But investors were encouraged by the likelihood this will keep rates low. Much of last year's equities rally was driven by ultra-low rates that pushed money into stocks.
The desire to have interest rates stay low is because the outlook is still problematic at best, said Jim Grefenstette, senior portfolio manager of the Federated Mid-Cap Growth Strategies Fund in Pittsburgh, Pennsylvania.
The fear is that the Fed is going to do something that will choke off optimism, and Bernanke told you they're not going to do that. That punch bowl is going to stay at the party for a while.
Sectors hardest hit by Tuesday's selloff rebounded on Wednesday, including financials and technology. Dow component International Business Machines Corp gained nearly 1 percent to $127.56.
The Dow Jones industrial average <.DJI> gained 98.86 points, or 0.96 percent, to 10,381.27. The Standard & Poor's 500 Index <.SPX> rose 10.75 points, or 0.98 percent, to 1,105.35. The Nasdaq Composite Index <.IXIC> climbed 25.66 points, or 1.16 percent, to 2,239.10.
On the Nasdaq, Autodesk Inc jumped 10.5 percent to $28.36 a day after the architectural software maker posted better-than-expected quarterly profit.
Homebuilder stocks tumbled after government data showed sales of newly built single-family homes fell for a third straight month. D.R. Horton Inc was off 1.8 percent to $12.35, pushing down the Dow Jones Home construction index <.DJUSHB> by nearly 1 percent.
Bernanke's testimony before the U.S. House of Representatives Financial Services Committee was his first appearance since the central bank raised the discount interest rate last week. While the move was anticipated, the timing was sooner than expected.
Elsewhere, securities regulators adopted a new rule that restricts short selling in stocks that have fallen more than 10 percent on any given day, more than a year after the financial crisis provoked cries to rein in investors who bet on a stock's decline.
(Editing by Jeffrey Benkoe)