The first half of 2012 is in the rearview mirror, and investors are gearing up for what looks to be an action-packed ending. There are bound to be some big winners -- and more than a few duds -- no matter what happens in the United States and abroad.

Will your favorite stock have its victory lap as we hit the home stretch, or will it get lapped? First-half performances can hold some clues, so let's look to the recent past to find out whether Terra Nitrogen (NYSE: TNH) deserves a place in your portfolio going forward.

First-half recap
Terra has been on a wild ride in 2012, soaring through early planting season before falling apart in May. Still, shareholders have held on to some solid gains through the first half of the year, as you can see here:

TNH Total Return Price Chart

TNH Total Return Price data by YCharts.

Here are a few financial snapshots of its recent performance:

Market Cap $4.0 billion
TTM Revenue $800 million
TTM Net Income $292 million
TTM Free Cash Flow $503 million
MRQ Revenue $197 million
MRQ Net Income $71 million
MRQ Free Cash Flow $132 million
MRQ Revenue/Net Income Year-Over-Year Change 0.5%/(42.1%)
P/E and Forward P/E 14.0/12.1
Price to Free Cash Flow 8.0
Motley Fool CAPS Rating (out of 5) **** (find out more by clicking here)

Source: Morningstar. TTM = trailing-12-month. MRQ = most recent quarter.

What the numbers don't tell you
Terra shareholders saw fantastic gains, which kicked into action at the end of last year. This is all part of a long-running increase in demand for staple crops (particularly more corn) from emerging nations. I've pointed out several times why this trend has affected Terra more than potash and phosphate specialists. PotashCorp (NYSE: POT) recently hit a 52-week low, bucking the trend of nitrogen gains led by Terra and its majority owner CF Industries (NYSE: CF).

This shift toward nitrogen and away from other fertilizer formulations is more pronounced if you compare nitrogen specialists Terra, CF, and Rentech Nitrogen Partners (NYSE: RNF) to PotashCorp and Mosaic (NYSE: MOS), a diversified fertilizer company that reduced its phosphate production earlier this year.

TNH Total Return Price Chart

TNH Total Return Price data by YCharts.

Fool analyst Dan Dzombak awarded Terra the top spot on his Value Investor 500. As he put it, "[fertilizer] commodities have taken off in demand and price over the past few years, while one of Terra's biggest costs -- natural gas -- has cratered in price. The company has been reaping the rewards."

Looking at the price of corn alongside the cost of Terra's inputs and outputs offers an easy way to understand Terra's position. Farmers want money. Corn is bringing in more money than ever. To get more corn, apply fertilizer. You can see where this is going. Here's another source to see more information on Terra's past performance relative to its inputs and outputs.

That's not to say Terra is in the clear. As developing markets giveth, they can also taketh away. The latest news out of China has been worrying, and should its economy come back to earth, it's likely that corn demand would drop. That would cause a cascade reaction to smash into Terra's bottom line. Rising natural gas prices also loom. After years of oversupply, there are now fewer active nat-gas drilling rigs than at any other time in this millennium.

For the time being, Terra is still a great investment, with one of the most attractive dividends on the market. On the hunt for other great dividend stocks? The Motley Fool's got a few suggestions, which combine Terra's qualities of sustainable yield and strong share-price growth. To find out which stocks should be next on your list, check out our latest free report: "The 3 Dow Stocks Dividend Investors Need."