The Dow closed its seventh straight day of gains on Tuesday after McDonald's surprisingly strong sales drove confidence in the economic recovery.

Light volume, however, called the rally's strength into question. About 6.90 billion shares traded on the New York Stock Exchange, Nasdaq and Amex stock exchanges.

Energy share weakness limited gains in the S&P 500 and Nasdaq after China, the world's second biggest energy consumer, raised interest rates for the second time in six weeks. The rate hike pressured commodities on fears of lower demand, but had little market impact outside that sector.

The Dow Jones industrial average <.DJI> gained 71.52 points, or 0.59 percent, to 12,233.15. The Standard & Poor's 500 Index <.SPX> gained 5.52 points, or 0.42 percent, to 1,324.57. The Nasdaq Composite Index <.IXIC> gained 13.06 points, or 0.47 percent, to 2,797.05.

(Reporting by Edward Krudy; Editing by Leslie Adler)