The Nasdaq Composite Index closed above 9,000 points for the first time Thursday amid optimism about U.S.-China trade relations and on news that U.S. holiday shoppers spent more online in 2019 than at any other time in history.

The tech-heavy Nasdaq was up 0.8%, to close at 9,016.

The index was near the mark on Christmas Eve, when it closed at 8,945.75.

The Dow Jones Industrial Average gained 106 points Thursday, or 0.4% to 28,621.39, while the S&P 500 climbed 0.5% and also reached a record high of 3,239.91.

Amazon was leading the year-end gains after MasterCard showed the e-commerce giant grew nearly 3% thanks to a record-breaking Christmas shopping season.

Wall Street overall has been piling up records as the market barrels toward the end of 2019.

The Nasdaq has seen nine straight record closes for the first time since 1998. The index extended its overall winning streak to 11 days.

According to Barron's, the rise is a sign of how much big tech stocks are loved by investors. The two biggest stocks on Nasdaq — Apple and Microsoft  — have gained 83% and 56%, respectively, in 2019.

The gains for the S&P 500 are up to 29% on the year after rising 2.9% this month and 8.6% this quarter.

In another good sign, a report released Thursday by the Labor Department showed a drop in the number of Americans who filed for unemployment benefits last week, indicating a solid labor market.

As traders returned from the Christmas holiday, China reaffirmed that it was in close contact with Washington about the new trade pact, which is expected to be finalized in early January.

President Donald Trump on Tuesday confirmed the agreement would be formalized at a signing ceremony, but he did not disclose a date or location, according to Reuters news agency.

— Information from The Associated Press was used to supplement this report.