Shares of Flowers Foods (NYSE: FLO) hit a 52-week high on Friday. Let's take a look at how it got there and see if clear skies are still in the forecast.

How it got here
In an environment where food-related, material costs are rising, it's becoming a rare sight to see food companies trading at new highs; but that's exactly what we get with Flowers Foods, a maker of bakery products within the United States.

The company has benefited from a combination of factors in recent weeks. First, Flowers' purchase of Maine-based Lepage Bakeries for $370 million has investors excited as the deal increases its direct-store-delivery accessibility from 64% to 70%. Since the companies operate in very similar markets, integration costs should be minimal and earnings accretive almost immediately. Second, Flowers has been rock-solid dividend grower for income-seeking investors since 2003 with its quarterly payouts growing from just $0.02 to the recently increased payout of $0.16. Finally, Flowers has delivered for shareholders despite a tough environment. Thanks to its Tastykakes acquisition in 2011, revenue increased 12% in the first-quarter even as profits dipped slightly from the previous year.

It won't, however, be clear sailing for Flowers' as those aforementioned flour, sugar, and shortening costs are eating into its bottom line. Both Kellogg (NYSE: K) and General Mills (NYSE: GIS) have been recent casualties of rising input costs with little sign that these pressures will slow in the near-term.

How it stacks up
Let's see how Flowers' Foods stacks up next to its peers:

FLO Chart

FLO data by YCharts

In an odd twist, the more diversified ConAgra Foods (NYSE: CAG) and Campbell Soup (NYSE: CPB) have performed considerably worse than their peers over the past five years.

Company

Price/Book

Price/Cash Flow

Forward P/E

5-Year Revenue CAGR

Flowers Foods 4 26.1 20 8.0%
General Mills 3.6 13.3 12.7 5.0%
Campbell Soup 8.3 9.5 12.6 1.0%
ConAgra Foods 2.1 9.1 12.4 1.2%

Source: Morningstar, author's calculations. CAGR = compound annual growth rate.

As you can see from these menial sales growth figures over the past five years, growth comes at a premium and is measured by inches, not feet. However, the food sector also provides a safety net during volatile periods as it is primarily considered a necessity product and is thus less prone to market fluctuations.

Flowers Foods has achieved much of its growth through acquisitions over the years while Campbell and ConAgra demonstrate the slow-and-go nature of food production growth (about 1% CAGR over the past five years). This is one reason Flowers trades at such a significant premium to General Mills, Campbell, and ConAgra who all trade more or less in-line with one another.

It's also worth noting that there's an inverse relationship between growth patterns and dividend yield among this group. ConAgra and Campbell, which grow more slowly but are better diversified, offer dividend yields that are roughly 1% higher than Flowers. Consider this a reward to shareholders who have stuck around through an unusually long rough patch for food producers.

One factor every company across the board has dealt with though is rising input costs which have negatively affected margins and threatened to reduce expansion efforts.

What's next
Now for the $64,000 question: What's next for Flowers Foods? That question is going to depend on whether it can grow its business organically once it fully integrates its Lepage Bakery purchase, and if it can maintain pricing power to help stave off large price increases in raw material costs.

Our very own CAPS community gives the company a highly coveted five-star rating, with an overwhelming 97.2% of members expecting it to outperform. I've yet to personally make a CAPScall on Flower Foods, but if anything I'm leaning toward siding with the minority in this instance.

What concerns me with Flower Foods is what concerns me with all food producers: How will they contain costs? Growth figures have mostly been achieved through acquisitions. I can see how Flowers can cut costs through synergies and increase its geographical reach, but that won't mean much if it loses its pricing power in the process or can't keep up with rising input costs. It trades at a significant premium to its peers and one minor foul-up should be enough to knock it off its high horse. For now I'm going to let the stock be, but I'll be adding it to My Watchlist for a possible underperform rating in the near future.

During times of high volatility food producers with high dividends are one area investors often turn to. Another well of great dividends with highly sustainable businesses is the Dow Jones Industrial Average. In our latest report, our team at Motley Fool Stock Advisor chooses their top three stocks within the Dow that stand head-and-shoulders above their peers. Find out their identity for free by clicking here to get your free copy of this special report.

Craving more input on Flowers Foods? Start by adding it to your free and personalized watchlist. It's a free service from The Motley Fool to keep you up to date on the stocks you care about most.