Source: Seadrill.

The offshore drilling sector either looks like a place to find some hidden gems right now, or a segment to avoid at all costs. With essentially every publicly traded offshore driller down more than 30% in the past year, it's been ugly to say the least. This summer's oil price swoon has extended the losing streak and may be scaring oil companies away from the expensive offshore projects that these drillers need. 

Yet even with the ugliness in the market, there are sure to be some winners over the next few years. Is now a good time to invest in this sector? Let's dig in.

Where are we in the cycle?
As with most industries and businesses, there are peaks and lulls with the offshore drilling industry. Offshore drillers are seeing some stagnation right now, especially in the lower specification segment. This is being driven by two factors.

First, the majority of the global fleet is jackup and platform rigs, built to operate in the shallowest of seas, usually near land and in relatively calm water and conditions. Jackups, at 658 total vessels globally, according to Rigzone, make up 44% of the global fleet. And a huge percentage of these vessels are more than 30 years old, can't operate in water deeper than 300 feet, and don't have the advanced features that make more modern rigs both safer and more capable. 

But as much as anything, jackups just can't operate in the deep and harsh conditions where most new reserves are being found, and even retrofits -- which can cost close to $100 million in some cases -- won't make most older jackups competitive. 

SDRL Chart

SDRL data by YCharts

Second, the oil and gas industry as a whole has invested significant resources to further develop onshore reserves, with many of the so-called "unconventional" shale reserves in the United States coming at a very high cost in recent years. Even with oil prices remaining near or above $100 since early 2011, rates of return have been lower than many oil companies want to see. This has led to tightening reins on investments in exploration, including offshore, as producers try to increase returns. 

What this means for offshore drillers 
It's a little hard to tell what this will mean for offshore drillers, because it's both a product of oil prices and when producers return to sizable investments in offshore E&P. Even as drillers begin to retire and upgrade older vessels, newbuilds, along with ships built in the past decade, will take the lion's share of new work going forward. It's this large number of newbuilds -- and the debt that often accompanies them -- that investors need to pay the closest attention to. 

The concern is that the tightening of investment in offshore drilling, combined with the number of newbuilds coming online, will lead to more competition for work, which could push dayrates lower. Furthermore, there is the possibility that a number of newbuilds could start entering service without a contract, which is the worst possible situation for the ship owner. Swedish megaconglomerate Maersk just had one newbuild drillship enter service without a long-term contract, so this isn't exactly a non-risk. 

Seadrill Ltd. (SDRL) has one drillship and one semi-submersible scheduled to go online in the fourth quarter that, as of the most recent fleet status report, did not have contracts in place. Furthermore, it has another nine drillships and jackups scheduled to enter operation in 2015 that are not yet under contract. The repercussions of newbuilds entering service without work is twofold: First, these ships must be paid for, which means either capital must be spent, or debt acquired. Either way, the company has now committed capital to an asset that, at least temporarily, isn't generating a return. Furthermore, there is added operational expense to maintain these vessels so they can quickly take on work when it comes available. 

Seadrill has historically been successful at getting -- and keeping -- its vessels working. However, with so many new vessels coming online next year, the market is clearly concerned about the implications of not having work lined up when they enter service -- namely, reducing the dividend if cash flow is reduced. 

Transocean is essentially past the Deepwater Horizon disaster. Source: U.S. Coast Guard.

Transocean (RIG -2.69%), on the other hand, doesn't have any vessels entering service in 2015 not under contract. The company has 14 newbuilds on order currently, with half of them under contract, and the other seven not under contract aren't scheduled to be delivered before 2016. However, Transocean's exposure to the low-end side of the market puts it at risk in the interim, as more of its fleet will be facing increased competition in a shrinking market. 

ENSCO plc (VAL) and Diamond Offshore (DO) are also two of the larger drillers, but their fleets aren't as modern -- especially Diamond Offshore's -- and to date their newbuild programs have been relatively modest. Diamond Offshore's fleet is one of the oldest of operators its size, and this is a notable concern. However, it also has a relatively manageable $2.3 billion in debt, and more than $1 billion in cash, so it has some flexibility as the market plays out. 

Looking further 
The short term is concerning, but the long term isn't as scary. If we look out about 20 years, the International Energy Agency projects that demand for oil will be about 20% higher than it is today. While that's less than 1% annualized growth for all global production, a large percentage of the reserves that will meet new demand hasn't been found yet. A lot of it will be found offshore and will require the kinds of ships that are being built today to operate in deeper water and harsher conditions. 

What to buy is more important than when
While a few of my Foolish colleagues are buying Seadrill now, I'm not -- but it's not because I don't think it's worth a hard look. I already own as much as I feel comfortable owning. If I didn't own shares, I'd probably be buying at these prices. 

Of all the offshore drillers, Seadrill and Transocean look to be positioned best for the long term. These are already two of the largest fleet operators, and both have the most aggressive newbuild programs as well. While Transocean's current fleet is definitely the older of the two, and it's more likely to suffer some utilization problems in the next year or so, it also carries about $3 billion less debt than Seadrill does. Both are yielding more than 9% dividends right now, and (of course) managements are saying that current payouts are sustainable.

However, there is no guarantee that the payouts won't be reduced, and if the offshore market remains stagnant, or if oil prices fall further -- both of which are possible -- share prices could tumble again. With those things in mind, I would invest only in offshore drillers as part of a diversified portfolio, especially if you're counting on those dividends for income. The prices almost look like a steal today, but that doesn't mean they can't -- or won't -- fall further. The market for offshore drillers is uncertain right now, and Mr. Market hates nothing more than uncertainty.