President Donald Trump said in a Fox News radio interview that trade talks were scheduled for Thursday "at a different level," but did not provide additional details.
Tariff-sensitive tech stocks jumped 1.84%, boosted by gains in Apple Inc and Microsoft Corp.
Chipmakers, which draw a large part of their revenue from China, also gained, sending the Philadelphia chip index up 2.76%.
"Markets are trading on hopes because they (US and China) are going to be talking and for the time being things aren't getting worse," said Larry Adam, chief investment officer at Raymond James in Baltimore.
Dollar General Corp was the top gainer among S&P 500 companies after its shares rose 10% on upbeat full-year profit forecast.
Wall Street's rise hit a bump earlier in the session after European Central Bank policy maker Klaas Knot was reported to have said that the euro zone economy did not warrant a resumption of bond purchases.
At 12:57 p.m. ET, the Dow Jones Industrial Average was up 348.64 points, or 1.34%, at 26,384.74 and the S&P 500
was up 38.89 points, or 1.35%, at 2,926.83.
The Nasdaq Composite was up 121.62 points, or 1.55%, at 7,978.50.
Still, the three main indexes are on course to log their worst monthly performance since a selloff in May, on fears that tit-for-tat tariffs will drive the global economy into recession.