Krispy Kreme Doughnuts Inc.'s (KKD) rapid fall from grace has shocked many investors who remember when Wall Street devoured shares during the company's highly anticipated public offering.

But for investors who do their homework, the company's woes should not have come as a surprise. A look into Krispy Kreme's (search) history as a public company shows several signs of trouble that came well before the stock began its plunge in May.

Falling sales and weakening wholesale demand date back at least a year, and in March the company posted another sales slump and its first decline in profit margins in three years. J.P. Morgan analyst John Ivankoe called the average weekly sales results "discouraging." Still, the stock held firmly in the mid-$30 range.

Meanwhile, Krispy Kreme's debt had surged, and the company was pushing forward with an expensive franchise buyback program.

Add to that plenty of Wall Street analyst alerts — dating back to 2001 — that the stock was overpriced, and Krispy Kreme investors who have lost their shirts have nobody to blame but themselves.

"There were conceptual warnings for those who cared to look for them," said restaurant industry consultant Malcolm Knapp, of Malcolm M. Knapp Inc. "But if you didn't know the business well, and you saw the excitement surrounding new store openings, you probably would have felt like it was going to last forever."

Krispy Kreme officials did not respond to phone calls seeking comment.

Within a year after the Winston-Salem, N.C.-based company went public at $21 a share in April 2000, the stock price more than doubled. Customers lined up around the block at new-store openings, the press swept in and analysts cheered.

But customers quickly shied away from several locations, and by July 2003 Krispy Kreme began closing some shops.

The most glaring concern was the company's wholesale model, Knapp said.

Krispy Kreme's biggest draw is the doughnuts made in the stores and served fresh; demand for doughnuts sold elsewhere proved stale.

Knapp took the company's failed purchase of Montana Mills Bread Co. (search) last year as yet another warning sign.

"They thought they were invincible and got completely off strategy," he said. "All the while, investors were getting seduced by these huge new-store customer volumes. But some of us kept wondering how these were sustainable."

Even while trouble appeared to brew inside Krispy Kreme, some on Wall Street remained confident in the company up until its May profit warning.

After concerns about slowing sales surfaced in September 2003, BB&T analyst Andrew Wolf said the company's fundamentals were "fairly solid" and maintained his "buy" rating on the stock until November, when the company reported a 3 percent decline in average weekly sales.

At that time, RBC Capital Markets analyst David Geraty dismissed concerns. "It's still an attractive business model with very high returns," he said.

Some thought otherwise.

A Morningstar analyst said as far back as August 2001 that Krispy Kreme's stock price was too high, given its modest quarterly net income of $5.9 million at the time.

In October 2002, Merrill Lynch downgraded the stock to "sell," and in August 2003 J.P. Morgan's Ivankoe cut his rating to "underperform," also saying the earnings did not justify the rich stock price.

Nevertheless, the stock held firm, with some of the biggest names on Wall Street — including Fidelity, American Century and Barclay's — clutching large stakes well into 2004.

But last May, the stock fell 29 percent in one day when Krispy Kreme issued its first profit warning, blaming the low-carbohydrate-diet craze for lower sales.

The shares took another hit in late July, when Krispy Kreme said federal regulators were investigating its repurchase of franchises and its lowered earnings outlook.

That was the second time that investors looked askance at Krispy Kreme's balance sheet. In February 2002, the company came under fire for an off-balance-sheet method used for a dough-mixing plant. A month later, it changed the way it accounted for the plant and revised internal stock-selling policies after investors raised concerns when insiders sold a large chunk of shares in the previous quarter.

One final red flag: Short-selling activity in the company started to rise last year, meaning investors who bet on stocks to fall were gaining interest in Krispy Kreme. By last April, 25 percent of the company's publicly traded shares were sold short.

"The real issue for us was the deterioration in the financial health of the franchisees and the company's purchasing of these operations, which strained its balance sheet," said David Rocker of Rocker Partners, who took a short position in Krispy Kreme about 18 months ago. "The company was also seeing its wholesale model disappoint, and it was clear that Krispy Kreme was heading into a period of stress."

On Monday, Krispy Kreme posted a quarterly loss, sending its stock to an all-time low. On Wednesday, the shares were up 5 cents, or 0.5 percent, to $10.27 on the New York Stock Exchange.