New York CNN Business  — 

Stocks ended Friday mostly flat after Chinese officials said that a phase one deal had been reached with the United States that would avert an escalation of the trade war and higher tariffs set to kick in on Sunday. President Trump confirmed the news in a series of tweets.

It was a choppy day of trading though, with stocks powering ahead shortly after the open before pulling back after all the news was released.

The Dow initially rose more than 150 points and hit a new intraday all-time high in the process but wound up finishing the day with just a 3 point gain. That followed a more than 220 point jump Thursday on reports that a tentative trade agreement had been reached.

The S&P 500 and Nasdaq both posted modest gains Friday, allowing them to finish the day at new record highs.

China’s Commerce Ministry held a press conference Friday to discuss the progress in the trade talks. President Trump then took to Twitter to declare that “a very large Phase One Deal with China” had been reached.

“They have agreed to many structural changes and massive purchases of Agricultural Product, Energy, and Manufactured Goods,” the president tweeted. He added that existing tariffs will remain in place though, but that the “penalty tariffs” will not be imposed.

“We will begin negotiations on the Phase Two Deal immediately, rather than waiting until after the 2020 Election,” Trump concluded.

United States Trade Representative Robert Lighthizer added in a statement that the deal “achieves meaningful, fully-enforceable structural changes and begins rebalancing the U.S.-China trade relationship.”

But Trump’s tweets about the deal came shortly after he appeared to throw cold water on the reports of a trade truce by tweeting earlier Friday that a story in “The Wall Street Journal” about rolling back tariffs was “completely wrong.”

Stocks enjoyed a winning week as optimism that a deal to avoid the December 15 deadline for higher tariffs would be reached have lifted the sentiment on Wall Street.

“No matter what holiday you celebrate, I think most people had a trade deal on their wish list. This bodes well for business confidence and business investment heading into the new year,” said Adam Phillips, director of portfolio strategy with EP Wealth Advisors.

But Phillips added that a phase 2 deal might be tougher to hammer out, especially as Trump may have to deal more with distractions from a possible impeachment.

Investors seemed to brush off a report from the US government Friday morning that showed a smaller jump in retail sales than expected in November as consumers were gearing up to shop for the holidays.

Vincent Reinhart, chief economist at Mellon, said that this slowdown might have been due to the fact that it took so long for the United States and China to reach an agreement.

“It took too long to get to phase one and there was some slowing in manufacturing that bled into services and consumer spending,” Reinhart said.

“The chief benefit of the deal is that we rule out dong something that would be detrimental to the economy in short order. A trade shock would bleed into the economy if it lasted,” he added.

Still, the fact that the Federal Reserve has cut interest rates three times this year and has signaled that it is likely to keep rates steady for the foreseeable future could boost consumer confidence and help lift spending next year, Reinhart said.

Adding to the optimism? The resounding win for British Prime Minister Boris Johnson’s Conservative Party in the United Kingdom’s general election Thursday clears up some lingering doubts about Brexit.

The UK is now firmly on track to officially leave the European Union by the end of January. Stocks in the UK rallied on the news, as did the British pound.