Stocks extended gains on Wednesday, with the S&P and Nasdaq rising more than 1 percent after comments from Fed Chairman Ben Bernanke encouraged investor optimism.

The Dow Jones industrial average <.DJI> gained 92.96 points, or 0.94 percent, to 10,032.94. The Standard & Poor's 500 Index <.SPX> gained 11.61 points, or 1.09 percent, to 1,073.61. The Nasdaq Composite Index <.IXIC> gained 27.46 points, or 1.26 percent, to 2,198.02.

(Reporting by Chuck Mikolajczak; editing by Jeffrey Benkoe)