Image source: Getty Images.

What happened

Cloud Peak Energy (NYSE:CLD) stock soared 10% by 3:00 p.m. EDT on Tuesday after S&P Global raised the coal producer's corporate credit rating.

So what

Analysts at S&P boosted Cloud Peak's corporate credit rating from SD to B-, while also raising the rating on the company's 2019 senior unsecured notes from D to CCC. However, they still have a negative outlook on the coal producer. Furthermore, the upgraded ratings are still considered very speculative and imply that while the company currently can meet its financial obligations, it is very vulnerable to defaulting if conditions deteriorate.

That is certainly a concern at S&P, which said:

The negative outlook reflects the weak operating performance and the uncertainty of the company's ability to generate positive operating cash flow in the next 12 months...We do not rule out the possibility of further decline in cash flows if the domestic demand continues to deteriorate due to continued volume rationalization and increased competition from stronger players emerging from bankruptcy. We could lower the rating if the company's liquidity position becomes less than adequate (including breaching its minimum liquidity covenant) or leverage increases above 8x. This could happen if adjusted EBITDA drops below $75 million in 2017.

Cloud Peak Energy has quite a hole to dig out of, with S&P suggesting that it needs to get its debt-to-EBITDA ratio below five before it would consider another upgrade. Given the continued weakness in the coal market, that is not likely unless the company sells assets.

Asset sales are the likely path that rival coal producer Teck Resources (NYSE:TECK) will take to trim its leverage and win back an investment-grade credit rating. According to recent comments by Teck Resources' CFO, it needs to reduce debt by $1.5 billion to $2 billion, and it is considering select asset sales to hit that target, including selling some infrastructure and non-core exploration assets. By regaining an investment-grade credit rating, Teck Resources could significantly reduce its cost of capital. For Cloud Peak Energy, just digging out of its debt hole would give it some more breathing room so that it does not join its rivals and file for bankruptcy.

Now what

Despite the credit rating upgrade, Cloud Peak Energy is a very speculative company. If the coal market starts sinking again, that could be enough to push the company into bankruptcy and wipe out investors.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.