NEW YORK - After a brief stumble, stocks marched higher Tuesday thanks to strong housing data, putting the market on its best two-day winning streak in nearly three months.

The Dow Jones industrial average struggled from the opening bell until just after the release of data showing that existing-home sales unexpectedly rose in December, suggesting that the housing market is steadying after sharp swings caused by a government tax credit.

The blue-chip measure was off about 12 points at its morning low, but rallied steadily from there, ending 111.32 points higher, up 1.1 percent, at 10,296.85.

The Nasdaq composite index was up 0.9 percent. The Standard & Poor's 500 was up 1.3 percent, helped by gains in every sector.

The Dow has risen 2.3 percent over the last two days, its best such run since early November. However, it has recouped less than a third of its point decline from a steep slide that closed January on a sour note.

Short-term investors have welcomed the return of some volatility to the market after a mostly humdrum stretch of trading in the first few weeks of 2010. But the picture remains murkier for long-term investors, who have received a mostly positive run of data on the market's fundamentals lately, tempered by trepidation that weaker-than-expected employment readings, inflation, or other pitfalls may lie ahead.

"The economic data have been getting better and the earnings numbers we've seen have been pretty good, but you always have to keep in mind that you're comparing them to last year," making for easy comparisons to the period when the financial crisis was at its worst, said Alan Valdes of Kabrik Trading.

Adding to the housing-related cheer on Tuesday, builder D.R. Horton posted its first quarterly profit since the housing-market slump. Its shares jumped almost 11 percent as virtually every measure of its business showed improvement, boosted by low mortgage rates, home prices and a federal tax credit.

Still, the market's enthusiasm was tempered ahead of key U.S. jobs data being released this week, with a report on private-sector jobs due Wednesday and the government's release on monthly nonfarm payrolls due Friday.