Investors breathed a sigh of relief Tuesday as stocks rebounded after suffering their worst day of 2019 Monday.

The S&P 500 snapped a six-day losing streak to end the day up 1.3 percent while the Dow Jones industrial average climbed 311.78 points, or 1.2 percent, to end the day near session highs at 26,029.52. The Nasdaq popped 1.4 percent.

Tuesday’s turnaround was spurred by China indicating that it won’t let the yuan fall much below the 7-per-dollar level.

The yuan’s breach of that level Monday — for the first time in 11 years — sent traders into a panic and the Dow down more than 950 points before closing down more than 767 points.

China let the yuan, also known as the renminbi, fall below the psychologically important 7-per-dollar level after President Trump threatened to impose a 10 percent tax on $300 billion worth of tariffs last week. The weaker currency would make Chinese imports cheaper and therefore more desirable.

Investors were cheered by the move — but also just in need of a break, analysts said.

“China fixing the yuan back below 7 was part of today’s move but not all of it,” said Michael Antonelli, managing director at Baird. “Some of the best days occur near the worst days, so I think we just hit a level that made sense to defend.”

With the yuan sinking to an 11-year low against the dollar, Trump accused China of “currency manipulation” — an epithet that was reiterated by the Treasury Department late Monday.

Trump took a different tack Tuesday, highlighting the strength of the US economy.

“Massive amounts of money from China and other parts of the world is pouring into the United States for reasons of safety, investment, and interest rates! We are in a very strong position. Companies are also coming to the U.S. in big numbers. A beautiful thing to watch!” Trump said in a series of tweets.