All three major averages are on pace for their second straight week of gains.
In economic news, the consumer price index edged up 0.1 percent in May, the cost of food was offset by cheaper gasoline, the government said.
Crude oil prices and the yield on the 10-Treasury closed relatively unchanged: $53.28 per barrel and 2.15 percent, respectively.
The Dow Jones Industrial Average has now been up six days, it's longest winning streak in 13 months.
After six down weeks for the Dow, and four in a row for the S&P 500 and Nasdaq, the major averages were finally on pace for some solid gains this week.
The Dow Jones Industrial Average was on pace for the longest winning streak in almost three months.
Stocks secure another winning session.
The S&P 500 posts best day of the year.
Stocks little changed but trade war fears linger, bond yields fall again
Stocks, U.S. Treasury yields and crude oil all fell as investors ponder length of trade war.
The Dow Jones Industrial Average and S&P 500 closed with their first gain in three sessions.
Another tough week for US investors.
The Chinese report reversed positive investor sentiment that stemmed from President Trump saying late Tuesday on Twitter that a U.S.-China trade deal could be possible soon.
Remember: We have the leverage. China buys more from us than we buy from them. We are their No. 1 customer at over a half- trillion dollars a year.
Ride-hailing firm Uber’s stock rose.
All three major indexes turned positive late in the session.
Shortly before the opening bell, Trump tweeted that China's vice premier is coming to the U.S. "to make a deal," and Sanders repeated that message shortly before noon.
The Dow, which at one point was down more than 600 points, and S&P 500 had their biggest drop since Jan. 3.
"What could possibly go wrong?"
Despite fears that President Trump's tariff threat would cause China to cancel this week's talks, the meetings remain on track, according to published reports.