The broad S&P 500 index closed its best week in eight on Friday after recent economic data, including a stronger-than-expected labor market report, bolstered optimism that the economy would not fall back into recession.

The Dow Jones industrial average <.DJI> climbed 127.83 points, or 1.24 percent, to end unofficially at 10,447.93, marking a move back into the black for the year. The Standard & Poor's 500 Index <.SPX> jumped 14.41 points, or 1.32 percent, to finish unofficially at 1,104.51. The Nasdaq Composite Index <.IXIC> gained 33.74 points, or 1.53 percent, to close unofficially at 2,233.75.

For the week, the S&P 500 gained 3.8 percent, while the Dow and the Nasdaq both closed their best week in six. The Dow gained 2.9 percent for the week, while the Nasdaq advanced 3.7 percent.

(Reporting by Rodrigo Campos; Editing by Jan Paschal)