U.S. stocks extended gains on Thursday after data showed pending sales of previously owned homes rose unexpectedly in July, while factory orders edged up.

The Dow Jones industrial average <.DJI> added 22.33 points, or 0.22 percent, to 10,291.80. The Standard & Poor's 500 Index <.SPX> gained 4.93 points, or 0.46 percent, to 1,085.22. The Nasdaq Composite Index <.IXIC> put on 9.12 points, or 0.42 percent, to 2,185.96.

(Reporting by Leah Schnurr; editing by Jeffrey Benkoe)