Supermarkets get Trump bump. Food prices to jump?

This robot will deliver your groceries
This robot will deliver your groceries

Whole Foods has a reputation for being a company that liberals tend to shop at more than conservatives -- even though there was that one time CEO John Mackey referred to Obamacare as being akin to "fascism."

But Whole Foods (WFM) investors seem to be looking forward to a world under Donald Trump. The stock has surged 6% since Election Day. And it's not the only supermarket posting super returns lately.

Whole Foods organic rival Sprouts (SFM) has gained 5%. Kroger (KR) is up 6%. SuperValu (SVU) has shot up more than 10%.

And United Natural Foods (UNFI), a supplier to many grocery chains, has soared nearly 15%.

So what does going to the store to buy meat and potatoes have to do with Trump? Simply put, the market is betting that Trump's stimulus plan will lead to more inflation.

That should push up the prices of various agricultural commodities -- and eventually cause higher prices for food at the supermarket.

That's not exactly the best news for consumers. But supermarket chains have been anxiously waiting for inflation to pick up. Cheaper food prices have hurt their profit margins -- and their stock prices.

Kroger, which has been the darling of the supermarket industry for the past decade, is down 20% this year. So are shares of Sprouts. SuperValu has plunged more than 30%.

Related: Food deflation hurts Kroger and other grocery chains

Whole Foods has held up a little bit better, falling only about 10%.

But the stock is still well off the highs it hit during its glory days a few years ago -- before the company came under fire from regulators around the country for high prices, and customers left in droves.

Ironically, Whole Foods has wound up lowering its prices a bit. It no longer deserves the Whole Paycheck nickname that it once had. But cheaper prices are the reason why it and its rivals are struggling.

Still, the broader hope is that stimulus from Trump and the Republican-led Congress will put more money in consumers' pockets. And they'll keep spending even if prices go up. That's what Kroger CEO Rodney McMullen told CNBC last week.

But the grocery stocks have all pulled back a bit from their post-election highs over the past few days. Investors may be having second thoughts about just how big of a Trump bump they will really get.

For one, it's not as if Trump's ascendancy means that agricultural commodities are going to actually go higher -- regardless of Trump's spending plans and what the Federal Reserve does with interest rates.

Related: Is Kroger going to buy Whole Foods?

There are legitimate concerns about global trade skirmishes, if not an all-out war, if Trump winds up imposing as many protectionist tariffs on China, Mexico and other countries as he has discussed.

If that happens, the prices of many big agricultural commodities produced by American farmers could tumble.

With that in mind, it's worth noting that the price of wheat, corn and soybeans have actually fallen since Trump won, even as oil, copper and other economically sensitive commodities have gone up.

Investors may also be starting to remember just how brutally competitive the supermarket business is.

Walmart and Costco are also big players in groceries. Amazon is investing more in online grocery deliveries as well.

The popular New York supermarket chain Fairway went bankrupt earlier this year.

And Safeway owner Albertsons filed to go public in July 2015, but has left the IPO on the shelf (behind cans past their expiration date?) because of weak market conditions.

So investors may now be waiting to see just what a Trump administration will really do to food prices before deciding to put any more supermarket stocks in their shopping cart.

CNNMoney Sponsors