Stocks ended sharply higher on Friday as investors were reassured by comments from Federal Reserve Chairman Ben Bernanke on prospects for an economic recovery. Confidence also was helped by stronger-than-expected housing data.

The Dow Jones industrial average <.DJI> rose 155.91 points, or 1.67 percent, to end unofficially at 9,505.96. The Standard & Poor's 500 Index <.SPX> gained 18.76 points, or 1.86 percent, to finish unofficially at 1,026.13. The Nasdaq Composite Index <.IXIC> advanced 31.68 points, or 1.59 percent, to close unofficially at 2,020.90.

For the week, the Dow rose 2 percent, the S&P 500 gained 2.2 percent and the Nasdaq rose 1.8 percent.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)