Investor sentiment has changed drastically since the end of last year. While optimism marked markets heading into 2022, concerns about slowing economic growth and accelerating inflation have sparked pessimism over the last six months. This, of course, explains why the S&P 500 index fell nearly 21% in the first half of 2022, its worst first half since 1970.

But the good news is that not all stocks have been hit as hard as the broader market. These two real estate investment trusts (REITs) have outperformed the market in 2022, and are excellent buys for the month of July.

An aerial view of a 5G cell tower during the day.

Image source: Getty Images.

1. American Tower

With 221,000 communications assets and 27 data centers in 25 countries, American Tower (AMT 0.58%) is the most dominant cell tower REIT. The company's size and scale is so tremendous that it is the only REIT to boast a market capitalization of $100 billion or more. 

It's not a stretch to suggest that the global economy is dependent on American Tower's infrastructure to function smoothly. This is because cell towers are used by major telecom companies, like Verizon Communications, to broadcast mobile data to its customers. That's what makes it possible for customers to carry out activities like video streaming, online shopping, and internet browsing.

The importance of American Tower's assets to its tenants allows the REIT to lock in annual lease escalators and starting lease terms of five to 10 years on its leases. Average monthly mobile data consumption is anticipated to grow at double-digit rates annually over the next five years in many of the company's major markets. This will lead to demand for additional cell towers in the years ahead. 

Thus, American Tower should achieve at least high-single-digit annual adjusted funds from operations (AFFO) per share in the medium term. This growth rate isn't as impressive as the company's annual 13.8% consolidated AFFO per share growth recorded over the last decade. But it's still impressive given the company's sheer size.

The stock has dipped around 10% in the first six months of 2022, which is impressive compared to the S&P 500's year-to-date decline of more than 20%. However, investors can snag American Tower's market-beating 2.2% dividend yield at a reasonable forward price-to-AFFO-per-share ratio of 25.7.

2. Iron Mountain

Iron Mountain (IRM 1.00%) has approximately 225,000 customers in over 50 industries around the world. The company is dominant in innovative storage and information management services and working to elevate its status as a player in the fast-growing data center industry.

Iron Mountain's legacy records management and storage services businesses comprised nearly two-thirds of its $4.4 billion in total revenue recorded during 2021. The necessity of document storage is why the company's average box of records stays in its storage for 15 years. Iron Mountain's tremendous reputation as a brand is how the company's customer retention rate is an impressive 98%. 

This is how Iron Mountain was able to grow its AFFO per share to a record $3.48 in 2021, representing a blistering 13.4% growth rate compared to the year-ago period. This rapid growth is expected to continue in 2022, with management guidance for 8% midpoint AFFO per share growth to $3.76 for the year. 

The cherry on top of all this is that Iron Mountain offers a whopping 5% dividend yield. With the dividend payout ratio set to be 65.8% in 2022, the company will soon reach its targeted payout ratio in the low-60% to mid-60% range. This should enable Iron Mountain to begin handing out mid-single-digit annual dividend increases in 2023. 

The stock has dipped just over 5% in the first half of 2022. Yet it trades at a lowly forward price-to-AFFO per share ratio of 13.1, making it a great buy for both income and value investors.