Shares of CF Industries (NYSE: CF) hit a 52-week high today. Let's take a look at how the company got there to find out whether clear skies remain on the horizon.

How it got here
Fertilizer industry watchers should be little surprised that CF, the largest North American nitrogen fertilizer producer, has been nudging upward lately. Fertilizer prices keep going up, corn plantings are at or near all-time highs, and CF benefits from the combination of extremely low input costs (from dwindling natural gas prices) and high finished materials costs coupled with intense demand. CF and majority-owned Terra Nitrogen (NYSE: TNH) have both soared as a result.

CF Total Return Price Chart

CF Total Return Price data by YCharts

Terra distributes sizable earnings to shareholders, giving CF a nice recurring income stream with almost no legwork necessary. Both companies have far outpaced fertilizer companies such as PotashCorp (NYSE: POT) and Mosaic (NYSE: MOS), which focus more on potash- or phosphate-based fertilizer. It also doesn't hurt that Moody's raised CF's credit investment grade with a positive outlook yesterday.

What you need to know
Nitrogen fertilizer companies are generally doing fabulously, with CVR Partners (NYSE: UAN) also nudging against 52-week highs despite narrowly missing analyst estimates for its earnings this week.

Company

P/E Ratio

Annualized 3-Year Earnings Growth

Net Margin (TTM)

CF Industries 9.1 63.2% 25.2%
Terra Nitrogen 17.0 52.1% 36.1%
PotashCorp 13.6 46.5% 36.6%
CVR Partners 19.5 31.8% 43.7%
Mosaic 11.2 2.3% 18.6%

Source: Yahoo! Finance. TTM = trailing 12 months.

As you can see, there are still plenty of bargains in the sector, with CF's single-digit P/E making it still the best value. On the other hand, its dividend looks comparatively puny next to CVR's 8.5% yield or Terra's 6.6% yield. Mosaic, despite competing on valuation, has grown earnings far less and seems to be a more stagnant company than the fast-growing nitrogen producers.

CF's net income has soared in the past two years, far outpacing the actual growth of its stock price. When I recently investigated Terra's tailwinds, I found little reason to doubt the continued strength of nitrogen-based fertilizer companies, and CF will certainly be taking full advantage of those tailwinds as well.

What's next?
Where does CF Industries go from here? That will depend on how eager farmers are to pay higher prices for fertilizers to juice crop yields. This year, at least, there's every indication that farmers are quite eager for more yields, which is great news for CF. The Motley Fool's CAPS community has given CF a coveted five-star rating, with only 44 of more than 1,200 participants expecting the stock to reverse its 52-week trend. Count me among them -- I've had my own outperform CAPScall on CF since last fall, and plan to maintain it.

Interested in tracking this stock as it continues on its path? I highly recommend adding both CF and its fellow fertilizer producers to your personalized stock watchlist for daily updates, as what affects one can easily affect the others.