Encana Corporation (TSX:ECA)(NYSE:ECA) has quietly gained 40% since hitting a low in late August.

Can the rally continue?

Making progress

With oil and natural gas prices still under pressure, contrarian investors are looking at the resilience of the stock’s move and wondering if the bottom has been reached.

Encana has been unloading natural gas assets in a bid to stabilize its balance sheet and move ahead with its efforts to transition back to an oil company.

The road has been a rough one.

The company began shedding natural gas assets in 2013 and made couple of massive acquisitions in the oil space just before the market started to crash.

Those deals saddled the balance sheet with a debt load of US$7.8 billion at the end of 2014, and management has spent most of this year in crisis mode trying to stay afloat.

While the market and shareholders are disappointed with the timing of the asset purchases, the management team deserves some recognition for its efforts so far to survive the oil rout.

The company has reduced corporate expenses by US$300 million, issued $1.44 billion in new stock at a fortuitous price of $14.60 per share, and unloaded US$2.8 billion in assets.

By the end of the year, Encana expects to have its long-term debt pared down by US$2.8 billion, with no notes maturing before 2019.

Cash flow

Encana reported Q3 cash flow from operations of US$371 million. The company spent US$473 million on capital expenditures and another US$38 million on dividends, so the US$140 million shortfall had to be covered with proceeds from the divested assets.

That isn’t a sustainable strategy for the long term, but it is helping the company weather the storm until oil and natural gas prices recover.

Why is the stock holding up?

The progress being made on the debt pile is certainly giving the market more confidence that Encana might be able to ride out the oil and gas meltdown, but energy prices are still very weak and there is little evidence of an impending rebound.

In fact, there is a strong possibility that WTI oil could retest the lows hit in August.

One reason for the stock’s resilience could be speculation that Encana might become a takeover target.

The company finished Q3 2015 with US$6.13 billion in long-term debt. If you add in the current market value of about US$7 billion, you get a minimum buyout price of about US$13 billion. A suitor would have to cough up a premium, which would likely have to be at least $3-4 billion, so you are looking at a pretty big deal.

At this point, I don’t see one of the majors paying that much for the company, but the assets are certainly attractive and a big player with a decades-long perspective could decide to make a move, especially if the market drops again and Encana’s stock revisits the August lows.

Should you buy?

The resilience in the stock is impressive, but the company is still bleeding cash and market prices remain weak. I would look for other opportunities that carry less risk.

The #1 energy stock to own in 2016?

Our analysts have identified one TOP energy stock for 2016 and you can download the name, ticker symbol, and price guidance absolutely FREE.

Simply click here to receive your Special FREE Report, "1 Top Energy Stock to Buy 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 Andrew Walker has no position in any stocks mentioned.