Shipping companies DryShips (DRYS) and Seaspan (ATCO) have been on fire this year, with both surging more than 50%. Fueling these stocks have been improving conditions in the shipping market, which, along with some needle-moving strategic moves, have helped boost their financial results. The rally likely has investors wondering if they missed the boat. Here's a closer look at whether either shipping stock still has enough upside potential to make it worth buying.

The bull and bear cases for DryShips

DryShips has come a long way over the past few years. The company sold off much of its fleet a few years ago to pay down debt, only to quickly rebuild it as soon as its financials were back on solid ground. As a result, the company now operates a diversified fleet of 30 ships that include dry bulk vessels, oil tankers, gas carriers, and offshore support vessels. This fleet generated $49.6 million of revenue during the third quarter, up 66% year over year, while also producing $11.6 million, or $0.12 per share of net income, a huge reversal from the year-ago loss of $15.2 million.

A sailing container ship at sunset on the sea.

Image source: Getty Images.

Aside from operating a larger fleet, DryShips has also benefited from higher shipping rates. Its oil tankers, for example, captured a 69% higher rate during the third quarter, while the average daily charter on its dry bulk carriers surged 58% year over year. That's worth noting since those rates could sink if shipping market conditions deteriorate. Shipping rates are notoriously volatile and have hurt the company in the past. The most recent downturn in the shipping market led the company to sell off most of its fleet so it could shore up its debt-laden balance sheet.

Another issue with DryShips is the company's poor track record as a steward of shareholder capital. While shares of Dryships are up more than 50% this year, they've plunged nearly 100% in the last three years. That's because the company issued a boatload of new stock to finance its fleet rebuild, which diluted existing investors and weighed on the share price. While the company has started to chip away at that dilution by authorizing a share repurchase plan, its reckless behavior in the past is a big red flag.

The bull and bear cases for Seaspan

Seaspan has also spent the past few years shoring up its financial situation. The company has secured new funding from several sources, which put its balance sheet back on solid ground. At the same time, it has continued expanding its fleet of containerships, which currently stands at 112. Its most recent acquisition, when combined with an improving shipping market, helped boost the company's revenue nearly 30% in the third quarter to $295 million. Meanwhile, earnings surged almost 39% to $0.36 per share.

One of the things that set Seaspan apart from Dryships is that the company secures long-term, fixed-fee time charters for most of its container ships. As a result, Seaspan's revenue is much more stable since it has limited exposure to changes in shipping rates. Currently, the company has secured $5.1 billion in future revenue on contracts that have an average remaining term of five years. Because of this, only 8% of the company's revenue in 2019 has exposure to market rates, which means it's well insulated should charter prices sink in the coming year.

Seaspan's contracts enable the company to generate predictable cash flow that it uses to pay its dividend, which currently yields 5.7%, as well as continue shoring up its balance sheet. The company intends on using its financial flexibility to make additional investments to grow its business in the coming years, which should continue expanding cash flow.

Another thing in Seaspan's favor is its valuation. At the company's current annualized run rate, it trades at only 6.3 times earnings, even after this year's more than 50% surge. DryShips, on the other hand, sells for 12.5 times its current annualized earnings run rate after its rebound.

Verdict: Seaspan is the better buy

While both shipping stocks could continue to climb as their fleets expand and market conditions improve, Seaspan is the better option for long-term investors. That's because it has less exposure to volatile shipping rates, pays an above-average dividend, and is a much cheaper stock -- not to mention it has a much more shareholder-friendly management team. Those factors should give Seaspan a leg up on DryShips over the long term, making it the better stock to buy.