U.S. stocks traded slightly lower on Tuesday after mixed economic data on consumer confidence and home prices.

Stocks, which had opened in positive territory, briefly turned negative after the Conference Board's Consumer Confidence Index fell short of Wall Street expectations. For details,

But the major indexes regained ground, led by home construction shares that got a boost from stronger-than-expected readings on home prices for July

Now it seems like expectations have gotten ahead of where the economy is at, so we are starting to see ... certainly a majority of data that are beneath expectations. That's going to weigh on the market, said Stephen Massocca, managing director at Wedbush Morgan in San Francisco.

The Dow Jones US Home Construction Index <.DJUSHB> gained 1.4 percent on an improved S&P/Case-Shiller home price index reading, suggesting the domestic housing market was bottoming out.

D.R. Horton Inc rose 1.6 percent to $11.96, while Toll Brothers Inc gained 1.4 percent to $20.24. Beazer Homes USA Inc gained 1.2 percent to $5.96.

The Dow Jones industrial average <.DJI> was down 6.95 points, or 0.07 percent, at 9,782.41. The Standard & Poor's 500 Index <.SPX> was up 0.71 points, or 0.07 percent, at 1,063.69. The Nasdaq Composite Index <.IXIC> was down 1.40 points, or 0.07 percent, at 2,129.34.

Walgreen Co , which reported quarterly results before the bell, rose 11 percent at $38.02.

U.S. stocks rallied on Monday, snapping a three-day losing streak, as a spurt of corporate takeovers in the technology and health-care sectors fueled optimism about share values.

The Dow Jones industrial average marked its biggest one-day point and percent gain since August 21 and held an advance of about 16 percent in the quarter so far, its best such period since the fourth quarter of 1998.

But the end of the third quarter on Wednesday may spur volatility as fund managers engage in what is known as window dressing -- the sale of laggard stocks in favor of outperformers to spruce up portfolios at quarter's end.

CIT Group Inc shares rose 13 percent $1.89 on a report that hedge fund manager John Paulson was considering merging the troubled U.S. finance company with failed mortgage lender IndyMac Federal Bank . (Editing by Padraic Cassidy)