A down market is a great time to buy shares of stocks in companies that may be poised to recover, and investors who successfully make that move can be forgiven for considering themselves geniuses, at least for that moment.

It takes more than just luck, though, to choose equities with past performance and future prospects that together point to their prospects as genius moves right now.

Alexandria Real Estate Equities (ARE -0.90%) and Crown Castle (CCI -0.67%) are two to consider now in a recovering stock market that some are calling a bear turning bullish.

Alexandria and Crown Castle are in very different businesses but are both real estate investment trusts (REITs). Their current prices could be a temporary aberration that could make this a very good time to pick up some shares at cheaper prices.

Charts showing Alexandria's and Crown Castle's total returns and prices lower than the Vanguard S&P 500 ETF's.

VOO Total Return Level data by YCharts

The table above shows how well those two stocks have fared over the past 10 years in both share price and total return. They both consistently hung with the greater market -- as represented here by the Vanguard S&P 500 ETF (VOO 1.00%) -- until recent months, when the S&P 500 recovered and they didn't.

A pair of REITs poised to rally

At least, they haven't yet. There's good reason to believe they will, for different reasons. Alexandria is the first and largest pure-play owner of life sciences real estate. Its 430 properties are clustered in what it calls collaborative campuses in and around San Diego, San Francisco, Seattle, Boston, Washington, D.C., and Research Triangle in Raleigh, N.C.

Alexandria's market popularity has been affected by the broad negative sentiment toward office properties, and concerns that any cutback in biotech funding cliff could reduce demand for lab space​.

But this different kind of office REIT has about 1,000 big pharma, university, institute, government, and start-up tenants and boasts a high occupancy rate for both its existing properties and its robust development pipeline. Its position as a provider of office/lab space for work you can't do at home should stand it in good stead going forward.

Crown Castle, meanwhile, is an infrastructure REIT and boasts what it calls the largest telecommunications infrastructure network in the U.S., with a portfolio of more than 40,000 cell towers, 85,000 miles of fiber-optic cable, and 120,000 small cell nodes.

Like Alexandria's labs for rent, this is must-have space that's hard to replicate. But the lion's share of Crown Castle's revenue comes from the major mobile carriers, so concerns about a reduction in tenant use resulting from the Sprint and T-Mobile merger are expected to push down income for the next year or two.

The organic growth at CCI remains solid as the 5G rollout and artificial intelligence continue to drive growing appetite for digital bandwidth in its strictly domestic market.

Chart showing the total return growth of Alexandria and Crown Castle higher than the S&P 500's since 2005.

CCI Total Return Level data by YCharts

The Motley Fool advocates buying shares of stocks in great companies and then hanging on to them and building your stake over the long run. Crown Castle went public in 1994. Alexandria went public in 1997. The chart above shows what just $250 in each at the time would be worth now, assuming reinvestment of dividends.

Dividend machines at a nice price

Of course, you have to have dividends to reinvest, and both these companies have proven to be dividend machines. Alexandria has raised its payout for 12 straight years, including by an average of nearly 6% each of the past three, and is currently yielding about 4%.

Crown Castle, meanwhile, is on an eight-year run of dividend increases that have averaged 9% each year over the past three and is yielding an even nicer 5.5%.

I'm confident enough in both the markets and management of these two REITs to have owned and added to my stake in them for several years. Analysts give them both "moderate buy" signals and consensus target prices that are 36% higher than current price levels​. I agree with their optimism and intend to add more shares going forward.