Stocks climbed Thursday, hitting record highs as the market rallied into the end of 2019.

The Dow Jones Industrial Average rose 105.94 points, or 0.37%, to 28,621.39, while the S&P 500 climbed 0.51% to 3,239.91. The Nasdaq Composite finished the day 0.78% higher at 9,022.39, topping the 9,000 mark for the first time ever. Three major averages all hit new all-time highs. Amazon led the gains, jumping more than 4% after the e-commerce giant said the holiday shopping season broke all records. Trading volumes remained thin this week.

The S&P 500 notched its 34th record close Thursday. The benchmark has risen 3.1% this month and 8.8% this quarter, bringing the year-to-date gains to 29.2%. The S&P 500 has a good chance at scoring a historic year: It is now less than 1 percentage point from posting the best annual performance since 1997.

"Stocks look like they just wont quit. The rally is for real," Chris Rupkey, chief financial economist at MUFG, said in a note Thursday. "The economy's engines continue to hum."

U.S. weekly jobless claims decreased 13,000 to a seasonally adjusted 222,000 for the week ended Dec. 21, the Labor Department said Thursday. The number is slightly higher than estimates of 220,000 in a Dow Jones poll of economists.

Markets in Europe, Australia and Hong Kong remained closed Thursday for the holiday. Trading volumes were muted in the U.S. with the SPDR S&P 500 ETF Trust (SPY) trading about 24 million shares Thursday, well below its 30-day volume average of 60 million shares.

In a shortened Christmas Eve session Tuesday, the S&P 500 finished flat and Nasdaq rose to another record. The tech-heavy index also posted its ninth consecutive record close for the first time since 1998.

Investors have been adding more risk after the U.S. and China announced they have reached a phase one trade agreement earlier this month. The two countries are in the process of translating the deal, aiming to sign it in early January.

In a regular press briefing on Thursday, the Chinese Commerce Ministry said China is in close touch with the U.S. on signing the initial trade pact. President Donald Trump said Tuesday the deal is "getting done," adding there will be a signing ceremony with Chinese leader Xi Jinping.

Stocks typically get a boost this time of the year during the so-called Santa Claus rally period. In the final five trading days of the year and the first two tradings days of the new year, the S&P 500 has posted a 1.3% gain on average since 1950, according to the Stock Trader's Almanac. This year's period began Tuesday.