The Dow rose a hair, while the S&P was up almost nine-tenths of a percentage point and the Nasdaq gained nearly a percent and half.

But Rebecca Felton, Senior Market Strategist at Riverfront Investment Group, warns that investors shouldn't get too excited.

"Well, markets are responding well today to the better-than-expected PPI numbers - obviously there is still hope that the Fed will pivot in terms of their policy moves and rate hikes. We are still a little less optimistic than that, as it relates to a path for the Fed, because we do continue to expect them to raise rates, potentially 50 basis points at the next meeting. And we expect rates to stay higher for longer because just a couple of data points on better-than-expected inflation news in our opinion is not enough to show us that in fact we are really meaningfully moving closer to the Fed's target of two percent."

Stocks also shook off an unconfirmed report of Russian missiles crossing into Poland that had sparked a selloff in equities earlier in the day.

As for individual movers, shares of Walmart jumped 6.5% after the top U.S. retailer lifted its annual sales and profit forecasts, benefiting from a steady demand for groceries despite higher prices.

Shares of fellow retailers Target and Costco also rose on the news.

And Home Depot was up 1.6% after the home improvement chain's results showed it tapped higher prices to override a drop in customer transactions for the third quarter.