This article was updated on April 5, 2017, and originally published on Sept. 15, 2016.

Whole Foods Market (WFM) is no longer a Wall Street darling. Shares of the natural and organic grocer are down nearly 55% since peaking in late 2013. Comparable sales are slumping, down 2.4% during the first quarter of 2017, and margins are moving in the wrong direction. Competition from both traditional grocers encroaching on Whole Foods' turf and other specialty grocers, a problem I pointed out back in 2014, is eating away at the company's profitability.

Pessimism surrounding Whole Foods is at a high, exactly the kind of situation that I like. Despite its problems, Whole Foods is still a successful grocery chain with room to grow. I suspect its margins will be more in line with the rest of the grocery industry in the coming years as it's forced to compete on price, but that doesn't mean the stock should be left for dead. Whole Foods stock isn't quite cheap enough for me at the moment, but I'm putting it on my watchlist. Here's why.

WFM Chart

WFM data by YCharts

The future of Whole Foods

In the past, Whole Foods stock was always far too richly valued for me to even consider. My assumption was simple: Maintaining exceptional operating margins, as high as 6.8% in fiscal 2013, would be impossible as the company grew. Competition would eat away at Whole Foods' pricing power, and eventually, the company would begin to look like just another chain of grocery stores.

I don't doubt that Whole Foods can consistently produce higher margins than traditional chains like Kroger, which managed an operating margin of 3.3% in fiscal 2016. But as natural and organic foods grow in popularity and become commoditized, the economics of the grocery industry are catching up with the company. I think the days of truly exceptional operating margins at Whole Foods are over.

Whole Foods' net income has been essentially flat since fiscal 2012 despite sales rising more than 30% in that time. Slumping gross and operating margins are the culprit, and I see no reason to expect this trend to reverse anytime soon. Whole Foods will need to continue becoming more competitive on price in order to get customers to come back to its stores, and that will hurt margins even further.

In the long run, margins will almost certainly be lower than they are today, but a growing store count will eventually return the company to earnings growth. Whole Foods currently operates 469 stores, and while management has now dropped its goal of reaching 1,200 stores, there's plenty of room left for expansion. The new 365 store format offers additional growth opportunities as well.

The outside of a Whole Foods store.

Image source: Whole Foods.

At the moment, Whole Foods stock doesn't look particularly cheap. The company produced $1.55 in EPS in fiscal 2016, putting the current stock price at 19.4 times earnings. That's steep for a company struggling with falling traffic and stagnant earnings, and that's one reason I'm looking for a lower price.

Free cash flow tells a bit of a different story. Whole Foods separates maintenance capex, money used to maintain its existing stores, from growth capex, money used to grow its store base, and that allows investors to get a sense of how much cash the company would produce if it stopped growing today. In fiscal 2016, free cash flow excluding development costs for new stores was just shy of $800 million, putting the current stock price at roughly 12 times this number.

If I were confident Whole Foods could maintain this level of free cash flow generation, I would buy the stock in a heartbeat. But I suspect free cash flow will fall along with margins for a while -- until store count growth starts driving profits higher once again. When that happens is anyone's guess.

At $30 per share, I don't think Whole Foods offers a compelling investment opportunity. Somewhere in the low-20s would be much more interesting. That price would give investors a P/E ratio of about 15 and a high single-digit multiple of no-growth free cash flow. At that price, I'd probably bite. But for now, Whole Foods has a place on my watchlist. I'll be hoping continued pessimism drives the stock down further in the coming quarters.