- The Dow Jones industrial average closed 230.94 points, rallying more than 700 points from its session low.
- Earlier in the session, the major averages fell sharply after China announced new tariffs that target up to $50 billion in U.S. goods, increasing worries that a trade war could take place in the near future.
- "The emotional tape presents investors with a buying opportunity," notes one analyst.
After a wild session on Wednesday, stocks closed sharply higher as Wall Street erased massive losses earlier that came after China's announcement of new tariffs on U.S. goods sparked fears of a trade war.
The Dow Jones industrial average closed 230.94 points higher at 24,264.30, rallying more than 700 points from its session low. Microsoft and IBM were the best-performing stocks in the index.
The erased a 1.6 percent decline to finish the session 1.2 percent higher at 2,644.69, led by gains in consumer stocks. The broad index also closed back above its 200-day moving average, a key technical level. The Nasdaq composite closed 1.5 percent higher at 7,042.11 after plunging as much as 1.9 percent.
Stocks mounted their comeback as the White House tried to push back on the notion a trade war would breakout.
Larry Kudlow, Trump's chief economic advisor, told reporters: "He wants to solve this with the least amount of pain.... this is a growth action. I can't emphasize that enough."
"We have a very emotional tape," said Jeff Kilburg, CEO of KKM Financial. "When you have so much emotion, you're going to see some volatile moves."
"The emotional tape presents investors with a buying opportunity," he said.
Apple helped lead the comeback in the market, rising 1.9 percent. Chip stocks also rebounded, with Micron and Advanced Micro Devices climbing 3.6 percent and 2.3 percent, respectively.
Automakers Ford and General Motors rose 1.6 percent and 3 percent, respectively, after falling sharply earlier on Wednesday. But Boeing — a company that can be adversely impacted by a trade war — closed 1 percent lower. Deere also pulled back 2.9 percent.
The major averages hit their session highs after Bloomberg reported President Donald Trump may soften on a key NAFTA negotiation point.
China's Ministry of Commerce said the tariffs are designed to target up to $50 billion in U.S. products annually and would hit goods like soybeans and cars. The news increased worries a trade war may be brewing between the U.S. and China.
The move comes less than a day after Trump issued a list of Chinese imports that the U.S. administration aims to target as part of a crackdown on what the president sees as unfair trade practices.
"I think the market is just concerned about this thing escalating right now," James Paulsen, chief investment strategist at The Leuthold Group, told CNBC's "Squawk Box." "It's not so bad if we have a few tariffs on a few products, but if it escalates worldwide, … then you're really threatening the recovery globally."
Perceived safe-haven assets got a bid higher on Wednesday, but failed to hold those gains. Gold futures were up slightly in afternoon trading, while the 10-year U.S. Treasury yield rose to 2.78 percent after slipping earlier.
Trump tweeted later in the morning: "We are not in a trade war with China, that war was lost many years ago."
The Cboe Volatility index (VIX), widely considered the best gauge of fear in the market, rose to 22.08 and hit a high of 24.51.
"What we're seeing is a lot of uncertainty in the market," said Eric Aanes, president and founder of Titus Wealth Management. "We've been living in this calm world for so long we think we were due for more volatility."
Wednesday's moves come a day after the major indexes closed sharply higher as tech rebounded from steep losses seen in Monday's sessions.
In economic news, the ADP National Employment Report showed private companies added 241,000 jobs in March, more than the expected gain of 205,000.
The services purchasing managers' index (PMI) slipped to 54.0 in March from 55.9 in February. Meanwhile the non-manufacturing ISM index came in at 58.8 for last month, missing expectations.
—CNBC's Sam Meredith and Eamon Javers contributed to this report.