After roaring back from multiyear lows and posting an astounding 188% gain in 2017, shares of shipping container lessor Textainer Group Holdings (TGH) have collapsed 21% in the first two months of 2018. An unexpected earnings flatline in the fourth quarter of last year resulted in a major one-day drop, while the announcement of an asset-backed loan sent shares lower once again.

Despite the market's recent reactions, the operating environment for the shipping container industry isn't that bad. Rather, it appears Wall Street is treating a speed bump as a brick wall. That's good news for long-term investors, who can use the dip as a buying opportunity. Here's why Textainer Group Holdings is the one stock I'd buy right now.

A blue container, surrounded on both sides by stacked containers in varying colors, being lifted at port.

Image source: Getty Images.

The container market is booming

When Textainer Group Holdings announced full-year 2017 results in mid-February, Mr. Market was spooked that the company's long streak of operating margin improvement had ended. Operating margin climbed from 8.1% in Q4 2016 to 35.8% in Q3 2017 -- no doubt a major driver of the stock's incredible rise last year.

Then, in the last quarter of 2017, operating margin came in at 35% (gasp!). 

Wall Street's knee-jerk reaction is a little more understandable when you consider the awful recent past of the shipping container industry (and the currently awful environment for shipping vessel owners). But the increase in operating expense in the most recent quarter is not expected to derail the company's recovery, because the market for shipping containers right now is better than it's been in years.

According to an investor presentation given in February, Textainer Group Holdings is enjoying tailwinds in three vital metrics: new container leasing rates (initial leases), used container leasing rates (mid-life releases), and the price received for selling used shipping containers at the end of their useful life (disposition). 

Containers in different colors sitting in the Port of Rotterdam at daylight.

Image source: Getty Images.

New containers and those at mid-life are being rented out at prices above the company's average lease rate. In other words, each time a container's lease expires in 2018, Textainer Group Holdings can rent it out at a higher price, resulting in higher revenue and earnings from the same asset. Meanwhile, investing $625 million in new containers last year -- second-highest in the global industry -- should allow the company to exploit the rental rate trend for new containers, too.

The higher prices are likely here to stay, too, considering the increase is being driven by new regulations in China, higher manufacturing costs, currency fluctuations, and balanced demand. The stability of the price increase is important to how the next several years play out for Textainer Group Holdings. Why?

Textainer has leases totaling 250,000 container equivalent units (CEU) expiring in 2018 and another 330,000 CEUs concluding next year, which is equivalent to about 17.5% of its total fleet. Many of those containers can be put back into service at rental rates that are, at worst, incrementally higher than the daily rates of their current agreements. Things get even better in 2020 and 2021 if pricing trends can hold (or at least not collapse), as containers under contracts that expire in that two-year period could be released at significantly higher rates.

Of course, investors will be more focused on the near-term results, especially for a volatile industry such as shipping. Good news: Textainer Group Holdings expects profitability to continue its trek higher throughout 2018, beginning with the first quarter. Considering that the company's operating margin has approached and even exceeded 50% for full-year periods in the not-too-distant past, there's plenty of room for improvement. And all of the pieces seem to be in place for that journey to continue this year. 

A good buying opportunity

Textainer Group Holdings stock soared in 2017 -- and it deserved every penny of the gains. The global shipping container industry has been bolstered by several positive pricing trends that appear to have staying power. Market demand remains strong, so as long as shipping lessors don't go too crazy putting in orders for new containers and accidentally throw off the market balance, there's a real chance for this shipping stock to return to its former glory. That ascension could last another couple of years, but the massive share price decline to start 2018 provides a good buying opportunity for long-term investors.