(Reuters) - The Nasdaq snapped an 11-day streak of gains on Friday after some late-session weakness, but the S&P 500 and the Dow scratched out record closing highs with slight gains as a year-end rally chugged along.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., December 17, 2019. REUTERS/Brendan McDermid

With only two trading days left for the year, the benchmark S&P 500 has climbed more than 29% so far in 2019, its biggest annual percentage gain since 2013. Trading volume has been thin during the holiday-shortened week and could continue to be sparse through the New Year’s holiday on Wednesday.

“For the most part, the market seems to be in a holding pattern until year-end,” said Rick Meckler, partner at Cherry Lane Investments in New Vernon, New Jersey.

“There has been such strong gains for the year that I think that until the fresh money comes in after year-end for new contributions to IRAs and other retirement accounts to start the year, I just don’t think there is a lot of push to drive this too much higher,” Meckler said.

Data on Friday showed profits at China’s industrial firms grew at the fastest pace in eight months in November, but broad weakness in the country’s domestic demand remains a risk for company earnings next year.

Investor expectations that the United States and China will soon sign a Phase 1 trade deal has added momentum to the stock market heading into 2020.

“You’ve got expectations that the Phase 1 trade agreement is signed in early to mid-January,” said James Ragan, director of wealth management research at D.A. Davidson.

“In a situation where you have got the trade expectation that could help stimulate business spending next year, still low interest rates and the strong consumer. That’s a recipe for equity values to continue to move higher,” Ragan said.

The Dow Jones Industrial Average .DJI rose 23.87 points, or 0.08%, to 28,645.26, the S&P 500 .SPX gained 0.11 points to 3,240.02 and the Nasdaq Composite .IXIC dropped 15.77 points, or 0.17%, to 9,006.62.

Among S&P 500 sectors, consumer staples .SPLRCS, real estate .SPLRCR and utilities .SPLRCU were the top performers. Energy .SPNY and materials .SPLRCM lagged among the sectors.

Aside from optimism over trade relations, the stock market has been lifted by interest rate cuts by the Federal Reserve and better-than-feared economic data and corporate profits.

About 5.2 billion shares changed hands in U.S. exchanges, compared with the 6.8 billion daily average over the last 20 sessions.

Declining issues outnumbered advancing ones on the NYSE by a 1.02-to-1 ratio; on Nasdaq, a 1.52-to-1 ratio favored decliners.

The S&P 500 posted 59 new 52-week highs and no new lows; the Nasdaq Composite recorded 96 new highs and 23 new lows.