The S&P 500 index is up 36% over the past three years despite the recent market pullback. Beating that performance are real estate investment trusts (REITs) Innovative Industrial Properties (IIPR 0.06%) and Hannon Armstrong Sustainable Infrastructure Capital (HASI 1.25%). Both are focused on growing sectors that offer long-term appeal. However, the best part of the story is that, despite strong longer-term performance, Innovative Industrial and Hannon Armstrong are both pulling back right now along with the market. That's an opportunity to get on these niche gravy trains.

Marijuana use is getting normalized

Marijuana was, at one point, looked at as a verboten gateway drug. Not so much anymore, with the plant now legal in 38 states for medical purposes and 18 on a recreational basis. As legalization continues to spread, the industry is projected to expand from $24 billion in sales in 2020 to $46 billion by 2026. This is the market that Innovative Industrial Properties serves. 

Two people on a seesaw.

Image source: Getty Images.

The REIT focuses on sale-leaseback transactions in the grow house space. These are unique industrial properties that require special permitting and are mission-critical to the sellers. This is why the sellers are willing to take on long-term net leases, in which they are responsible for most of the property-level operating costs. Innovative Industrial Properties has used this simple model to expand from one property to 109 since its initial public offering in 2016. And yet the stock has plunged 55% since peaking in late 2021.

Despite that drawdown, however, the shares are still up some 50% over the past three years -- way better than the S&P 500 index's gain. The key here, however, is that the drop doesn't seem justified given the opportunity ahead for the marijuana space as the drug continues to be legalized and its use more broadly accepted. There are naysayers, including a short-seller that put out a negative report on the REIT questioning its business model. Innovative Industrial disputes the claims, suggesting that the short-seller doesn't understand the marijuana market and why properties used for growing weed are unique and not easily replaced. If you can see how Innovative Industrial Properties' portfolio stands out in this growing industry, the current price decline is probably best viewed as a buying opportunity for a long-term growth stock.

Not your typical mREIT

Market sentiment goes up and down, even for companies that do things in unique ways. That's a quick summary of mortgage REIT Hannon Armstrong. The stock is down 45% from its early 2021 high, but still up more than 40% over the past three years. Like Innovative Industrial's, this drawdown is probably an opportunity to get in on a long-term gravy train.

Most mortgage REITs invest in debt obligations backed by houses. Hannon Armstong makes loans to owners of clean energy assets like solar and wind farms. These are vastly different approaches in the mREIT space. Notably, Hannon Armstrong's loans are backed by the long-term contracts that underpin the power projects it helps to finance. So there's an incredible amount of clarity for the cash flows it generates from its portfolio. And since the world continues to move toward clean energy investment, there's no reason to think the REIT's investment opportunity will diminish. In fact, just the opposite is likely to occur.

Notably, Hannon Armstrong was able to increase the size of its portfolio by 28% year over year in the first quarter. Distributable net investment income grew a heady 41% over the same quarter in 2021. And the board was comfortable enough with the business outlook to increase the dividend 7%. These are not the types of things you expect from a REIT that's struggling.

This isn't meant to suggest that Hannon Armstrong is immune to the developments in the clean energy space. It isn't and there are headwinds to deal with right now, like supply chain disruptions that are slowing project developments. However, the long-term trend is still for industry growth and this niche REIT is poised to keep growing along with the industry. If you can stomach some volatility, this is a name you'll want to look at for the long term.

Enjoy the ride

When kids go to the park, they enjoy rides that adults would probably prefer to avoid. The ups and downs of the seesaw are one example, but a really poignant one for investors. That's because no stock goes up or down in a straight line. But if you can see the downdrafts in companies with still strong long-term opportunities, then the seesaw action of Wall Street can look a lot more appealing. Innovative Industrial and Hannon Armstrong are both viewed negatively today, but the long-term potential for each is still strong. Contrarians will see this period as a chance to get into these gravy train stocks at a discounted price.