As much as the rest of the stock market has been on a strange, painful ride over the past six weeks, oil stocks have been brutalized. Global oil markets are in total disarray as oil demand craters with global travel all but halted, and Saudi Arabia threatens to flood the market further in an effort to re-establish its dominance. 

Yet even with demand cratering and global heavyweights threatening to drown out competitors, there's still hope. OPEC and other producers including Russia are set to meet this week to discuss potential output cuts to help stabilize oil prices in the near term. In the long term, oil demand will recover once travel resumes and businesses reopen. 

Hand reaching for cash in a rat trap.

The oil patch is laden with risk, but there is value for investors willing to be patient. Image source: Getty Images.

The latter -- an eventual recovery for oil -- has many investors hunting in the oil patch for value right now. After all, while many oil producers will struggle and some will fail, there should be plenty of value to be had for patient investors willing to ride out the worst of the downturn. And that's true; but the challenge right now, is discerning where there's value, and where there's a trap waiting to spring. 

The place in the oil patch where value is already being destroyed

The one segment of the oil industry that's filled with value traps now is the independent producer space. We have already seen one former high-flying independent producer fall from grace, with Whiting Petroleum (WLL) filing for chapter 11 bankruptcy to restructure its debt in early April.

The company will continue as a going interest and emerge from bankruptcy with a much stronger balance sheet, exchanging $2.2 billion of its debt for equity. But common shareholders will see 97% of their stake in the company evaporate if the courts approve the deal -- which is likely -- with its lenders. 

Whiting may be the first of the big independent producers to wipe investors out, but it's unlikely to prove the only. Chesapeake Energy (CHKA.Q) has been on the cusp of financial trouble since well before the oil crash, and could be in serious trouble sooner rather than later

The list gets longer the more you deeper you go. Here are how several other independent producer's balance sheets compare to Whiting and Chesapeake:

WLL Financial Debt to EBITDA (TTM) Chart

WLL Financial Debt to EBITDA (TTM) data by YCharts

That's a massive amount of debt leverage, particularly when you consider how much their earnings are set to fall in the current oil price environment. For context of how leveraged these (and plenty more) producers really are, ExxonMobil (XOM 1.39%) sports a debt to EBITDA ratio (that's earnings before interest, tax, depreciation, and amortization) below 1.1, and a 12.5% debt-to-assets ratio. Not to mention the diversity of its operations that give it other sources of cash flow when oil prices crater. 

Simply put, the pure-play producers that already have a ton of debt are in trouble. Oil prices are down 60% since the first quarter, and back below $24 per barrel. Most producers need $40 oil to just cover their costs, much less make a profit. 

Even massive cuts, like those made by Apache (APA -1.01%) to its capital spending and dividend, will only go so far to keep lenders at bay. Occidental (OXY -0.14%), with more than $3 billion in cash at quarter-end, has some margin of safety, but most producers don't even carry enough cash to cover a single quarter's operating expenses. 

If you're an overleveraged producer, good luck getting any bankers to take your call right now. Bankruptcy could prove the only path forward for many producers over the next couple of quarters. 

Where you can find value in the oil patch

Like in other industries that are subject to big cyclical shifts in demand, the companies with the best balance sheets, some ability to scale their operations, and diversity of those operations, tend to make the best investments. That's certainly the case in the oil industry. 

The reason? Simply put, the companies that have the ability to survive an extended downturn will be the ones that generate the most value. Start with reducing downside risks first, and then capturing returns. 

In the oil industry, that means the integrated majors. Top companies such as Royal Dutch Shell (RDS.A) (RDS.B)Chevron (CVX 0.63%), and the aforementioned ExxonMobil along with non-producer, but still highly integrated Phillips 66 (PSX 1.00%)

Here's how these four compare with the other highly leveraged producers: 

CVX Financial Debt to EBITDA (TTM) Chart

CVX Financial Debt to EBITDA (TTM) data by YCharts

There's more to the value-preservation aspect. Independent oil producers count oil reserves as their biggest asset. With oil prices down more than 60%, many producers will be forced to write down the value of their holdings in the near future. That will further erode their value to access capital. 

It's worth noting that the integrated major above with significant downstream segments will deal with the same thing, but to a lesser degree. They will continue to own the pipelines, refineries, and petrochemicals facilities that producers will still need to turn oil into money, and those assets should hold their value much better. Phillips 66, which does not operate any oil production, will dodge this issue completely (a reason it's still my pick for the biggest winner). 

In addition to having lower leverage, these integrated majors also have substantial liquidity reserves. Shell ended the quarter with $18 billion in cash and equivalents, Chevron had $5.75 billion, and ExxonMobil had $3.1 billion. When you start adding in low-cost debt they can tap, the numbers get even bigger. Even Phillips 66, with "only" $1.6 billion in cash, has another $5 billion in credit management can access at a moment's notice. 

That's why, as a category, the integrated majors have seen their stock prices hold up much better than independent producers: 

CVX Chart

CVX data by YCharts

But as the chart above shows, there's still tremendous upside to be had, along with a lower risk of permanent losses. For instance, Shell, ExxonMobil, and Phillips 66 share prices would have to almost double to get back to where they were less than three months ago, while Chevron stock would have to gain 50% to fully recover. 

The recovery may take longer than you think

Hourglass with stacks of coins.

Image source: Getty Images.

Don't make the mistake of assuming that the value to be found in the oil patch will result in a quick buck. Oil prices are not likely to bounce back anytime soon -- at least in a sustained way -- even if we see major cuts from global oil producers soon.

The crash in global oil demand is going to be so extreme, it's creating a bigger short-term problem: nowhere to put all the oil that's being produced. That could send oil prices falling even further as producers scramble to shut in production and fill every storage facility available to the brim. And all that excess oil will create a bigger problem, adding to how long it takes for the industry to recover. 

Add it all up, and investors who race too quickly into oil stocks could also lose another way: opportunity cost. I expect plenty of investors will hold oil stocks, waiting for a recovery, while plenty of other sectors of the economy bounce back and return to full strength much sooner. 

So before you rush into the oil patch looking to load up on bargains, consider that while there is value, the oil recovery could take a lot longer than other sectors, and even the best-capitalized companies might not deliver the returns you expect as quick as you want.