NEW YORK ( TheStreet) -- U.S. stocks finished with mild gains on Tuesday as investors let improved home price data deflect their attention away from the eurozone debt crisis.

The Dow Jones Industrial Average rose 32 points, or 0.26%, to close at 12,535. The blue-chip index ranged from 12,576 to 12,452 on the day.

The S&P 500 tacked on more than 6 points, or 0.48%, to settle at 1320. The Nasdaq, which lost nearly 2% on Monday, advanced 18 points, or 0.63%, to finish at 2854.

Within the Dow, 18 of the index's 30 components were on the rise, led by JPMorgan Chase ( JPM), Walt Disney ( DIS), McDonald's ( MCD), Exxon Mobil ( XOM), Chevron ( CVX) and General Electric ( GE)

Weak spots among the blue chips included Hewlett-Packard ( HPQ), du Pont ( DD) and IBM ( IBM).

Shares of JPMorgan got a 1.2% lift after Goldman Sachs added the bank to its America's conviction buy list, while removing and downgrading Morgan Stanley ( MS), whose stock was up incrementally.

Consumer non-cyclicals, energy, financials and services were the strongest sectors in the broad market.

The Case-Shiller 20-city home-price index showed that home prices fell by 1.9% in April from a year ago. While still negative, this is an improvement over the 2.6% decline the month before. Economists, on average, thought the index would fall 2.5% from a year ago. Home prices on average increased 1.3% in April, month over month, for the 20-city composite after seven straight months of declines.

This supports the view of Michelle Meyer, senior U.S. economist at Bank of America Merrill Lynch, that national home prices bottomed at the beginning of the year. "However, we do not expect a sustained upturn in prices from here," she said. "Rather, we expect prices to weaken again at the end of the year, as the economy slows and distressed inventory picks up."

"On the whole, this report provides confirmation that the housing sector is finally stabilized and may be on the verge of a rebound, as the supply/demand imbalance continue to move in a more favorable direction," said Millan Mulraine, an economist at TD Securities. While he expects any rebound to remain modest, particularly given the weakening economic growth and labor market momentum in recent months, he also believes that "the foundation has been laid" for a sustained recovery in the coming months.

Meanwhile, the Conference Board said that its U.S. consumer confidence index fell further in June to 62 from a downwardly-revised 64.4 in May. Economists surveyed by Thomson Reuters expected a reading of 63.8 for June.

The Conference Board said that income expectations among consumers, which had improved last month, declined in June, and that if this trend continues, spending could be restrained in the short-term.

Stocks were hammered Monday as investors fled riskier assets on concerns about Europe's ability to address its escalating debt problems.

Europe's leaders are slated to meet on Thursday and Friday at a summit in Brussels to discuss plans to address the region's debt problems and flagging economy.

Ahead of the meeting, Reuters reported that German Chancellor Angela Merkel said that Europe won't share liability for "as long as I live," casting further doubts about the ability of leaders to achieve anything substantial at the summit.

On Tuesday, both Spain and Italy saw their borrowing costs soar at short-term debt auctions as Moody's cut its debt ratings on 28 Spanish banks on growing doubts about the country's ability to support its banks.

Willem Buiter, chief economist at Citigroup, said he thinks that after Spain's still-to-be-finalised euro area bank bail-out, the country could end up entering a troika bailout program -- and that this could happen soon.

After Spain's bank bailout, he also foresees Cyprus or Italy becoming the next euro area countries to apply for a troika bail-out.

Buiter believes that Spain and Italy's need for a sovereign bail-out would be driven by a lack of affordable access to market funding and their lack of credibility in demonstrating a commitment towards fiscal and structural reform.

Conditions for these bailout programs, said Buiter, would most likely include the countries undergoing fiscal and structural reforms. They would also like aim to retain partial market funding access for Italy and Spain, relying on a mix of European Central Bank-subsidized funding and financial repression to ensure the take-up of residual government funding needs by domestic banks and other financial institutions.

He also said that Spain or Italy may be able to access one of the precautionary European Financial Stability Facility or European Stability Mechanism programs, but that they would likely come with conditions.

"Any program would require a request from Spain or Italy and unanimous non-objection by the Eurogroup," he said.

Right now Buiter thinks it's unlikely that Italy or Spain would meet the conditions for a precautionary International Monetary Fund program, but thinks that the IMF could contribute to the funding of a 'normal' troika program.

Both the FTSE in London and DAX in Germany finished flat.

German market research group GfK predicted Tuesday that its consumer sentiment index for Germany will improve in July for the first time in five months, rising to 5.8 from 5.7 in June, as an improvement in income expectations helped offset some worries about the economic impact of the eurozone turbulence.

August crude oil futures rose 15 cents to settle at $79.36 a barrel. August gold futures lost $13.50 to settle at $1,574.90 an ounce.

The benchmark 10-year Treasury slipped 7/32, raising the yield to 1.630%, while the greenback was down 0.08%, according to the dollar index.

News Corp. ( NWSA) is considering splitting into two companies, separating its smaller publishing business from its entertainment businesses, The Wall Street Journal reported, citing people familiar with the situation.

The split would carve off such assets as 20th Century Fox film studio, Fox broadcast network and Fox News channel from News Corp.'s newspapers, book publishing assets and education businesses. News Corp. owns the Journal.

A final decision on the split hasn't been made, according to the Journal. News Corp. Chairman Rupert Murdoch has previously opposed such a move, but has recently warmed to the idea, said one person familiar with the situation. Shares surged more than 8% on in excess of three times normal volume.

Facebook ( FB) named Sheryl Sandberg, the social-networking company's No. 2 executive, to its board. Sandberg, Facebook's chief operating officer, is the eighth member of the company's board and its first woman. The stock added 3.2%.

Shares of LDK Solar ( LDK) finished down more than 6% after the company posted a wider than expected quarterly loss as sales fell more than 70% year-over-year.

Apollo Group ( APOL), the operator of the University of Phoenix, reported fiscal third-quarter adjusted earnings Monday of $1.20 a share on revenue of $1.13 billion, beating analysts' estimates of a profit of 97 cents a share on revenue of $1.12 billion. The stock jumped 10.3% on Tuesday.

Biopharmaceutical company Celgene ( CELG) was raised to outperform from neutral by Cowen. Celgene shares gained more than 3.3%.

-- Written by Andrea Tse in New York.

>To contact the writer of this article, click here: Andrea Tse.