Consistently one of the highest-volume stocks on the Toronto Stock Exchange, the long-term future of Baytex Energy Corp. (TSX:BTE)(NYSE:BTE) is hotly debated. After falling from $50 a share in 2014 to just $2 last year, the market seemed to be pricing in a fairly high chance of bankruptcy.

In the last month, however, Baytex stock has popped to roughly $5 following a rally in energy prices. Still, the company has a market cap of only $1 billion versus a net debt of about $2 billion. So while the market seems to be recovering, the future viability of Baytex’s business is still in doubt.

What’s in store for Baytex Energy in the long run?

Managing its debt comes before anything else

Before we discuss how the company’s underlying business is positioned, investors must get comfortable with its ability to manage a fairly crushing debt load.

Not only is net debt two times the company’s market cap, but Moody’s Corporation recently downgraded Baytex’s debt below investment grade, giving the company a negative outlook. While rating downgrades are typically backward looking, it has a real impact on the short-term cost of financing.

If oil hadn’t rallied to $40 a barrel recently, the company could have been in major trouble. In the fourth quarter, cash flow from operations couldn’t even cover the company’s dramatically reduced capital expenditure budget.

If the recent rebound in commodities isn’t sustained, things could turn fairly quickly. Baytex only has $820 million left in undrawn credit facilities (which mature in 2019), and management is only confident it can stay within its debt covenants through the second quarter of this year. Considering the company has little cash left on the books and burned through $100 million in cash last quarter, it wouldn’t take much to run through the company’s financing capabilities.

Hedges will save the company this year

Fortunately, Baytex has a large hedging program in place this year that takes a lot of pressure off its cash flow situation.

About 80% of 2016 oil production is hedged through a variety of contracts. The biggest of which (covering 45% of production) has the following terms: with oil at $35-39, Baytex will realize $45-49; with oil at $40-50 Baytex will realize $50; with oil at $50-59, Baytex will realize spot prices. If oil pops above $60, the company will realize only $60 prices.

It’s a bit confusing, but the hedges give Baytex a boost in profitability with prices under $50 a barrel. Currently, the company has an all-in breakeven of about $40-45 a barrel. Along with the hedging program, 2016 should actually be a fairly low-risk/low-reward situation for cash flows.

2017 and beyond is the big question

If oil remains depressed past this year, things will get dicey quick. Only 17% of next year’s production is hedged, so at current prices the company would be tacking on debt and rapidly reaching its debt covenants. The share price would be low enough to bar a meaningful equity raise, and taking on more debt would be impossible without restructuring its current liabilities.

The company still has quality assets with falling production costs, but if you’re not confident that oil will sustain a rebound above $50 past 2016, you’re better off sticking with a better-financed competitor.

Three of our top U.S. stocks to diversify your portfolio

Looking to expand your portfolio's horizons? The Motley Fool has put together a special FREE report featuring "3 U.S. Stocks Every Canadian Should Own." To get the names and ticker symbols of these three stocks, just click here to access your free copy!

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 Ryan Vanzo has no position in any stocks mentioned.