Shares of for-profit prison operators Corrections Corporation of America (NYSE: CXW) and Geo Group (NYSE: GEO) both hit 52-week highs yesterday. Let's take a look at what's driving these gains to find out whether there are still clear skies ahead.

How it got here
Both companies have had a great year, but the winner is clearly Corrections Corp, which is up over 50% in the past 52 weeks:

CXW Total Return Price Chart

CXW Total Return Price data by YCharts

Corrections Corp had a good August. Despite lower profit in the second quarter as a result of the company's efforts to transition toward a REIT corporate structure, Corrections Corp still narrowly beat analysts' expectations on both top and bottom lines. That REIT transition is progressing at a good clip, with IRS meetings and a request for a private letter ruling nudging the process along.

Geo's August was quite similar, with its second-quarter results about in line with analyst expectations. The company narrowed its full-year forecast, which remained within the same range as before, but shrank from $1.54 to $1.60 per share in EPS to $1.56 to $1.58 in EPS. Geo is also looking at REIT conversion and has asked the IRS for a private letter ruling. The company's retained Bank of America's (NYSE: BAC) Merrill Lynch division and Barclays (NYSE: BCS) Capital division as financial advisors for the transition.

Is this pre-REIT enthusiasm warranted? Let's dig into the numbers to find out.

What you need to know
Both companies have enjoyed quite the run-up this year, but growth hasn't been backed by the bottom lines. As you'll see below, nearly all of 2012's gains have been nothing more than price appreciation, which has pushed P/Es to multiyear highs:

CXW P/E Ratio Chart

CXW P/E Ratio data by YCharts

Geo's net income has grown faster and more consistently than Corrections Corp's, but both have seen bottom lines turning down in 2012. As REITs, the companies could still be worthwhile investments, since their dividend payouts would have to rise significantly. Corrections Corp currently sports a 14% payout ratio, and Geo's is about 8%. However, it appears that both have seen their profit margins shrink slightly in the last few years:

CXW Profit Margin Chart

CXW Profit Margin data by YCharts

If you're interested in investing in these companies for potentially hefty future dividend yields, it's also worthwhile to watch free cash flow levels. Dividend payouts come from cash flow, so financial gimmickry on the income statement could cause payouts to be higher than can be sustained by cash flows. On this metric, Corrections Corp is indisputably a better investment, as its free cash flow remains consistently above net income, while Geo's free cash flow has never exceeded its net income:

CXW Free Cash Flow TTM Chart

CXW Free Cash Flow TTM data by YCharts

What's next?
The Motley Fool's CAPS community has given Corrections Corp a five-star rating. Only five of 107 CAPS All-Star players expect the company to underperform in the future. Geo's much less loved, with a two-star rating and six of 40 CAPS All-Stars rating it an underperform. Interested in tracking these stocks as they progress toward the REIT kind of corporate structure? Add them both to your watchlist now, for all the news we Fools can find, delivered to your inbox as it happens.

Also, find out how B of A's integration of Merrill Lynch has gone in this premium report on Bank of America.