The resurgence of trade tensions between the United States and China, along with contradictory color commentary from President Trump, whipsawed stock markets again Thursday.

The S&P 500 notched its fourth straight daily decline, though the benchmark index pared its worst losses after President Trump suggested a trade deal could still be within reach, adding that he had received a “beautiful letter” from Chinese President Xi Jinping and may speak to Chinese leader on the phone.

The comments helped the S&P 500 regain some ground, to close down 0.3 percent Thursday, after having fallen as much as 1.5 percent earlier in the day.

The benchmark index has dropped 2.5 percent this week and is on course for its worst weekly performance of the year. This is the worst stretch for stocks since early March, when an employment report showing a sharp slowdown in hiring prompted a growth scare and sent stocks down for five consecutive days.