U.S. stocks posted slight gains on Wednesday after a volatile session kicked off 2019.
The Dow Jones Industrial Average closed 18.78 points higher at 23,346.24 after dropping nearly 400 points earlier in the day. The gained 0.1 percent to close at 2,510.03 while the Nasdaq Composite climbed 0.46 percent to 6,665.94. At their lows of the day, both the S&P 500 and Nasdaq were both down more than 1 percent. Volatility was rampant in December as the S&P 500 posted its worst December since the great depression, leading to its worst year since the financial crisis in 2008.
"Finally, we're starting to see this buy-the-dip mentality creep into the market," said Phil Blancato, CEO of Ladenburg Thalmann Asset Management. "It's because of valuations and it's because the underlying data has been pretty good so far, albeit a bit softer."
"I think the market has accepted that, it's now capitulated and I think we grind higher here," Blancato said.
Facebook and Amazon rose 3.5 percent and 2.5 percent, respectively, to help the Nasdaq recover its losses. Bank shares erased earlier losses as Goldman Sachs, Bank of America and J.P. Morgan Chase all climbed more than 1 percent.
Energy stocks also contributed to the move off the lows. The S&P 500 energy sector rose 2.1 percent, led by gains in Cabot Oil and Hess, as U.S. crude surged 2.5 percent.
Stocks initially fell on Wednesday after a private sector survey showed manufacturing activity in the world's second-largest economy contracted for the first time in 19 months. China's Markit Manufacturing Purchasing Managers' Index (PMI) for December dipped to 49.7 from 50.2 in November.
Meanwhile, the euro zone manufacturing PMI remained at its lowest level since February 2016, according to IHS Markit. The data also showed confidence about the future hit a fresh six-year low. In the U.S., the IHS Markit manufacturing PMI slipped to a 15-month low in December.
"Everybody is terrified that this is a sign of a global slowdown," Art Cashin, director of floor operations at UBS, told CNBC's "Squawk on the Street." "It was only eight months ago we were talking about synchronized growth and all of that is falling apart."
The weaker-than-expected data follows a poor official survey on factory output, compounding concerns about a possible economic slowdown this year.
Stocks also fell after The New York Times reported that U.S. Trade Representative Robert Lighthizer has told friends and associates he wants to prevent President Donald Trump from accepting "empty promises" from China on the trade front. The report also says Lighthizer has warned Trump that additional tariffs may be needed to get meaningful concessions from the Chinese. The two countries are currently negotiating a trade deal after exchanging tariffs on billions of dollars worth of their goods.
Wall Street concluded trading in 2018 on Monday, with all major stock indexes registering their worst yearly performances since the financial crisis.
Despite solid gains on Monday, the S&P 500 and Dow Jones Industrial Average were down 6.2 percent and 5.6 percent, respectively, for 2018. Both indexes posted their biggest annual losses since 2008, when they plunged 38.5 percent and 33.8 percent, respectively. The Nasdaq Composite lost 3.9 percent in 2018, its worst year in a decade, when it dropped 40 percent.
"I think this is a temporary headline-driven issue," said Dryden Pence, chief investment officer at Pence Wealth Management. "We see a market that is disconnected from our view of the 2019 fundamentals. Because of that, we see more opportunity than risk at these prices."
The S&P 500 and Nasdaq also registered their worst quarterly performances since late 2008, while the Dow logged its biggest quarterly loss since 2009. A sizable chunk of this quarter's losses came during a violent December. The indexes all dropped at least 8.7 percent for the month. The Dow and S&P 500 also recorded their worst December performance since 1931.
Craig Johnson, chief market technician at PiperJaffray, said the market is set up for a bounce after those losses.
"While acknowledging there are fundamental concerns, we do not believe the current economic backdrop warrants the degree of bearish sentiment and suspect the proverbial bar for stocks has dropped significantly," Johnson said in a note to clients. "Technically, we continue to see signs of an intermediate-term bottom emerging and recommend investors tactically deploy capital back into equities."