Anyone who needs to be reminded of the irrational behavior of the stock market should look no further than the recent gyrations in the stock price of Whole Foods (NASDAQ:WFMI). Benjamin Graham, Warren Buffett's teacher and mentor, introduced Mr. Market in his classic text The Intelligent Investor. His famous description of the stock market is as a manic-depressive -- gushing with praise and willing to pay much more than the intrinsic value of a stock one day, then suddenly souring on the same stock the next day and dumping it for a fraction of its true worth.

Whole Foods is strong evidence that Mr. Market is still alive today, and is as unpredictable as ever.

Over the course of 2005, Whole Foods was a darling of Wall Street. As I reported, conference calls became a platform for sycophantic comments from analysts saying the management and the stock could do no wrong. When I wrote that I sold my shares because of valuation concerns, I was bombarded with emails claiming that I just didn't understand the upside opportunity in this company.

And then last week, when the company said that growth would slow in 2007, its shares plunged 23 percent. Analysts reacted in predictable fashion. Though he didn't actually mention the proverbial punchbowl, Mark Husson of HSBC wrote that "the party is over for the foreseeable future, perhaps forever, as competition is reeling Whole Foods in." Another analyst, Scott Mushkin of Bank of America, cut his price target for the shares by 45% -- from $77.50 to $43 -- effectively stating that $4.8 billion of shareholder value had disappeared almost overnight.

From a fundamental perspective, nothing of substance changed about Whole Foods last week. Great business models will always attract competition, and Whole Foods has long known that competitors like traditional grocers such as Kroger (NYSE:KR) and Safeway (NYSE:SWY) wouldn't simply sit there while Whole Foods took share from them. But Whole Foods has an impressive moat around its business that has proven, and will continue to prove, very tough to cross.

A year ago, I noted my concerns that management had started to get caught up in the hype of a soaring stock price and was spending too much time worrying about how to maintain the momentum in a stock whose price was diverging from fundamental value. As sentiment on Wall Street swings in the other direction, it is now more important than ever for the management team to redouble its focus on driving intrinsic value, and -- though I recognize this is much easier said than done -- simply ignore Mr. Market.

As competition catches up with some of the aspects of the business model, Whole Foods has plenty of opportunity to widen the moat in a number of other areas. To me, there are two fundamental dimensions for continued strengthening of its competitive advantage. First, it must continue to expand the footprint by entering new markets and deepening its penetration in existing markets. As Jeremy MacNealy's recent piece describes, the company has a strong team focused on this first dimension, and the key here is continued superior execution. The second dimension is finding ways to grow its "share of wallet" of its target consumers -- high-income, discerning shoppers with a taste for organic and natural products.

For me, this second dimension remains a critical challenge. Though Whole Foods competes well with independent high-end, specialty grocers in a number of areas, it still lags behind in a number of categories. For example, my in-laws -- discerning shoppers who live in Manhattan and shop at the Whole Foods at Columbus Circle -- still find that the cheese selection is far better elsewhere and that the bakery at Whole Foods is not at all up to par with some of the city's better bakeries. Here in Denver, my own experience with the prepared foods at the Whole Foods in our neighborhood has been hit-or-miss, and the price premium on some items that are available at traditional groceries is 50% or more, driving us to make a special trip elsewhere for something that we would otherwise have simply dropped into our cart at Whole Foods.

The examples above are anecdotes, not data. But there is no reason why the company cannot simply be the best in class across all grocery categories, in all markets -- it certainly has access to the resources and talent required. The business was built by providing discerning shoppers with a selection of products and a level of service that was not available in traditional groceries. As competitors start to imitate Whole Foods, CEO John Mackey and his team have to continue to innovate and find new ways to differentiate -- I believe there is no shortage of new opportunities to be found, especially while the competition remains focused on catching up.

The company's strategy is sound; the profit model is robust. The challenge now is for Whole Foods to remain committed to its strategy and to execute against it. If it does so, revenues and cash flow will follow. In that context, continued pessimism about the stock may actually be a blessing. It would give the company the opportunity to deploy capital at high rates of return by simply buying back its own stock. It has already announced the doubling of its stock buyback program in the wake of the recent fall in the stock price.

Personally, I would love to see Mr. Market's view of this stock move from mild depression to outright despair. My opinion is that the intrinsic value of this stock is in the $50-$60 range. A little more pessimism from Wall Street and the chance to own a piece of a great company at a bargain price may soon present itself.

Whole Foods is a Motley Fool Stock Advisor recommendation. For more of Tom and David Gardner's top picks for great stocks, take a 30-day free trial of the newsletter.

Bank of America is an Income Investor selection.

Fool contributor Salim Haji lives in Denver, where he shops at the Whole Foods near his house. He also owns shares of Berkshire Hathaway. He does not own shares in any other company mentioned. The Fool has a disclosure policy.