Baytex Energy Corp. (TSX:BTE)(NYSE:BTE) and Penn West Petroleum Ltd. (TSX:PWT)(NYSE:PWE) have managed to stay alive through the worst of the oil rout.

Let’s take a look at the two beaten-up energy stocks to see if one deserves to be in your portfolio.

Baytex

Baytex traded for $48 and paid an annualized dividend of $2.88 per share at the end of August 2014. By January of this year the dividend was gone, and investors could pick up the stock for a mere $2.

That’s how bad the downturn has been for Baytex and its investors.

The fall has been painful, but management has done a good job of keeping the company afloat. The executive team slashed the payout early, reduced capital expenditures, raised cash at an opportune time, and renegotiated terms with lenders while the window of opportunity was still open.

Despite the efforts, Baytex remains under pressure.

The company still had net debt of $1.94 billion at the end of June and had used up about 45% of its US$575,000 in credit facilities.

Oil prices didn’t improve much through the third quarter, so investors shouldn’t expect the Q3 results to show any significant changes to the situation.

In fact, the numbers might come in a bit weak as low oil prices are putting a squeeze on Baytex’s ability to keep output steady. The company reported Q2 2016 production of 70,031 barrels of oil equivalent per day (boe/d) down from nearly 85,000 boe/d in the same period last year.

Baytex cut the number of its drilling rigs in half from Q1 to Q2 and guidance for all of 2016 was reduced to 67,000-69,000 boe/d, so things are moving in the wrong direction.

With oil at US$50, Baytex can continue to tread water, but if crude prices take another nosedive, the company could find itself in trouble again rather quickly.

At the time of writing, Baytex trades for $5.50 per share and has a market capitalization of $1.13 billion.

Penn West

Penn West fell even harder than Baytex.

The stock once traded for $40 per share, but dropped below $1 earlier this year when bankruptcy seemed all but certain.

At the last minute, the company found a buyer for its Saskatchewan assets, and the $975 million Penn West received in the deal has completely changed the situation.

The company is buying back $448 million in debt using some of the proceeds from the assets sales. This will lower pro-forma senior debt to $470 million, which should be manageable in the current environment.

Penn West now has a balance sheet that is under control, and the new financial flexibility has enabled management to actually raise the capital plan by $40 million this year.

Next year Penn West intends to spend $150 million on development and is targeting annual production growth of 10%.

The capex program should be fully funded from cash flow, so things are moving in a positive direction.

At the time of writing, Penn West trades for $2.26 per share and, like Baytex, has a market capitalization of $1.13 billion.

Is one a better bet?

Both stocks remain at the mercy of the oil market, but Penn West has a stronger balance sheet and is growing production. If you want a contrarian play, I would make Penn West the first choice of the two stocks.

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.