"The fear I have is that it's still a trader's market," said Steven Stahler, president of The Stahler Group. "You've got a lot of activity ... but not real legs."
Shares of major homebuilders surged after the home price data. Hovnanian Enterprises. jumped more than 6%, adding 28 cents to $4.57, while Lennar rose 40 cents, or 2.8%, to $14.97.
Financial stocks rebounded after sagging on Monday in response to a downbeat analyst's report. Bank of America rose 40 cents, or 2.3%, to $17.75. PNC Financial Services rose 91 cents, or 2.2%, to $42.02.
Retailers also rose. Shares of Big Lots soared more than 6%, adding $1.57 to $25.60 after its second-quarter results beat analysts' expectations and the discount retailer raised its full-year earnings forecast. Best Buy jumped $1.10, or 3.07%, to $36.91.
Bond prices came off earlier lows and moved slightly higher after an auction of $42 billion in two-year notes was met with adequate demand. The Treasury Department is issuing a total of $197 billion in debt this week, and investors have been worried that with so much supply flooding the market, demand would slump and force the government to raise the interest it pays to lure buyers.
The yield on the benchmark 10-year Treasury note dipped to 3.45% from 3.48% late Monday. The yield on the two-year note was unchanged at 1.03%.
The dollar mostly fell against other major currencies, while gold prices rose.
The gains in the U.S. came amid mixed trading in overseas markets. Japan's Nikkei stock average fell 0.8%. Britain's FTSE 100 rose 0.4%, Germany's DAX index rose 0.7%, and France's CAC-40 gained 0.8%.