U.S. stocks rose on Tuesday as economic data and the renomination of Federal Reserve chief Ben Bernanke reassured investors and offset concerns about red ink in the federal budget.

The Conference Board's August index of consumer confidence

topped economists' forecast, while the S&P/Case-Shiller home price index rose for a second consecutive month in June, suggesting a recovery in two sectors crucial to a rebound in U.S. economy.

The consumer data and earnings news helped drive retail stocks higher. Women's clothing retailer Chico's FAS Inc , which reported solid results, gained 7.6 percent to $12.79, and close-out retailer Big-Lots Inc , rose 6.5 percent to $25.60.

Macy's Inc was up 3.5 percent at $15.85 and the broader S&P Retail Index <.RLX> gained 1.8 percent.

The missing ingredient has been the recovery in consumer spending. The market is now hopeful that the strong consumer confidence data could lead to better consumer spending numbers, said Keith Springer, president of Capital Financial Advisory Services in Sacramento.

Home builders' shares rose, with Lennar Corp up 2.8 percent at $14.97 and KB Home up 3.3 percent at $18.08.

Pulte Homes Inc
, the biggest U.S. builder, rose 3.5 percent to $13.06. The Dow Jones U.S. Home Construction index <.DJUSHB> gained 3 percent.

The Dow Jones industrial average <.DJI> advanced 30.01 points, or 0.32 percent, to 9,539.29. The Standard & Poor's 500 Index <.SPX> gained 2.43 points, or 0.24 percent, to 1,028.00. The Nasdaq Composite Index <.IXIC> rose 6.25 points, or 0.31 percent, to 2,024.23.

The three major indexes closed at 2009 highs, although they were off the year's intraday highs reached after the stronger-than-expected economic data. But in a repeat of Monday's action, the rally cooled somewhat in the afternoon.

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

A drop in oil prices weighed on energy shares. Exxon Mobil helped limit the Dow's gains.

Investors welcomed President Barack Obama's decision to keep Bernanke as Fed chairman.

Bernanke has put his policies in place and now (with the reappointment), the market is reassured that he will unwind the policies in a timely manner. It's good to know that someone else won't come in and change everything, said Kim Caughey, senior equity research analyst at Fort Pitt Capital Group in Pittsburgh.

The positive news overshadowed government forecasts that the U.S. national debt will nearly double over the next 10 years due to a slow recovery from the worst recession since the 1930s, and higher spending on retirement and medical benefits.

On the downside, energy shares dragged on the market with U.S. front-month crude oil retreating 3 percent, or $2.32, to settle at $72.05 a barrel after a recent rally.

Exxon Mobil's stock slid 0.9 percent to $70.68, while Murphy Oil Corp shed 2.6 percent to $59.11.

Volume was light on the New York Stock Exchange, with 1.14 billion shares changing hands, below last year's estimated daily average of 1.49 billion.

On the Nasdaq, about 1.95 billion shares traded, also below last year's daily average of 2.28 billion.

Advancing stocks outnumbered declining ones on the NYSE by a ratio of about 3 to 2. On the Nasdaq, about seven stocks rose for every six that fell.

(Editing by Jan Paschal)