Image source: Getty Images.

What happened

Shares of Chesapeake Energy (CHKA.Q) were on fire last month, jumping 24.8%. Fueling that rebound were rising oil prices, asset sales, production, analyst upgrades, and an improving balance sheet.

So what

Crude oil prices rebounded in August, ending the month 7.5% higher and taking most energy stocks, including Chesapeake Energy, up with it. Fueling crude's surge was declining domestic production as well as renewed hope that OPEC would step in to stabilize the oil market.

A catalyst more specific to Chesapeake Energy was its second-quarter earnings report. While the company lost money during the quarter -- its sixth straight loss and a steeper one than analysts were anticipating -- production was stronger than expected. This led the company to boost its full-year production guidance by 3% while still keeping its capex spending within its initial budget range.

In its earnings press release the company also increased its full-year asset sales target to more than $2 billion, which was up from its previous range of $1.2 billion to $1.7 billion. The company detailed that it planned to sell a portion of its acreage in the Haynesville Shale to meet that target. A few days later the company announced that it sold its interest in the Barnett Shale, which would cut its gas shipping and processing costs by $715 million, eliminate $1.9 billion of long-term pipeline arrangements, and boost operating income by $200 million to $300 million annually through 2019. That said, this came at an upfront cost, with the company paying its midstream partner Williams Partners (NYSE: WPZ) $400 million to end their current gathering agreement in the Barnett shale. Furthermore, Chesapeake Energy also renegotiated its existing cost-of-service gas gathering agreements with Williams Partners in the mid-continent.

On top of that, Chesapeake Energy was able to arrange a $1.5 billion five-year term loan with its banks to buy back maturing debt. While the loan came with a high rate of LIBOR plus 7.5%, it gives the company the cash it needs to refinance all of its 2017 debt maturities.

Analysts absolutely loved these moves. Citigroup, for example, raised its price target to $6 per share, saying that the company was "on the verge of turning the corner." Meanwhile, Capital One upgraded shares to equal weight from underweight, while upping its price target from $4 to $6 saying that the company "seems to be pulling out of its death spiral." Barclays also boosted its price target, though it only went from $1 to $3. Finally, Moody's changed its credit outlook to positive.

Now what

In many ways, August was a transformative month for Chesapeake Energy. Not only did it get out of its burdensome midstream commitments with Williams Partners, but it was able to get enough funding to satisfy its 2017 debt maturity liabilities entirely. That puts the company on a much more solid financial footing, which it can further strengthen by completing additional asset sales. These moves make it much more likely that Chesapeake Energy will survive the energy market downturn.