Stocks edged higher on Thursday, putting the benchmark S&P 500 index on track for its third straight advance after data pointed to ongoing improvement in the labor market and reinforced expectations for a rally into the end of the year.

New claims for jobless benefits hit a 3-1/2-year low last week, bolstering the view the economy was gaining momentum. The stagnant labor market has been a major worry, and recent signs of life have helped lift stock prices.

Ultimately, what you are looking at is an economy here in the United States that is improving relative to the rest of the world, said Kevin Caron, market strategist at Stifel Nicolaus & Co in Florham Park, New Jersey.

Gains fluctuated in what was likely to be another light-volume session just ahead of the holiday season.

Many traders were betting a rally into year-end will turn the S&P 500 positive for the year. The index is up 2 percent this week, after rallying 3 percent on Tuesday, and has cut its losses for the year to just 1 percent.

Also helping equities, U.S. consumer sentiment improved in December to its highest level in six months as Americans felt better about the economy's prospects for the year ahead.

The Dow Jones industrial average <.DJI> gained 39.25 points, or 0.32 percent, to 12,146.99. The Standard & Poor's 500 Index <.SPX> rose 6.81 points, or 0.55 percent, to 1,250.53. The Nasdaq Composite Index <.IXIC> was up 15.49 points, or 0.60 percent, to 2,593.46.

A downward revision in the Commerce Department's figures on third-quarter economic growth had little impact on markets, with investors saying market attention was now focused on the economy's performance in the fourth quarter.

The Commerce Department on Thursday said the economy grew at a 1.8 percent annual pace in the third quarter, down from its prior estimate of 2 percent.

Clearly the year has ramped nicely, based on an improving economic picture, said Phil Orlando, chief equity market strategist at Federated Investors in New York.

Orlando said increased inventory liquidation in the report on gross domestic product showed end-of-market demand remained strong in the fourth quarter.

The double-dip fear the bears were talking about in the second half of the year is off the table at this point, and investors are seeing domestic fundamentals are in pretty good shape, Orlando said.

Recent gains have lifted the S&P 500 above its 50-day moving average, but the index has run into trouble when it sought to move above its 200-day moving average, currently around 1,260. The level has been key for the market this year.

Lower volume as the Christmas and New Year's Day holidays draw closer was leaving the market susceptible to the heightened volatility this week.

Investors warn not to extrapolate a year-end rally into elevated expectations for 2012, because many of the issues that hit market this year, such as slow growth and Europe's debt crisis, are still unresolved.

We still have these same issues that are going to dog us unfortunately in the first half of 2012, said Caron.

Yahoo Inc advanced 1.3 percent to $16.20 after sources said the Internet media group may unload stakes in its prized Asian assets as part of a complicated share transaction.

Micron Technology Inc jumped 16.8 percent to $6.48 as investors looked past the limp quarterly results it reported late Wednesday and focused on a potential 2012 rebound in long-stagnant memory chip demand and prices.

Tibco Software Inc climbed 8.8 percent to $23.93 after the business software maker forecast first-quarter revenue above estimates and said quarterly profit and revenues soared.

American Greetings Corp slumped 23.3 percent to $13.03 after third-quarter profit dropped nearly 40 percent and it said 2012 cash flow would be hurt by higher expenses.

(Reporting By Edward Krudy; Editing by Leslie Adler)