Measured by stock market performance, 2011 was an excellent year for grain-based foods. The index of the sector’s shares, compiled by Milling & Baking News, rose to a record high. With a gain of 7.5%, the index beat the S.&P. 500, the Dow Jones average of industrial shares and the NASDAQ averages.

The outperformance was especially unusual given that the year was not one in which the overall market was in a broad retreat with grain/food companies outperforming as a desperate grab by investors at defensive stocks. Still, a deeper look at the Grain-Based Foods Share Index does not paint as bright a picture for baking.

Of the seven companies in the index posting double-digit share price gains, none was a “pure” baking company. Indeed, among the food companies in the index, a higher exposure to grain-based foods tended to mean a poorer share price performance.

While Grupo Bimbo shares gained 8%, beating the index overall, Flowers Foods, Sara Lee, Kellogg, Lance, Maple Leaf, Krispy Kreme and Bridgford Foods all posted smaller gains or even share price declines. This underperformance does align with the very real challenges facing bakers last year as does the better performance by other packaged foods companies, which tended to experience positive profitability trends.

Going into 2012, some of the drags on baking may be taking a turn for the better, but a sober analysis suggests the road may not be much easier, at least in the near term.