New York (CNN Business) The Dow and broader stock market rallied again on Friday after US President Donald Trump said the United States and China reached a preliminary trade agreement.

Trump, who met with Chinese Vice Premier Liu He Friday afternoon, called the initial deal "substantial."

Trade has dominated markets once again this week, with stocks rising and falling in lockstep with headlines

Details of the agreement are still emerging , but it includes a halt on US tariff increases. Trump told reporters that intellectual property theft, currency matters and agricultural purchases are also included in the deal.

The president said in a tweet earlier Friday that "good things are happening" at the trade meetings and that "all would like to see something significant happen."

Stocks are sharply higher across the board.

Dow INDU S&P 500 SPX Nasdaq Composite COMP Thesoared more than 500 points at its peak, but pared some of its gains before the close. The index finished 320 points, or 1.2% higher. Theclosed up 1.1%, while thefinished 1.3% higher.

All three indexes are on track for a gain this week, the first in three weeks for the Dow and the S&P 500.

But if anything has been learned throughout the US-China trade negotiations, it's that a tweet or a new headline can change the market's sentiment at the drop of a hat.

"Everyone is kind of narrowing in on this idea that we will get a smaller, partial deal — a phase one deal, if you will — and the worry about the trickier bits later," said Michael Arone, chief investment strategist at State Street Global Advisors.

"Investors always overreact and then they adjust relative to the details. That's what we're seeing here," Arone added.

Some economic data that could have derailed Friday's rally was University of Michigan consumer sentiment, which over the past months showed growing concerns about trade tensions.

But the survey-based index beat expectations, with the negative impact of trade policies weighing on consumers' minds a little less.

"Importantly, the impeachment inquiry has not had a significant negative impact on economic prospect," said Richard Curtin, chief economists of the survey of consumers.

Elsewhere in commodity markets, oil prices are sharply higher after an Iranian oil tanker was hit by two missiles in the Middle East. The missiles were possible fired from Saudi Arabian soil.

Geopolitical tensions in the oil-rich region pushed prices higher on Friday, but have come off their highs. US oil prices settled 2.1% higher at $54.70 a barrel, while the international benchmark, Brent crude, settled 2.4% higher at $60.50 a barrel, according to CME.