You know how it officially takes two consecutive quarters of negative economic growth before we’re officially in a recession? I’m not sure such a definition exists for the recent downturn in the energy market, but one thing is for sure: investors everywhere are giving up hope that this recovery is going to be V-shaped. We’re all digging in for the long haul.

For contrarian investors, this is the time to start looking at beaten-up oil companies. Yes, some will go bankrupt during this downturn; that much is obvious. But most will survive, leading to some great potential gains down the road. Increases of 100%, 200%, or even more are possible, assuming the price of crude cooperates.

One of the hardest hit companies in the sector is Pacific Rubiales Energy Corp. (TSX:PRE), a Colombian-based producer that was one of the former stars of the sector. Can it eventually recover or is it destined for bankruptcy?

The balance sheet

The first place we need to look is the balance sheet. Upon first glance, it doesn’t look pretty.

At the end of 2014, Pacific Rubiales was $4.7 billion in debt, which was slightly offset by $333 million in cash. Total assets are $10.1 billion, while total liabilities come in at $7.7 billion. The $3.4 billion in book value looks good on the surface—especially considering the company has a market cap of just $820 million—but the market has doubts about whether the assets are really worth that. Remember, management wrote off $1.6 billion in assets at the end of 2014. Additionally, the company’s debt-to-equity ratio of 1.4 times is one of the highest in the sector.

But upon closer examination, the debt doesn’t look so terrible. The earliest debt maturity isn’t until 2019, which gives the company plenty of time to batten down the hatches and wait for the commodity to recover.  However, the maturity in 2019 is a doozy; there’s $1.9 billion due that year.

The other risk

Most of the company’s production comes from the Rubiales field, which is located in Colombia. It is one of the richest oilfields in the world, with total reserves of more than four billion barrels. Just about all of the company’s success is because of production from this field.

There’s just one problem. The company doesn’t have permission to produce at Rubiales past mid-2016.

Management’s official stance is that the new contract with the Colombian government will happen, it’s just a matter of time. But until the contract is officially done, consider it to be a huge overhang on this stock.

The good stuff

It isn’t all bad for this company. In fact, there are some interesting things happening.

Management is diversifying beyond Rubiales, with production beginning in several other countries in the region. Sure, these new developments won’t replace the cash cow anytime soon, but diversification is a good thing in the oil business.

What South America lacks in political stability, it makes up for in costs. In 2013, when crude was hovering near $100 per barrel, Pacific Rubiales reported netbacks of $63 per barrel. It’s obviously not getting anywhere close to that now, but at least it has costs low enough to be able to weather the storm.

Like the Canadian dollar, the Colombian peso has been falling compared to other currencies, particularly against the U.S. dollar. This is good news for Pacific Rubiales, since most of its expenses are in pesos. Pacific Rubiales sells most of its production to Asia, which means it gets Brent Crude pricing. Brent enjoys a premium which is currently more than $5 per barrel more than WTI. That gap is even greater once it gets converted back to weaker pesos.

There are some major potential issues with this stock, but there’s definitely value there. For me, the big issue is the status of the Rubiales field. If the contract is renewed, there’s a case to be made for owning this stock. But until then, the risk is just too great. Without Rubiales, bankruptcy might even be a possibility.

Two other energy stocks for your portfolio!

Pacific Rubiales could very well pull itself out of this tailspin. But why take a chance on such a risky stock?

Instead, check out our special FREE report "2 Canadian Energy Stocks on the Cusp of a Powerful Long-Term Trend." In this report, you'll find that Canada is rich in other energy sources that are poised to take off. Click here now to get the full story.

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Nelson Smith has no position in any stocks mentioned.