Dow Jones industrial Average
Traders work on the floor of the New York Stock Exchange during the morning of February 12, 2016 in New York City. Andrew Burton/Getty Images

This story was updated 4:15 p.m. EST.

U.S. stocks took a wild ride Wednesday amid a volatile trading day that saw the Dow swing by more than 300 points before settling slightly up for the session. Falling oil prices rattled investors’ confidence as they continue to look to crude for a signal on the direction of the global economy.

The Dow Jones Industrial Average (INDEXDJX:.DJI) closed up 53.21 points, or 0.32 percent, to 16.484.99. The broader Standard & Poor's 500 index (INDEXSP:.INX) gained 8.53 points, or 0.44 percent, to 1,929.80. The Nasdaq composite (INDEXNASDAQ:.IXIC) declined 39.02 points, or 0.87 percent, to 4,542.61.

Oil prices rebounded from losses earlier in the day after Saudi Arabia on Tuesday defended its bid to keep sending crude into global markets.

U.S. West Texas Intermediate gained 1.63 percent to $32.39 per barrel for April delivery on the New York Mercantile Exchange. Brent crude, the other major global benchmark, rose 4.15 percent to $34.65 for April delivery on the London ICE Futures Exchange.

“The fact that Saudi Arabia would rather give out the oil for free instead of giving market share to Iran will continue to weigh on oil prices and this weighs on markets,” Guillermo Hernandez Sampere, head of trading at MPPM EK in Eppstein, Germany, told Bloomberg. “Another factor is the bad performance of banks in the first quarter. We used last week’s rally to increase our cash position because we don t expect volatility to calm in the next days.”

Asian stocks closed mostly down with just a slight gain for China’s mainland Shanghai Composite Index, which edged up 0.88 percent on optimism that Chinese officials would soon announce a program to improve state-owned enterprises.

Japan’s Nikkei 225 ended the day down 0.85 percent. Hong Kong’s Hang Seng shed 1.15 percent. South Korea’s Kospi Index lost a slight 0.09 percent. Australia’s S&P/ASX 200, which closely tracks commodity prices, lost 2.1 percent.

European shares extended losses Wednesday for a second day as commodities-related shares came under selling pressure after a brief rally on Monday. The broad Stoxx Europe 600 closed down 2.47 percent while the German DAX index fell 2.64 percent. The French CAC 40 declined 1.96 percent and London’s FTSE declined 1.60 percent.

The benchmark U.S. 10-year Treasury yield edged up to 1.754 percent after opening at 1.724 percent. The bond yield typically rises when investors are more confident about the markets and falls when concerns flare. Gold, another so-called safe harbor investment, edged up 0.60 percent to $1,229.20. Gold prices tend to rise as confidence in the stocks falls.

U.S. stock market movers included Lowe's Companies Inc. (NYSE:LOW) whose shares declined despite reporting an increase in its fourth quarter revenue and earnings that were in line with Wall Street expectations, and Target Corporation (NYSE:TGT), whose stock jumped after the company said earnings would come in higher than analysts’ expectations this year, to between $5.20 and $5.40 per share.