(Reuters) - The Nasdaq crossed the 9,000-point mark for the first time on Thursday as all three major Wall Street indexes posted record closing highs, boosted by optimism over U.S.-China trade relations and gains in shares of Amazon.com after a report signaled robust online holiday sales.

Traders returned from the Christmas break to digest comments from Beijing that it was in close contact with Washington about an initial trade agreement, shortly after U.S. President Donald Trump talked up a signing ceremony for the recently struck Phase 1 trade deal.

Cooling U.S.-China trade tensions have fueled the latest leg of Wall Street’s record-setting rally. With just days to go until the year-end, the benchmark S&P 500 is up 29% so far in 2019, which would be its biggest annual percentage gain since 2013.

The Nasdaq posted a record closing high for a 10th straight session, its longest such streak since 1997.

“The path of least resistance is up right now,” said Carol Schleif, deputy chief investment officer of Abbot Downing in Minneapolis. “You have had a lot more clarity on certain things that had worried the market all year.”

Shares of Amazon AMZN.O jumped 4.4% after a Mastercard report showed that U.S. shoppers spent more online during the holiday shopping season than in 2018, with e-commerce sales hitting a record high.

“The important part is that the online sales were much stronger than expected. The brick-and-mortar were less than expected, so the online sales, and principally Amazon, saved the day,” said John Conlon, director, equity strategy at People’s United Advisors.

The Dow Jones Industrial Average .DJI rose 105.94 points, or 0.37%, to 28,621.39, the S&P 500 .SPX gained 16.53 points, or 0.51%, to 3,239.91 and the Nasdaq Composite .IXIC added 69.51 points, or 0.78%, to 9,022.39.

Consumer discretionary .SPLRCD was the biggest gainer among the S&P 500 sectors, spurred by Amazon. Healthcare .SPXHC was the lone sector in the red.

A 0.9% decline in shares of Boeing Co BA.N, which has been dealing with fallout from the grounding of its 737 MAX jet, weighed particularly on the Dow.

The Federal Reserve’s interest rate cuts as well as better-than-feared economic data and corporate profits have helped lift stocks this year along with trade-relations optimism.

A Labor Department report on Thursday showed the number of Americans filing applications for unemployment benefits fell last week in a sign of ongoing labor market strength.

About 4.5 billion shares changed hands in U.S. exchanges, well below the 6.8 billion daily average over the last 20 sessions.

Trading volumes are expected to remain thin during the holiday-shortened week.

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

The S&P 500 posted 37 new 52-week highs and no new lows; the Nasdaq Composite recorded 120 new highs and 27 new lows.