After data showed that inflation remained high, the S&P 500 index closed nearly flat, and the two-year treasury yield increased by more than 10 basis points. Two Federal Reserve officials then warned that the solution would likely necessitate higher interest rates for an extended period of time, though one policymaker suggested that the end was near.

Swaps contracts showed traders gave almost-even odds for a quarter-point rate increase by the Fed in June, following similar hikes in march and May. The rate-sensitive two-year treasury yield climbed past 4.6%.

Equity indexes fell in the morning after Federal Reserve Bank of Richmond President Thomas Barkin said that the Fed may "have to do more" to combat inflation, and Dallas Fed President Lorie Logan said rate hikes could last "for a longer period than previously anticipated."

However, stocks recovered after Federal Reserve Bank of Philadelphia President Patrick Harker stated that policymakers were getting close to a point where interest rates were restrictive enough: "In my opinion, we're not done yet... but we're probably getting close."