Image source: Getty Images.

What makes a risk-resistant stock? There's no one magic formula, but some things to look for include a dominant position in its industry, competitive advantages over peers, and the ability to survive or even thrive during tough economic times. Here are two REITs that could help you achieve market-beating performance while still allowing you to sleep well at night.

College housing is booming

College enrollment figures continue to rise, and there is a big trend toward upscale student housing, particularly housing communities that are off-campus but are within walking distance. A great stock to capitalize on this trend is American Campus Communities (ACC), the largest developer, owner, and manager of student housing in the U.S.

There is no shortage of growth opportunity ahead. The company currently has a 4.5% market share in its target markets, and it feels that growing this figure to 10% is achievable. We're talking about an addressable market of 6.3 million students at 280 schools, so this would be no small feat. And, the college housing industry is still highly fragmented, which is a big competitive advantage for the largest and most efficient operators like American Campus Communities.

Since its IPO in 2004, American Campus Communities has grown from 16 to 163 properties, and has expanded its footprint into a total of 71 markets. Rental revenue has grown at an average of 3.4% per year, and average occupancy has been 97.7%. The company's funds from operations (FFO) growth (REITs' version of "earnings") has outpaced non-specialized apartment REITs by a significant margin, and with several major new projects currently under development, there's no reason to believe this will change.

American Campus Communities' biggest advantage is that it offers a product that Is better than the competition, and at a lower price. The average on-campus shared housing unit costs $682 per month, is not modernized, has few amenities, and lacks privacy. On the other hand, American Campus Communities' average rent is $651 per month for a more modern housing product with tons of amenities, more privacy, and significantly better customer service.

Because of this, not only does American Campus Communities capitalize on the trend toward high-end off-campus housing, but it is also a more economical option, which makes it recession-resistant as well.

Highly profitable real estate -- at a discount

I've written before about leading self-storage REIT Public Storage (PSA -1.33%) as an excellent long-term investment, and since shares have fallen more than 26% from their peak in the midst of real estate sector weakness, now could be an excellent time to get in at a discount.

PSA Chart

PSA data by YCharts.

For one thing, Public Storage is the dominant player in its industry -- by far. In fact, the company is larger than its next three competitors combined.

The self-storage business is an attractive one, especially from a risk-averse standpoint. Operating expenses are relatively low, when compared to other types of real estate, and Public Storage has said that it could break even with just 30% occupancy. With current occupancy in excess of 95%, this is a big margin of safety. In other words, Public Storage could lose more than two-thirds of its tenants and remain profitable.

As far as growth is concerned, don't let the recent drop in the stock price trick you. The self-storage business is doing just fine. Through the first nine months of 2016, Public Storage's same-store revenue grew by 5.8% while expenses grew by just 2.5%. Occupancy remained steady at 95.3%, and this produced core FFO growth of 10.9% year over year.

Finally, Public Storage recently announced a 11% increase in its quarterly dividend to $2.00 per share, which translates to an annual yield of 3.9%. And with FFO in the $2.50-per-quarter neighborhood, not only is this a safe dividend increase, but there should be plenty of room for further growth in the future.

Low-risk doesn't mean risk-free

As a final thought, it's important to point out that low-risk doesn't mean that a stock is risk-free. I believe that both American Campus Communities and Public Storage can weather recessions better and are generally less vulnerable to competition as compared to most other companies, but they are far from bulletproof.

For example, if interest rates rise faster than expected, it could drive the entire REIT sector down, taking these stocks along with it. If college enrollment drops dramatically, American Campus Communities could find itself with a spike in vacancies. And in a deep recession, the self-storage business could certainly take a hit as people try to cut expenses.

The point is that while these stocks are risk-adverse and have excellent long-term growth potential, there is no such thing as a free lunch in the stock market, and you should still invest accordingly.