Stocks closed at record highs Thursday after sources told CNBC a so-called phase one trade deal between the U.S. and China has been agreed to in principle.

President Donald Trump tweeted earlier in the day that China and the U.S. were zeroing in on a trade deal, lifting hope that an agreement will be reached before a key deadline.

The Dow Jones Industrial Average traded 202 points higher, or 0.7 percent. The S&P 500 also gained 0.7 percent, while the Nasdaq Composite traded 0.5 percent higher. Thursday marked the first time since Nov. 27 that stocks hit record highs. At their session highs, the major averages were all up at least 1 percent.

U.S. negotiators have the terms of the deal ready for Trump’s review. CNBC confirmed reports from earlier in the day that said U.S. negotiators are offering to cancel new China tariffs and reduce existing levies on Chinese goods by up to 50 percent on $360 billion worth of imports. The latest trade news comes ahead of a key Sunday deadline. If an agreement is not reached by Sunday, additional U.S. levies on Chinese products will take effect.

Trump said in a tweet both sides were getting “VERY close to a BIG DEAL with China. They want it, and so do we!”

Getting VERY close to a BIG DEAL with China. They want it, and so do we! — Donald J. Trump (@realDonaldTrump) December 12, 2019

Trump's tweet comes after Reuters reported that the president was meeting with his top trade officials on Thursday, ahead of a Sunday trade deadline. If an agreement is not reached by then, additional U.S. levies on Chinese products will take effect.

Reports from Bloomberg News and The Wall Street Journal suggested earlier in the week that the U.S. could delay those additional tariffs. However, National Economic Council Director Larry Kudlow said Tuesday the charges were “still on the table.”

Stocks started December on the wrong foot as worries around U.S.-China trade relations increased. In the first two sessions of the month, the Dow lost more than 500 points.

The world’s two largest economies have imposed tariffs on billions of dollars’ worth of one another’s goods since the start of 2018, battering financial markets and souring business and consumer sentiment.

Still, the major averages are up sharply for the year. The S&P 500 and Dow have jumped 25.3 percent and 19.7 percent, respectively, year to date. The Nasdaq is up around 30 oercent.

Next year, however, should be tougher on Wall Street, CalSTRS CIO Christopher Ailman said.

“It will be choppy,” Ailman told CNBC’s Brian Sullivan in an interview that aired Thursday. “This is going to be another election year. Remember 2016? That was a really hard year where the market slugged it out to generate a positive return. We may have that kind of year because of all the rhetoric we’re going to hear.”