Recently, I made a confession about my ill-conceived bet on Diamond Foods (NASDAQ:DMND). I used call options to make a short-term bet that the company would manage to release two years' worth of earnings restatements before the Securities and Exchange Commission's Dec. 7 deadline. Diamond did release the restatements last Wednesday, but the stock didn't respond the way I'd hoped, instead plunging more than 30% and leaving me with little recourse.

But as I think about this company as an investor instead of a gambler, I'm finding there might still be an opportunity for those with a strong stomach.

First, the bad news
While the audit committee decided  that there wasn't sufficient evidence of outright fraud, it did find that the accounting methods for payments to walnut growers were, at best, disorganized. Payments that should have been made were pushed into later periods, causing confusion in the company as to what expenses were for a given period, and confusion among the growers as to when they would be paid and for which crop shipment.

Thus, the major impact of the audit was to revise gross margins downward, from 23.7% to 21.2% in 2010 and from 26% to 22.4% in 2011. That might not sound like a big difference, but small changes to gross profits can have a big impact on net profits. Things have only gotten worse in 2012. Diamond has so far released financials for only the first three quarters, up through April of this year, but it offered full-year gross margin guidance of 18% to 18.5%.

The primary reason for the steep drop this year was that the company received sharply lower walnut shipments but still had to pay the usual fixed operational costs. And the primary reason for the lower walnut shipments is, you guessed it, the damage the walnut accounting scandal did to the company's brand. Essentially, walnut growers are wary of selling to the company, and it will need to regain their trust to move forward.

It is disastrous for a company to lose the trust of its suppliers, and one of the surest ways to win it back is by bringing in a new management team. Unfortunately, the name of one new manager may sound familiar -- that of CEO Brian Driscoll. He has more than 30 years of experience holding important positions at some of the top food companies in the world, but most recently he was CEO of Hostess Brands. Yes, that Hostess.

Now, granted, Driscoll headed Hostess only from June 2010 to March 2012, and Hostess has been in and out of bankruptcy since 2004, so the blame for its recent liquidation can't be placed solely at Driscoll's feet. However, his departure from Hostess was less than ideal, as he was essentially forced out by the workers' union, who believed they couldn't negotiate with him after the board of directors tripled his salary.

Now the good news
Let's be blunt -- Diamond's margins are terrible. For comparison, the Frito-Lay division of PepsiCo (NYSE:PEP) commanded about a 28% operating margin in 2011. The grocery segment of the newly independent Kraft (NASDAQ:KRFT) carried a nearly 29% operating margin. Kellogg (NYSE:K), which became the world's second-largest snack company after buying Pringles in the wake of Diamond's failed attempt, managed only about 15% -- much lower than its competitors and still three times as high as Diamond.

This is strange. For all Diamond's troubles, its brands are absolute powerhouses. Kettle, Pop Secret, and Emerald all command significant market share  in their respective categories. Kettle essentially created the kettle-cooked-chip category, and Diamond's culinary nuts brand has double  the market share of its nearest competitor.

The new team understands that there is significant room for margins to grow. A major factor will involve reduced promotional selling, especially for its premium Kettle brand. Kettle has a certain status as a healthier potato chip, a status Diamond can exploit with higher prices. Meanwhile, Diamond also has cost-saving initiatives in the works. The company is cutting 170 Emerald products, which represent 65% of the brand's products but only 20% of its revenue. This will be a blow to sales, but increased operating efficiencies will more than make up for it. Diamond will also consolidate operations into one of its two manufacturing plants, further cutting costs by closing the other.

As for the new management team, aside from Driscoll, Diamond appointed Mark Hair, a veteran forensic accountant, as senior vice president of finance, a good step toward reforming the company's accounting practices. It also appointed five new directors to the board, including one of the company's biggest walnut growers, hopefully giving Diamond more of an edge in regaining growers' trust.

The Foolish bottom line
Obviously, Diamond has been through a lot. Even without the scandal, the company has been on the decline for a few years, and its reputation is tarnished. Management even admitted last week that things are likely to get worse before they get better.

But the turnaround initiatives they've proposed seem like good ideas, and there's no denying that the stock has been hit hard, putting it far below book value and raising the possibility that a larger company will buy the company out just to get its brands. I wouldn't exactly recommend buying shares, but definitely add this stock to My Watchlist to keep an eye on things.

Jacob Roche has the following options: long DEC 2012 $25 calls on Diamond Foods. Check out his Motley Fool CAPS profile or follow his articles using Twitter or RSS. The Motley Fool owns shares of PepsiCo. Motley Fool newsletter services recommend PepsiCo. Try any of our Foolish newsletter services free for 30 days. We Fools don'tt all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.