The main appeal to buying Baytex Energy Corp. (TSX:BTE)(NYSE:BTE) can be seen just by looking at how its shares reacted to the oil run up this year—from January 20, when Baytex shares bottomed, to its previous peak in June, Baytex shares rose 357%. This compares to 82% for oil over the same period.

It is very clear from this that Baytex may be an ideal way for investors who are extremely bullish on oil to play even further upside. The degree in which the company’s cash flow rises with oil prices confirms this. According to TD Bank, out of 57 energy sector names, Baytex is 12th according to cash flow sensitivity to a US$5 change in the price of oil. For every US$5 that oil prices rises, Baytex sees its cash flow grow by 15%.

This leverage to rising oil prices is partially due to the company’s extreme debt levels. The company currently has net debt that is 6.6 times its 2017 cash flow (at oil prices of US$54 per barrel). This makes Baytex third out of 52 names in terms of debt.

While these debt levels may be high, they aren’t as worrisome at they seem. Baytex has no debt repayments due until 2021, and thanks to a recent move by the company to basically use its assets as collateral against its debt, banks loosened Baytex’s borrowing limits. Baytex is allowed to borrow up to five times its earnings and is currently only at 0.86 times. With $401 million of unused capacity on its credit facility, Baytex is free to borrow should it need to.

Despite this, Baytex’s sensitivity to oil prices means investors should be cautious and buy only if these two conditions are true:

1. Oil prices average above US$50 for 2017

This is important for Baytex for a few reasons. First of all, the company estimates that even at an average oil price of US$50 for the year, the company will be free cash flow negative. That is to say, cash flow will not exceed operating expenditures and sustaining capital (the ~$300 million the company needs to hold its production flat at 64,000 bpd in 2017).

The company would see negative free cash flow of about $50 million for 2017 if oil prices average US$50 for the year. This is obviously not ideal, and it is hard to see Baytex outperforming if it is burning cash. The company would not be able to invest in production growth or debt repayment, and it is difficult to see investors flocking to the name.

Baytex breaks even in the US$52-53 range, and investors should only buy if they see oil as being higher than this for 2016. Fortunately, this is the most likely scenario.

Given Saudi Arabia’s and OPEC’s pressured finances (Saudi Arabia has been burning through $10 billion/month of Forex reserves), they are increasingly likely to support at deal at the meeting in November. Just yesterday, Russia announced it may also be willing to participate in a production cut or freeze. This is likely to put a floor under oil prices, since OPEC’s commitment to a cut at the recent September meeting indicates they are ready to intervene in markets once again.

2. Buy Baytex under $6 per share

There are many oil price predictions for 2017. A bullish outlook would be for US$60 oil (what top fund manager Eric Nuttall sees for 2017). A more balanced outlook would be the US$54 outlook that Bank of Nova Scotia sees for 2017.

At $6 per share or under, Baytex remains a decent deal at either of these price levels. At US$54 oil, Baytex trades in line with its peer group with an enterprise value that is 8.2 times its 2017 cash flow compared to 8.3 times for its peer group of Canadian producers with over 30,000 bpd of production. This is at prices slightly under $6 per share.

While this doesn’t leave much room for its valuation to grow, at US$60 oil, Baytex only trades at 6.5 times its cash flow compared to eight for its peer group. This is because of Baytex’s strong cash flow sensitivity to rising prices, which causes its cash flow to grow faster than its peers as oil rises. In this case, Baytex could have considerable upside as investors value it closer to its peers at eight times cash flow.

Baytex may be slightly higher risk, but the potential upside is well worth it.

At Motley Fool, we have another name just like it

For only the fifth 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%! Lucky for you, you can still find out the name of this breakthrough stock before it's too late. Simply click here to learn how you can unlock the full details behind this new recommendation and join Stock Advisor Canada today.

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.