Stocks ended up on Thursday and the S&P 500 hit a nine-month high, fueled by strong U.S. economic data and increased hopes for a deal on a Greek bailout next week.

Based on the latest available data, the Dow Jones industrial average <.DJI> was up 123.28 points, or 0.96 percent, at 12,904.23. The Standard & Poor's 500 Index <.SPX> was up 14.84 points, or 1.10 percent, at 1,358.07. The Nasdaq Composite Index <.IXIC> was up 44.02 points, or 1.51 percent, at 2,959.85.

(Reporting By Caroline Valetkevitch; Editing by Kenneth Barry)