The Dow added nearly four-tenths of a percent, the S&P 500 gained two-tenths of a percent and the Nasdaq ticked up marginally.

In public comments Tuesday, Minneapolis Fed President Neel Kashkari said the central bank is "not done yet" with inflation and Cleveland Fed President Loretta Mester said she was not ready to suggest the timing of rate cuts.

"It's déjà vu all over again."

The famous Yogi Berra quote is the way Sean O'Hara, President of Pacer ETFs Distributors, described how the Fed continues to drive the market.

"We're still watching inflation. We're still watching what the Fed is going to do. Are they going to pivot? Are they going to cut? Are they going to cut six times? Four times? Two times? When? Are earnings going to continue to remain strong? So I think we're sort of stuck in this same loop, if you will, of information that we don't have enough solid answers to be able to figure out the direction going forward."

In earnings news, shares of Snap - which closed up 4% - plunged 30% after the closing bell when the Snapchat owner missed quarterly revenue targets as it struggles for ad dollars.

Shares of GE HealthCare Technologies gained more than 11.5% after the medical tech firm posted better-than-expected fourth-quarter earnings, driving the S&P 500 healthcare sector to an all-time high.

But the materials sector was the biggest gainer thanks to DuPont, whose shares gained nearly 7.5% after the chemicals firm beat fourth-quarter profit estimates, announced a $1 billion share-repurchase program and hiked its dividend.