Wall Street said goodbye to the day's losses by late afternoon in a session which was, predictably, governed by oil.
The day's trading was in tight lockstep with commodity markets just as stocks have been all week. Benchmark indexes began the day sharply lower, in line with a roughly 3% drop in crude, before grinding back to the flatline once oil moved back into positive territory.
The S&P 500 was up 0.44%, recovering from an earlier decline of more than 1%. The Dow Jones Industrial Average added 0.32%, and the Nasdaq climbed 0.9%.
Oil reclaimed a level above $32 after the Energy Information Administration said crude inventories grew by 3.5 million barrels in the past week, a smaller increase than feared. That was lower than a separate measure from the American Petroleum Institute, which showed a rise of 7.1 million barrels in the same period. West Texas Intermediate crude closed 0.9% higher at $32.15 a barrel on Wednesday.
Oil had slumped more than 3% earlier in the day as hopes faded that members of the Organization of Petroleum Exporting Countries would come to an agreement on production. In a speech earlier Tuesday, Saudi Arabian Oil Minister Ali Al-Naimi dismissed the possibility of production cuts, instead arguing that by maintaining output, the market will rebalance over time as demand improves. Negotiations over a production freeze started last week as oil producers grapple with a global surplus.
"Oil continues to impact investor sentiment and broad market returns," said Terry Sandven, chief equity strategist at U.S. Bank. "Continued supply/imbalance, implications of Iran increasing production and adding to global supplies, potential production agreement between key players (such as Saudi Arabia and Russia) are among factors adding to equity volatility and uncertainty."