The S&P 500 broke through its 200-day moving average on Friday after turning positive for the year as a four-day rally lifted stocks following a spell of better-than-expected economic data.

The Dow Jones industrial average <.DJI> gained 61.12 points, or 0.50 percent, to 12,230.77. The Standard & Poor's 500 Index <.SPX> rose 6.20 points, or 0.49 percent, to 1,260.20. The Nasdaq Composite Index <.IXIC> put on 7.85 points, or 0.30 percent, to 2,607.30.

(Reporting by Edward Krudy)