Stocks ended higher on Tuesday as upbeat data on sales of previously owned U.S. homes lifted hopes for an economic rebound.

The Dow Jones industrial average <.DJI> gained 19.19 points, or 0.22 percent, to end unofficially at 8,740.63. The Standard & Poor's 500 Index <.SPX> rose 1.91 points, or 0.20 percent, to end unofficially at 944.78. The Nasdaq Composite Index <.IXIC> added 8.12 points, or 0.44 percent, to end unofficially at 1,836.80.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)