Shares of Hershey (NYSE: HSY) hit a 52-week high on Friday. Let's take a look at how the company got there and whether clear skies remain in the forecast.

How it got here
A model of consistency, Hershey is benefiting from America's love for sugar and chocolate. In 2010, more than 3.6 billion pounds of chocolate were consumed worldwide, which is music to the ears of Hershey, whose brands, including Reese's, Rolo, Jolly Rancher, and, of course, its namesake brand, are household names. But profits for confectioners like Hershey aren't just going to roll in forever.

Despite sugar prices dropping recently -- which is good news for confectioners who count sugar as an input cost -- cocoa prices have been moving relentlessly higher. In fact, as the Fool's Michael Lewis reports, cocoa prices could move higher by as much as 50% over the next decade as supplies remain constrained. This is particularly damaging for food product companies that are easily affected by rising input costs, including Hershey, Archer Daniels Midland (NYSE: ADM), Cosan (NYSE: CZZ) and Kraft (NYSE: KFT).

Hershey is attempting to allay fears of shrinking cocoa by philanthropically donating $10 million to West African cocoa-growing nations to help curb child-labor infractions and educate growers about cocoa production. Not surprisingly, the company is also looking internationally for avenues of greater growth than it's seeing in the United States at present.

How it stacks up
Let's see how Hershey stacks up next to its peers.

HSY Chart

HSY data by YCharts

Here we see both the boon and bane of the confectionery stocks: They generally outperform in down markets, but underperform in rising markets like we have now.

Company

Price/Book

Price/Cash Flow

Forward P/E

Dividend Yield

Hershey 16.8 25.0 18.5 2.4%
Cosan 1.3 3.1 13.1 2.0%
Kraft 1.9 15.1 13.7 3.0%
Tootsie Roll 2.0 26.7 23.7 1.5%

Sources: Morningstar and Yahoo! Finance. Dividend is projected yield.

Something that immediately stands out is that despite relatively small growth rates, highly saturated markets, and shrinking margins, these are very pricy stocks. There's definitely value to a brand name, but the question is, exactly how much? Tootsie Roll boasts the smallest dividend of the confectioners while also sporting the highest forward P/E and price-to-cash-flow. Similarly, with Hershey's five-year compound annual revenue growth only coming in at 4.2%, I'm not certain it deserves to be valued at 25 times cash flow. Kraft's valuation makes a little more sense since its business is highly diversified across multiple food groups (snacks, desserts, and primary meals). Brazil-based Cosan, which makes sugar-cane-based products, appears to be the steal of the group based on the above metrics.

What's next
Now for the real question: What's next for Hershey? That question is really going to depend on whether or not the company can find growth outside of the United States, and whether it can find alternative modes of increasing the world's supply of cocoa, which currently is simply going to be unable to meet increasing long-term demand.

Our very own CAPS community gives the company a three-star rating (out of five), with 82.6% of members expecting it to outperform. I haven't made a CAPScall either way on Hershey because, frankly, I'm still torn as to which way it's headed next.

The positives for Hershey include a strong cost-cutting campaign, which will increase efficiency; philanthropic contributions, which should help streamline cocoa production; and a portfolio of household brand names. On the flip side, rising cocoa prices are going to slowly erode Hershey's margins if it's unable to grow its volume and pass along hefty price increases to consumers. To me, that seems like the recipe for a stock that will muddle along with the market for the next few quarters. It's worth reexamining, but I can't firmly say it will head higher (or lower, for that matter) from here.

Craving more input on Hershey? 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. Start by using the links below.