As New Year's Eve quickly approaches, and we prepare to make our 2013 investing resolutions, it's a good time to reflect on the materials sector in the year that was 2012. In this December series, our writers will be recapping some of the most popular, highest-performing stocks in this sector. We'll examine whether the gains these companies provided their shareholders in 2012 are sustainable, or whether they merely can be attributed to one-time events or fizzling trends. Consider these pieces as gifts to benefit our Foolish, long-term investors seeking exposure to the materials sector. Enjoy, and Fool on!

Foolish investing is a bit like planting a crop, and any farmer can tell you that there's plenty of work required between planting and harvesting to ensure a healthy yield.

CF Industries (NYSE:CF) knows a thing or two about maximizing yield, for farmers and shareholders alike. Strong global demand for fertilizer has sustained a strong price environment for CF Industries' products through 2012, and the sheer scale of long-term demographic trends that are driving that demand bode well for those healthy profit margins to continue right into 2013... and beyond!

But the phenomenal success of CF Industries in 2012 -- reflected in the stock's bountiful 43% advance, year to date -- grew from something more than just those strong prices. The company leveraged those prices more effectively than any of its major peers to drive superior returns for its shareholders.

Just a couple of years ago, it was PotashCorp (NYSE:POT) that dominated the group with peer-leading profitability in both gross margin and EBITDA margin. And although PotashCorp continues to perform admirably, CF Industries has harvested some major margin improvement to surge ahead of the pack with a remarkable EBITDA margin of 53% over the trailing 12 months. That's more than triple the corresponding margin for competitor Agrium (NYSE:AGU), and 47% greater than that of Mosaic (NYSE:MOS).

Clearly, the company is executing well on operating costs to make the most of the low prevailing prices for natural gas (the fertilizer industry's primary cost input). In addition, CF Industries has exhibited a knack for effective allocation of capital, as reflected in the company's truly peer-dominating returns on invested capital. Over the trailing 12 months, the company enjoyed a lustrous ROI of 40%, which is more than twice the return of its closest competitors.

But there's also a little more to it. I attribute a major portion of that success to the company's move to acquire key assets from Terra Nitrogen (NYSE:TNH) back in 2010, which tipped CF Industries' product mix more strongly in the direction of the fastest-growing segment of fertilizer demand. U.S. demand for nitrogen-based fertilizers looks set to sustain a healthier growth rate than those for phosphate and potash products, and CF Industries has moved decisively to dominate the domestic nitrogen market by approving $3.8 billion in major expansion projects over the next several years. Chiefly by expanding production from its Louisiana and Iowa production facilities, CF Industries looks to parlay that capital investment into a 35% increase in annual nitrogen production capacity to reach 8.4 million nutrient tons by 2016. Another important contribution to that growth spurt will come from the pending acquisition of a 34% stake in Canada's largest nitrogen fertilizer complex.

The bigger picture for global agriculture demand
When legendary commodities trader Jim Rogers advised Steve Forbes back in May to launch a new service called "Forbes Farming," I don't suspect that Forbes gave the idea any serious thought. But Jim Rogers has been known to spot significant bull market trends in their infancy, and the day may well come that Forbes wishes he had heeded Rogers' friendly advice. Here's what Rogers had to say on the outlook for agriculture:

There's going to be a huge shift in American society, American culture, in the places where one is going to get rich. The stock brokers are going to be driving taxis. The smart ones will learn to drive tractors so they can work for the smart farmers. The farmers are going to be driving Lamborghinis. I'm telling you. You should start Forbes Farming.

Although Jim Rogers retains a bullish long-term outlook for multiple commodities, including gold, he recently reiterated that he is "long agriculture more than anything else." While he has made a point to emphasize the positive outlook for gold in the midst of the global debt crisis, Rogers has consistently pointed to agricultural commodities over recent years as the top investment opportunity of our time. Accordingly, the Market Vectors RVE Hard Assets Producers (NYSEMKT:HAP), which tracks Rogers' own namesake index, features PotashCorp and seed peddler Monsanto (NYSE:MON) alongside equipment manufacturer Deere (NYSE:DE) among the ETF's top 10 holdings.

So what is it that has this experienced and successful commodities trader so confident in the outlook for the agricultural industry in particular? Essentially, it comes down to the emerging collision between powerful global demographic trends pointing to significant long-term-demand growth on the one hand, and a persistent shortfall of investment in new capacity to match that demand growth on the other. The United Nations projects that an additional 1 billion inhabitants will walk the planet by 2025, while important economic transformations under way in places like China point to sustained growth in demand for animal protein (and with it the grains required to feed those animals).

In this Foolish discussion of Monsanto posted Tuesday, you'll find a pair of striking charts depicting the 60%-plus increase in global corn consumption projected from the year 2000 to the year 2020, and the simultaneous decrease in per-capita arable land that's expected to be available for planting. As a result, industrial farmers will be pressured to continue to press crop yields toward their theoretical limits, which would involve generous application of the fertilizers that CF Industries produces and distributes. 

The outlook for CF Industries in 2013
Although it's important to look for potential pitfalls from any stock that's coming off the kind of year that CF Industries has enjoyed in 2012, I think the available indicators and outlooks are tipped in favor of another profitable year ahead in 2013 for CF Industries and its shareholders. I'm not suggesting that another 43% advance is in the cards, but I do give the stock a very strong shot at outperforming the broader stock market once again.

Fool contributor Christopher Barker has no positions in the stocks mentioned above. The Motley Fool owns shares of CF Industries Holdings. Motley Fool newsletter services recommend Monsanto Company. Try any of our Foolish newsletter services free for 30 days. We Fools may not 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.