The Nasdaq rose on Wednesday after solid earnings from Micron Technology and Red Hat, but an unexpected drop in new home sales limited gains on the broader market.

Red Hat Inc gained 4.8 percent to $31.30 following third-quarter results that beat expectations, and Micron Technology Inc climbed 5.6 percent to $9.94 after posting its first quarterly profit in nearly three years.

Technology is really carrying the way, said Keith Springer, president of Capital Financial Advisory Services in Sacramento, California.

The consensus is regardless of what the economy does, this group will be the beneficiary. They were the ones that leaned down the fastest when the market crumbled last year.

The Dow and S&P 500 were little changed as gains in resource shares were tempered by data that showed new home sales dropped 11.3 percent, sinking to a seven-month low in November.

A recovery in the housing market is considered crucial if the U.S. economy is to sustain its rebound from a severe recession. Home improvement chain Home Depot Inc shed 1.2 percent to $28.92 and was one of the Dow's worst drags.

The Dow Jones industrial average <.DJI> added 9.07 points, or 0.09 percent, to 10,474.00. The Standard & Poor's 500 Index <.SPX> put on 2.83 points, or 0.25 percent, to 1,120.85. The Nasdaq Composite Index <.IXIC> gained 15.62 points, or 0.69 percent, to 2,268.29.

Volume was light on the last full trading day before the Christmas holiday. The New York Stock Exchange will close at 1:00 p.m. EST on Thursday and will be closed on Friday.

Energy stocks moved higher, as U.S. oil futures jumped 2.8 percent to $76.50 per barrel after data showed U.S. crude oil inventories fell more than expected last week as imports declined.

The PHLX Oil Service index <.OSX> shot up 1.8 percent, lifted by Schlumberger Ltd , which rose 2.4 percent to $65.50. Barclays Capital raised its rating on shares of the oilfield services company to overweight from equal-weight.

The dollar lost 0.5 percent against a basket of major currencies <.DXY>, lifting exporters like Caterpillar Inc , which was up 1 percent at $58.41, and helped limit declines in the Dow and the S&P 500.

Rounding out the day's data, the final December reading on consumer sentiment from the Reuters/University of Michigan surveys and November personal spending both came in weaker than expected.

(Editing by Jeffrey Benkoe)