Investors expect the Federal Reserve to begin raising interest rates as soon as March, but they also fear that the Fed could either be moving too late or could be too aggressive in fighting inflation.
Major indexes had a similar start to trading on Monday and were down most of the day, but a late buying spree pushed them to a higher close.
Even though the S&P 500 managed to eke out a gain after its roller-coaster ride on Monday, a measure of nervousness on Wall Street known as the VIX index remained high.
Futures contracts related to the VIX, meanwhile, indicate investors are preparing for a high level of volatility in the near term but less in ensuing months.