Stocks jumped on Monday after President Donald Trump said China is ready to come back to the negotiating table following a phone call Sunday.

The Dow Jones Industrial Average closed 269.93 points higher, or 1.1% to 25,898.83. The S&P 500 climbed 1.1% to 2,878.38 while the Nasdaq Composite advanced 1.3% to close at 7,853.74.

"There is a little sense of optimism that the U.S. and China could restart talks, but at the same time you also have some hesitation," said Yousef Abbasi, director of U.S. institutional equities at INTL FCStone. He also noted trading volumes were lower than usual. Lower volumes can sometimes lead to volatile moves in markets.

Speaking to reporters at the Group of Seven (G-7) meeting in Biarritz in France Monday, Trump said the two countries would start talking very seriously.

"China called last night our top trade people and said 'let's get back to the table' so we will be getting back to the table and I think they want to do something. They have been hurt very badly but they understand this is the right thing to do and I have great respect for it. This is a very positive development for the world," Trump said.

Semiconductor stocks such as Micron and Advanced Micro Devices gained 1.1% and 2.5%, respectively. Apple led the Dow, rising 1.9%.

However, Global Times Editor-in-Chief Hu Xijin said in a tweet that negotiators from both countries did not talk over the phone, adding: "The two sides have been keeping contact at technical level, it doesn't have significance that President Trump suggested. China didn't change its position. China won't cave to US pressure."

Tweet

The latest news on the U.S.-China trade front come after Trump said on Friday the U.S. will raise tariffs on $250 billion worth of Chinese goods to 30% from 25%. Tariffs on another $300 billion in Chinese products will also go up to 15% from 10%, he said. Stock futures initially fell overnight on Trump's comments before rebounding.

Trump's comments and tweets came after China unveiled new tariffs Friday on $75 billion worth of U.S. products, including autos. Trump had also ordered on Friday that U.S. companies move their Chinese operations elsewhere, sending U.S. stocks tumbling.

The major indexes all fell more than 2% on Friday, with the Dow Jones Industrial Average losing 623.34 points. Those declines wiped out the weekly gains the averages had built through Thursday's close. After Friday's session, the Dow ended down 1% for the week, while the S&P 500 and Nasdaq Composite concluded the week down 1.4% and 1.8%, respectively. Last week also marked the indexes' fourth straight weekly loss, their longest since May.

For August, the major indexes are all down more than 3% as U.S.-China trade tensions rise. Safe-haven assets like gold, silver and long-dated Treasurys are all up sharply month to date. The SPDR Gold Trust is up 8.2% while the iShares Silver Trust has climbed 8.6%. The iShares 20+ Year Treasury Bond ETF (TLT) has surged nearly 10%.

"It seems like gold, silver, and bonds, whenever they're down, it seems like buyers are coming back into those," said Christian Fromhertz, CEO of The Tribeca Trade Group. "Equities are acting a little bit differently. It feels like a more sell-the-rip action in equities because people are a bit nervous."

"People are worried about the trade war and what that's going to affect," he said.

China and the U.S. have been engaged in a trade war since last year. The economic conflict has dampened economic and corporate earnings growth expectations as investors and companies weigh its impact on the global economy. The U.S. and China are the world's largest economies.

"The ongoing Trade War is redrawing global supply chains, claiming casualties in the process," Julian Emanuel, chief equity and derivatives strategist at BTIG, said in a note. "As persistent headwinds intersect with traditional seasonal softness, recent volatility can be expected to continue in the near term as markets await policy developments."

The trade war is taking place against a backdrop of softening economic growth. Germany's manufacturing sector is contracting while China's economy grew at its slowest pace in nearly three decades in the second quarter.

The U.S. bond market has also flashed a recession signal recently. The 10-year Treasury yield has dipped below its 2-year counterpart. This phenomenon is known as a yield-curve inversion. Experts fear it because it has historically preceded recessionary periods.

—CNBC's Elliot Smith, Eustance Huang, Michael Bloom and Chris Hayes contributed to this report.

Subscribe to CNBC on YouTube.