NEW YORK (Reuters) - U.S. stocks edged higher in light trading on Thursday, buoyed by gains in financial stocks and as technology stocks continued to slowly recover from a losing skid.

Tech stocks added 0.1 percent and notched their second straight gain on the heels of a five-session losing skid. The index has struggled somewhat to close out the year but remains the best-performing sector in 2017, up more than 37 percent.

“This needs to and has been an earnings-driven market and that is where you’ve seen a tremendous amount of the earnings momentum and visibility, we would expect that to continue into next year,” said Bill Northey, senior vice president, U.S. Bank Wealth Management, in Helena, Montana.

Apple shares closed 0.3 percent higher after relinquishing earlier gains and Amazon edged up 0.3 percent after Reuters reported the companies are in licensing discussions with Riyadh on investing in Saudi Arabia.

Volumes remained thin due to the holiday week between Christmas and New Year’s Day. The prior two sessions showed the lowest full-day trading volumes of the year.

“Clearly light volume, low volatility has been the flavor of the week, post holiday, and don’t expect that to change going into the close tomorrow,” Northey said.

A 0.6 percent gain in copper prices helped lift the materials sector 0.4 percent, led by a 3.1 percent gain in Freeport-McMoRan.

Slideshow ( 2 images )

The benchmark S&P 500 has climbed nearly 20 percent this year, on track to record its biggest annual gains since 2013, boosted by robust economic growth and solid corporate earnings.

The rally is widely expected to extend into 2018, boosted by gains from a new law that lowers the tax burden on U.S. corporations.

The Dow Jones Industrial Average rose 63.21 points, or 0.26 percent, to 24,837.51, the S&P 500 gained 4.92 points, or 0.18 percent, to 2,687.54 and the Nasdaq Composite added 10.82 points, or 0.16 percent, to 6,950.16.

The number of Americans filing for unemployment benefits was unchanged last week at 245,000, slightly above the 240,000 forecast, but the underlying trend remained consistent with a tightening labor market.

J.B. Hunt Transport lost 0.2 to $115.24 after the logistics services provider forecast current-quarter profit below estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.92-to-1 ratio; on Nasdaq, a 1.51-to-1 ratio favored advancers.

The S&P 500 posted 25 new 52-week highs and two new lows; the Nasdaq Composite recorded 71 new highs and 21 new lows.

Volume on U.S. exchanges was 4.26 billion shares, compared to the 6.6 billion average for the full session over the last 20 trading days.