While both Textainer Group Holdings Limited (NYSE:TGH) and Frontline (NYSE:FRO) operate in the shipping industry, these companies couldn't be more different. Textainer, for example, is one of the largest lessors of shipping containers. Frontline, on the other hand, operates one of the world's largest fleets of oil tankers. The differences in market focus tilt the scale toward Textainer at the moment given that market conditions in the container shipping industry are on the upswing.

How they make money

One of the core differences between these two companies is how they make money. Textainer makes most of its money leasing containers to shipping companies under long-term contracts. As a result, the company generates relatively predictable lease rental income each quarter. So far this year, it has collected $216.4 million in revenue from these leases, which while down about 10% from last year has held up reasonably well considering the abysmal conditions in the shipping sector. Furthermore, it's worth noting that the market deteriorated to such a degree last year that one of the world's biggest shippers -- and a large customer of Textainer -- sank into bankruptcy. If it weren't for the impact of that bankruptcy, Textainer's revenue would have held up even better.

A containership viewed from a shipping container.

Image source: Getty Images.

Frontline, on the other hand, primarily makes money by leasing oil tankers on the spot market, which can be quite volatile. While that volatility can work in the company's favor when spot rates rise, as they did in 2015 when they were above the five-year average, it can work against it when they sink, which has been the case this year since spot prices are near the bottom of the five-year range. If rates decline too far, Frontline can lose money, which happened last quarter when revenue slumped more than 25% versus the year-ago period and probability dipped into the red.

Comparing the market outlooks

Unfortunately for Frontline, those rates do not appear likely to head higher anytime soon due to weakness in the oil tanker market. While oil demand accelerated last quarter, there's an abundance of oil tankers in the market because shippers have taken delivery of several newbuilds this year. That increased supply of ships is causing spot market rates to remain toward the bottom of their five-year average range. In fact, spot rates for Very Large Crude Carriers are so low that Frontline expects them to be below the company's cash cost breakeven level in the third quarter. Meanwhile, with cash breakeven levels for its other ships just marginally below the spot rate, Frontline could lose even more money in the third quarter.

Contrast this with the outlook for the container leasing industry. As Textainer CEO Phillip Brewer noted last quarter, "[W]e continue to see strong improvement in container leasing market conditions." Consequently, vessel utilization is increasing, which is pushing up rental rates for containers that just went off-lease as well as those it recently acquired. Furthermore, Brewer said:

New container prices have not only remained stable but seem likely to increase in the coming months due to production constraints resulting from the challenges of using waterborne paint during the winter months and increases in component costs. For these reasons, we are optimistic.

He's not alone in exuding optimism. Victor Garcia, CEO of rival CAI International (NYSE:CAI), said last quarter that he's "very pleased with the momentum in our business and the rapid improvement in our results." Garcia also said that "though demand was strong in the second quarter, we believe that shipping lines have seen stronger demand so far in the current quarter." Therefore, new equipment is quickly getting leased, which is why CAI "believe[s] demand will continue to be strong through the remainder of the year." That should enable container leasing companies to lock in lucrative long-term contracts for their available containers, which will drive profitability in the coming years.

Just starting to recover

The notable improvement in the container leasing sector has driven Textainer's stock up more than 135% over the past year. However, even with that rebound, shares are still down 41% since the start of 2015, which suggests it could have much more upside. That's certainly the view of the company's CEO, who is quoted in last quarter's earnings release as saying that "we believe that these positive changes and trends, especially the future impact of lease repricing, may not be recognized by the market." That near-term upside potential, in my opinion, makes Textainer the better buy over Frontline right now -- especially since there could be more downside for the oil tanker company due to the wave of new ships that recently entered the market, which could keep the pressure on spot rates.

Matthew DiLallo owns shares of Textainer Group. The Motley Fool recommends Textainer Group. The Motley Fool has a disclosure policy.