Ilya Feygin, senior strategist at WallachBeth Capital, said the S&P came off its highs after hitting resistance 1,912-1,915. "We're trading just kind of technically in between there (and 1,877)."
"I think the data coming up is going to be very important. That's why (there's) volatility," he said. China releases PMI data late Wednesday ET and the key September U.S. nonfarm payrolls report is due Friday morning.
The Nasdaq composite closed up more than 2 percent, helped by gains of nearly 4.8 percent in the iShares Nasdaq Biotechnology ETF (IBB). IBB remained in a bear market, or more than 20 percent below its 52-week high, after a sharp sell-off in recent weeks. The ETF lost about 17.8 percent for the quarter, its first negative quarter in 11.
Chaikin noted that Apple underperformed the major indices with a gain of about 0.8 percent on the day. "The fact that Apple can't get going is negative for the market," he said. The iPhone maker stock posted a nearly 12.1 percent loss for the quarter.
Read MoreIMF's Lagarde: Global growth likely weak this year, modest acceleration in 2016
"Nothing has changed fundamentally from yesterday to today except that most of the globe is rallying with weaker-than-expected data points, with the hope of more stimulus from central banks," said Ryan Larson, head of U.S. equity trading at RBC Global Asset Management.
"The key thing is, does the early strength ultimately equate to the strength at the end of the day?" he said. "As those shorts are covered that buying interest isn't there."
In pre-market trade, Dow futures were more than 160 points higher, while European markets traded more than 2 percent higher. Asian stocks posted gains, with Japan's Nikkei 225 stock index rallying 2.70 percent.
Soft data in Japan and the euro zone boosted hopes of more stimulus in those regions. Japanese industrial production unexpectedly fell 0.5 percent in August for the second-straight month of declines, government data showed Wednesday.
For the first time in six months, euro zone prices fell in September from the same period last year, according to the European Union's statistics office Eurostat.
Analysts also noted support for Tuesday's gains from continued signs of improvement in the U.S. labor market.
Ahead of Friday's key nonfarm payrolls data, the September ADP Employment report showed private companies added 200,000 jobs.
"I think that's certainly lending some credibility to the gains that are there," said Paul Springmeyer, senior portfolio manager at the Private Client Reserve at U.S. Bank.
"Investors are being more cautious and tactful, hence the heightened levels of volatility. We've been at pretty subdued levels (of volatility). I think any time you see multiple point percentage swings it's an overreaction," he said.
U.S. stocks closed mixed Tuesday, after plunging nearly 2 percent or more on Monday.
Read More Carl Icahn: I think markets are overpriced, earnings are misstated
Crude oil settled down 14 cents, or 0.31 percent, at $45.09 a barrel. Oil struggled to rally amid concerns about a hurricane on the U.S. East Coast, news of escalation in the Syrian war, and a report that crude stockpiles rose far more than expected.
Copper spiked amid quarter-end positioning and news of an output cut in Chile. Commodities trading and mining giant Glencore continued to recover with a gain of more than 11 percent.
"It warns of these companies in terms of their debt and how they've managed their balance sheets," said Mark Luschini, chief investment strategist at Janney Montgomery Scott. "That to me is more a symptom of what's happened in the commodity complex than a signal."
Read MoreInvestors cut junk bond holdings as debt fears mount
Wednesday was the last day of September and the final day of the third quarter, the worst since 2011 according to Barclays.
"The third quarter to me reflected uncertainty about the Federal Reserve, the uncertainty caused by not knowing how the central bank is going to raise rates. If you get a good labor report that may steel the nerves of the Fed," said David Kelly, chief global strategist at JPMorgan Funds.
Concerns about spillover from slowdown in China and the timing of a Federal Reserve rate hike sent markets into correction territory, or more than 10 percent below their 52-week highs, in late August.