Shares of Dean Foods (NYSE: DF) hit a 52-week high today. Let's look at how it got here and whether clear skies are ahead.

How it got here
The rise of Dean Foods is really a return from the depths rather than a continuing story of profitability. In 2011, the company reported three quarters of negative earnings per share, coupled with an $8.39 loss per share in the third quarter, when the company wrote down over $2 billion of goodwill.

Management and investors are hoping that the first quarter's return to profitability is a sign of things to come rather than an anomaly. First-quarter sales rose 5.3% to $3.2 billion and net income rose 62% to $37.9 million, or $0.21 per share. An improvement in milk prices as well as a slowly improving economy is helping results.

Not all food suppliers have had the same rough time Dean Foods has had in the milk business. More diversified suppliers B&G Foods (NYSE: BGS), General Mills (NYSE: GIS), and PepsiCo (NYSE: PEP) have all seen their stocks rise in the last five years while Dean Foods lost half of its value. All three of these companies have incredibly strong brands, though, so it shouldn't be too surprising.

DF Chart

DF data by YCharts.

Dean Foods' extremely low margins also have a lot to do with it. If there's the slightest change to the balance of supply and demand, Dean Foods feels it and it can quickly bring about losses. That's why the company's profit margin looks so bad compared to competitors' right now.

Company

Price/Sales

Profit Margin

Return on Assets

Forward P/E

Dean Foods 0.2 (11.8%) 4.5% 12.5
B&G Foods 2.3 9.4% 7.8% 18.0
General Mills 1.5 9.6% 8.1% 14.1
PepsiCo 1.6 9.6% 8.7% 15.7

Source: Yahoo! Finance.

You can see that Dean Foods is starting from such a low base that as operations turn around, the stock has a lot of room to rise. It may not match competitors' price/sales ratios, just because Dean Foods will inherently have lower margins, but with earnings rising quickly, a 12.5 P/E ratio isn't too expensive.

What's next?
So, can Dean Foods continue to rise from here? I think it can if the economy continues to recover and consumers don't begin to trade down, cut back, and stop buying dairy products the way they did before, when Dean Foods began to struggle. But that's a big if right now with Europe on the verge of collapse and margins remaining thin.

The CAPS community doesn't have a lot of confidence either, giving the stock a three-star rating (out of five) right now. Even 16 of our All-Stars think the stock will underperform the market.

How high can Dean Foods fly? If the stock doubled in the next 12 months it wouldn't shock me, just based on how far the stock has fallen and how much upside operations have. But I think bigger, more diverse food companies are a better bet right now because the margin for error is too small and the downside too big.

Interested in reading more about Dean Foods? Click here to add it to My Watchlist, which will bring you of our Foolish analysis on this stock, totally free of charge.