Baytex Energy Corp. (TSX:BTE)(NYSE:BTE) is starting to move higher after its recent slide.

Let’s take a look at the beleaguered oil producer to see if this is the right time to buy the stock.

Dark days

Back in June 2014, Baytex closed its game-changing $2.8 billion acquisition of Aurora Oil & Gas.

Investors thought the deal would drive the stock higher, and management raised the dividend by 9% on the projection of increased cash flow. Oil traded above US$100 per barrel, so the lofty expectations weren’t unreasonable.

Baytex was worth $48 per share and paid an annualized dividend of $2.88.

Unfortunately, the purchase of the coveted assets in the Eagle Ford play was financed with new debt, and came at the top of the market.

Oil prices began to slide, and by the time the rout bottomed in January of this year, Baytex was trading for less than $2 per share and the dividend was history.

Management has done a good job of keeping the company alive by reducing expenditures, raising capital, and renegotiating terms with lenders, but the ride has been ugly for investors.

The rally in oil since January has provided some relief, and the brave souls who had the courage to buy at the low have tripled their money, even after the recent pullback.

At the time of writing, Baytex is trading for $6.25 per share.

Ongoing risks

Baytex remains a risky bet.

The company reported a Q2 2016 net loss of $86.9 million. Cash flow from operations came in at $55 million compared to $138 million in Q2 2015.

Funds from operations improved significantly in Q2 compared with the first quarter, but still came in 60% lower for the first six months of the year compared with the first half of 2015.

Baytex finished Q2 with $1.94 billion in net debt and had $410 million in available credit facilities as of June 30.

Should you buy?

Baytex is at the mercy of the oil market.

If prices drop below US$40 per barrel, investors are going to get concerned about the company’s liquidity again. If that happens, the stock could quickly give back its gains.

The oil rally looks like it has stalled out and the only source of price support appears to be rumours of a possible production freeze by Saudi Arabia, Russia, and Iran.

Most analysts are skeptical of a deal being struck, let alone honoured, so I would be careful buying at the current price.

Baytex has significant upside potential on an oil rally, but there might be a better entry point in the near term.

Stock buy alert hits astounding 96% success rate!

The hand-picked investing team inside Stock Advisor Canada recently issued a buy alert for one special type of "bread-and-butter" stock where The Motley Fool U.S. has banked profits on 23 out of 24 recommendations. Frankly, with an astounding 96% success rate that has delivered average returns of 260%, chances are this new pick could deliver life-changing returns as well. Because the team at Stock Advisor Canada fully embraces the same time-tested investing philosophies that have led to countless Motley Fool winners globally. So simply click here to unlock the full details behind this new recommendation and join Stock Advisor Canada.

*96% accuracy includes restaurant stock recommendations from Motley Fool U.S. services Stock Advisor, Rule Breakers, Hidden Gems, Income Investor and Inside Value since each services inception. Returns as of 5/27/16.

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