Without a doubt, the biggest concern investors have about Baytex Energy Corp (TSX:BTE)(NYSE:BTE) is its debt load, and it’s clear why—Baytex’s debt is 6.6 times its cash flow in 2017 compared to its peer group average of 3.8 times. Baytex also has the honour of not only leading its immediate peer group of intermediate Canadian producers in terms of debt, but also a broad universe of 45 energy producers, in which it ranks third.

Should investors be worried? To answer this, it is important to take a closer look at Baytex’s debt and liquidity. It is possible to look at how Baytex’s debt fares under bullish and extremely bearish price scenarios for 2017. It becomes fairly clear that Baytex should be fine in a downside scenario, while having good leverage to a (more likely) upside scenario.

As of Q2 2016, Baytex had a net debt of $1.9 billion. Much of this debt was due to the decision to acquire Aurora Oil and Gas back in 2014 for $1.8 billion ($2.9 billion including the company’s debt). This gave Baytex access to the highly economic Eagle Ford play, but Baytex paid a hefty 52% premium for Aurora in order to gain access. Baytex funded about $1.5 billion with equity, but it also issued US$800 million in long-term debt to fund the transaction. Oil proceeded to enter its historic bear market shortly after.

The end result is that currently about $1.5 billion of Baytex’s $1.9 billion in net debt are long-term notes mostly associated with the Aurora purchase. The remaining $347 million is a bank loan. While these are big numbers for a firm with a $1.2 billion market cap, they come with extremely favourable terms and plenty of excess liquidity.

Looking at the $1.5 billion in long-term notes, Baytex has no serious repayments due until 2021. The current forward strip has oil above US$50 through to 2021, giving Baytex plenty of time and cash flow to meet its obligations.

Turning to Baytex’s $347 million bank loan, this loan is part of a $760 million credit facility. Baytex is only 45% drawn on this facility, giving it plenty of room to fund any cash flow shortfalls going forward. Baytex is currently in the process of selling 2,250 bpd of non-core production, and these transactions should close in Q3. Baytex has disclosed approximately 1,000 bpd of this production will be sold for $55 million, and the proceeds will be used to reduce bank debt.

The proceeds of these sales should bring Baytex’s credit-facility use below 40%, which would make it one of eight names out of 38 total that can claim that (according to Bank of Nova Scotia). Baytex also has plenty of flexibility from its lenders to use that extra credit space if necessary thanks to newly renegotiated bank covenants.

Baytex under different price scenarios

According to Baytex’s investor information, the company would see negative $160 million of free cash flow annually at oil prices of US$40 for 2016. Assuming Baytex is able to reduce its bank loan from $347 million to $247 million by the end of the year through asset sales, this would give Baytex $513 million of remaining space to use. This can easily cover a $160 million addition for several years.

US$40 oil, however, is an extremely unlikely prospect for any extended period of time. The simple fact is that oil demand is growing by around 1.2 million bpd annually, and U.S. shale producers will only be able to add about 1.4 million bpd of production between 2018 and 2020. OPEC production is close to maximized, and no major mega projects were started between 2014 and 2016.

With OPEC now talking about a production freeze, oil is unlikely to fall back below US$40. At US$60 (where many analysts see oil going), Baytex would generate $150 million annually in cash, which it stated it plans on using for debt repayment.

Baytex is now under $6, which is a good buying opportunity.

If you want more buy signals, consider our most recent one

Over the course of The Motley Fool U.S.'s 23-year history, this rare buy "signal" has generated massive wealth for those that have been smart enough to pay attention to it. It's so rare, that it's happened less than two dozen times... but when it does ... it's made investors undoubtedly rich. If you're interested in knowing the stock behind this rare buy "signal"--and you're excited to take advantage of this golden opportunity, then you're going to want to read this. Click here to unlock all the details behind this new recommendation from Stock Advisor Canada.

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