The Dow managed to snap a two-day losing streak — but just barely. The index finished a mere 2 points in the green. That was after opening the day lower and swinging up some 150 points at its highest point during trading.

Theandclosed 0.2% and 0.3% down, respectively, after spending much of the day in positive territory.

Uncertainty over US-China trade led stocks up and down in a rocky trading session. Stocks turned green after White House Press Secretary Sarah Sanders told reporters that China had informed the administration that the country wants to make a trade deal with the United States. Stocks swung lower again after reports that China is considering countermeasures to the US tariff move.

Just before Wednesday's market open, President Donald Trump tweeted that China's Vice Premier Liu He was coming to the United States to "make a deal". Stock futures bounced higher on the tweet.

Liu's scheduled trip to the United States had been a glimmer of hope for investors this week, suggesting that trade negotiations could still advance to avoid a fully fledged trade war between the world's two largest economies.

Trade concerns led stocks sharply lower Tuesday. It was the worst day for US stocks since January 3, when Apple announced it wouldn't meet its earnings forecast due to lower iPhone sales in China . The Dow fell more than 600 points at one point and slipped below 26,000 points for the first time since March 29. The Nasdaq dropped below 8,000 points for the first time since April 18.

Shares in the technology and industrials sector have been hit particularly hard this week, because of the industries' inherent global nature. Companies rely on global trade for materials, parts and to sell to their end markets.

Shanghai Composite Index SHCOMP European stocks were mixed on Wednesday, with all major indexes turning higher after Trump's tweet. Asian markets closed broadly lower, with China'sfinished down 1.1%.

This week's global selloff in stocks came after the United States made new threats to impose additional tariffs on Chinese imports. That led investors to believe that a market-positive outcome from the trade talks between the US and China was further off than previously believed — and might not lead to a deal at all.

On Sunday, President Donald Trump tweeted that existing tariffs on Chinese goods could be upped to 25% from 10% currently. Treasury secretary Steven Mnuchin and US trade representative Robert Lighthizer confirmed that higher tariffs would be possible by Friday in comments late Monday.

The global stock market declines inspired comparisons of the last big stocks selloff in December. Then, the market was still pricing in more risk of a slowdown in global and perhaps also US growth. But the US economy is chugging along nicely, as the 3.2% first quarter GDP growth proved.