Stocks racked up a fourth straight week of gains on Thursday, as investors expected optimism about the economic recovery to support equities through year-end.

The Dow Jones industrial average <.DJI> was up 14.00 points, or 0.12 percent, at 11,573.49. The Standard & Poor's 500 Index <.SPX> was down 2.07 points, or 0.16 percent, at 1,256.77. The Nasdaq Composite Index <.IXIC> was down 5.88 points, or 0.22 percent, at 2,665.60.

But for the week, the Dow rose 0.7 percent, the S&P gained 1 percent and the Nasdaq was up 0.9 percent.

(Reporting by Angela Moon, Editing by Leslie Adler)