U.S. stocks pushed ahead on Tuesday after strong housing and consumer confidence data briefly sent indexes to 2009 highs, and investors were relieved about Ben Bernanke's renomination as Fed chairman.

Consumer confidence increased more than expected in August, the Conference Board said, while the S&P/Case-Shiller home price index rose in June for a second straight month.

A rebound in home prices and stronger consumer spending are deemed critical for the U.S. economy to bounce back from its worst recession in decades.

Financial shares ranked among the top gainers, with Prudential Financial

up 4.3 percent at $51.57 and JPMorgan Chase & Co up 2.3 percent at $43.99. The KBW insurance index <.KIX> rose 2.5 percent.

The market got a boost from the housing and confidence data according to Joe Saluzzi, co-manager of trading at Themis Trading in Chatham, New Jersey.

But after a 50 percent rally off the lows, you'd expect to see housing improving at this point. Otherwise, what was the rally all about? he said.

He said Bernanke's nomination was expected and a change in direction would have sent stocks tanking.

The Dow Jones industrial average <.DJI> rose 80.11 points, or 0.84 percent, to 9,589.39. The Standard & Poor's 500 Index <.SPX> gained 8.50 points, or 0.83 percent, to 1,034.07. The Nasdaq Composite Index <.IXIC> added 15.27 points, or 0.76 percent, to 2,033.25.

The broad S&P 500 index briefly hit a 10-month intraday high, and is on track for its sixth straight monthly gain.

Shares of homebuilders rose on the upbeat housing data, with DR Horton , up 4.7 percent at $13.26. It led the Dow Jones U.S. home construction index <.DJUSHB> up 4.1 percent.

U.S. President Barack Obama nominated Bernanke for a second term as Fed chairman, saying he approached a financial system on the verge of collapse with calm and wisdom.

In other economic news, official forecasts said the U.S. national debt will nearly double over the next 10 years.