New York CNN Business  — 

US stocks raced to record highs Thursday on news that the United States and China reached a tentative trade deal. Earlier in the day, President Donald Trump said that an agreement was “very close.”

“They want it, and so do we,” Trump said in a tweet.

The news fueled hopes that the trade spat between the world’s two largest economies may finally come to an end. The S&P 500 (SPX) and Nasdaq Composite (COMP) jumped nearly 1% and closed at all-time highs. The Dow (INDU) climbed more than 300 points at its best, before pulling back again. The index finished up 221 points, or 0.8%.

US and Chinese negotiators have agreed in principle to the “phase one” trade deal, a person familiar with the matter told CNN. Trump still needs to sign off on the plan before it’s final.

The next round of US tariffs on Chinese imports is due to take effect on Sunday, December 15. American and Chinese negotiators are working to delay them, The Wall Street Journal reported earlier this week.

Trade headlines have had markets in a chokehold all year.

“The key point is that we’re in a world of binary outcomes,” Fabiana Fedeli, head of fundamental equities at Robeco, told CNN Business. “Will we have an escalation of the trade war, or not?”

If a deal finally comes together, it might not be perfect, Fedeli said, but it would remove uncertainty for investors and businesses. Companies that have delayed spending could again plan for the future, and orders would likely go up. All this would be a positive tailwind for earnings.

But there’s still reason to take Trump’s Thursday’s tweet with a grain of salt.

“If you ask me, compared to maybe two months ago, I’m a little more certain there will be some sort of deal,” Fedeli said. But in the age of tweeting politicians “the fundamentals can change with 140 characters.”