Stocks rose slightly on Tuesday after strong consumer confidence data, but the gains were seen as transient in a volatile market after a 5 percent rally over the past four trading sessions.

The S&P 500 turned positive for the year on Friday, with improving economic data helping to boost equities. The gains, which lifted the benchmark index above its 200-day moving average, were amplified by the light pre-holiday trading.

In the latest economic data, consumer confidence rose more than expected in December, hitting an eight-month high, as Americans grew more upbeat about the labor market and their financial situations.

Once again, the report seems to be heading in the right direction, said Andrew Wilkinson, chief economic strategist at Miller Tabak & Co in New York.

Especially, the improvement in sentiment about the job market continues to support the theory that the labor market is undergoing a healthy rebound.

In company news, Sears Holdings Corp slid 24.4 percent to $34.68 to its lowest in nearly three years. The retailer plans to close 100 to 120 Kmart and Sears stores and said fourth-quarter earnings would fall by more than half from a year ago.

The outlook from Sears dragged on other retailers. JC Penney shares fell 1 percent to $35.33, while Morgan Stanley's retail index slipped 0.5 percent. Sears' stock fell to its lowest since March 2009.

The Dow Jones industrial average <.DJI> was up 25.96 points, or 0.21 percent, at 12,319.96. The Standard & Poor's 500 Index <.SPX> was up 3.02 points, or 0.24 percent, at 1,268.35. The Nasdaq Composite Index <.IXIC> was up 14.42 points, or 0.55 percent, at 2,633.02.

For the year, the Dow is up 6.3 percent and the Nasdaq is down 0.8 percent. The S&P's performance is turning out to be the flattest in more than 40 years. The index is up less than 1 percent, which is its smallest move in either direction since 1970.

Equity markets often benefit from seasonal strength into the end of the year -- a phenomenon known as the Santa Claus rally. The last five days of the year and the first two of January have produced an average 1.6 percent gain for the S&P 500 since 1969, according to the Stock Trader's Almanac.

However, investors have warned about reading too much into the year-end rally. They warn that the outlook for the year ahead is still murky with many of the same problems that dogged markets in 2011 still unresolved.

Lest anyone get too excited, this relatively constructive outlook heading into 2012 represents only a brief reprieve from elevated equity volatility, said Jim Strugger, a derivatives strategist at MKM Partners in a note.

The CBOE Volatility Index VIX <.VIX>, Wall Street's so-called fear gauge, shot up 5.5 percent to 21.87, but traders said the gains were mostly technical after traders adjusted their positions ahead of the three-day holiday.

Now that we are back, market makers are raising volatility, putting premiums into the VIX cash. January futures are in at around $25.50. We are seeing the holiday effect, said Jamie Tyrrell at Group 1 Trading in Chicago.

U.S. single-family home prices fell slightly more than expected in October, according to S&P/Case-Shiller data, coming after better-than-expected data on the sector last week.

MetLife Inc , the largest U.S. life insurer, will sell about $7.5 billion worth of deposits in its MetLife Bank to a General Electric Co unit as it looks to exit the banking business. MetLife rose 1.3 percent to $31.49 while GE lost 0.7 percent at $18.10.

(Reporting By Angela Moon; Editing by Jan Paschal)