Stocks rebounded on Tuesday from their worst day of the year after China's central bank indicated it plans to keep its currency at a level stronger than some investors had first feared, easing tensions about the nation using the yuan as a weapon in the trade war.

The Dow Jones Industrial Average closed 311.78 points higher at 26,029.52. The S&P 500 rose 1.3% to 2,881.77, while the Nasdaq Composite climbed nearly 1.4% to 7,833.27. Tuesday's gains helped the Dow snap a five-day losing streak, while the S&P 500 and Nasdaq rose for the first time in seven sessions.

The bounce in equities came after Wall Street's major indexes suffered their worst day of 2019 on Monday, when a peak in trade-related angst between the U.S. and China sent investors in search of safer assets.

Some of the stocks that led Monday's sell-off, such as Apple, Micron Technology and Nike, were among the best-performing stocks on Tuesday. Apple and Micron Technology both gained more than 1.5% while the shoe company advanced nearly 3%.

The newfound optimism came after China's central bank set the yuan's official reference point at stronger than the key 7 yuan-to-the-dollar point. The announcement calmed foreign exchange markets, initially spooked on Monday that the yuan's weakening under the key psychological level could spark a currency feud.

U.S. equity markets saw their worst trading day of 2019 on Monday. The Dow dropped 767 points while the S&P 500 slid nearly 3%. The Nasdaq plunged more than 3% on Monday.

"Going forward, stabilization in the U.S./China trade war is now the most important key to broader market stabilization," said Tom Essaye, founder of The Sevens Report, in a note. "If the escalation continues, that will cause a further pull-back, regardless of what the [Federal Reserve] is going to do. And, I say that because another 25 or 50 basis points of easing by the Fed won't materially offset a protracted and escalating trade war."