Image source: SunEdison.

When billionaire hedge fund manager David Tepper bought a 9.3% stake  in TerraForm Power (TERP) late last year he could see the writing on the wall. SunEdison (SUNEQ), who is TerraForm Power's parent company, was crashing toward the financial abyss, bloated with debt and unable to unload assets it once thought were extremely valuable.

The crash of SunEdison has been spectacular and it's likely the company will head into bankruptcy protection soon. But Tepper's battle with SunEdison was over its treatment of TerraForm Power and he appears to be coming out a big winner. Here's how

Tepper v SunEdison
When Tepper took his stake in TerraForm Power, he had two major issues with the company. The first was that he viewed TerraForm Power as a kind of piggy bank for SunEdison. SUNE was using the TERP to acquire more and more renewable energy developers and forcing the yieldco to pay a high price for their operating assets. The worst example of this was the proposed Vivint Solar (NYSE: VSLR) acquisition, which Tepper objected to because it built residential solar projects, not the stable, contracted cash flows with investment grade utilities TerraForm Power normally dealt with. Since Vivint Solar canceled the acquisition, it looks like Tepper won that battle.   

Image source: SunEdison.

But the larger challenge was to change TerraForm Power's management team and board of directors. After a coup in November, SunEdison essentially took a strangle hold on the leadership of both TerraForm Power and TerraForm Global (NASDAQ: GLBL), who were supposed to be buying projects at an "arm's length". But with the management teams so intertwined, it was difficult to see how that would happen and Tepper thought that was a major conflict of interest.

The most notable change in management initiated by SUNE during the coup was SunEdison's CFO, Brian Wuebbels, becoming CEO of both TerraForm Power and TerraForm Global. He had engineered what became SunEdison's pending collapse and now was in charge of the yieldcos, while still running SunEdison's finances. What could possibly go wrong?

It didn't take long for that management move to blow up in SunEdison's face. Earlier this month, Wuebbels stepped  down as CFO of SunEdison to focus on the yieldcos. And on Thursday, he stepped down from both yieldcos. Tepper hasn't completely upended the management team, but he's well on his way.  

Why TerraForm Power and TerraForm Global are different
If TerraForm Power can indeed become an independent yieldco, breaking free of SunEdison, it could potentially be a big win for Tepper and other investors. The company has long-dated contracts to sell wind and solar electricity to utilities and has had its major future asset acquisitions cancelled, easing pressure on the balance sheet. And it has some benefits that sister company TerraForm Global might not have.

TerraForm Power has bought completed assets from SunEdison and isn't relying on the company to complete projects just to survive. TerraForm Global, on the other hand, owns 425 MW of projects in India that it paid $231 million for and may not be completed on time if SunEdison goes under.

There's also cross-default risk that appears to be lower at TerraForm Power. TerraForm Global alerted investors this week that some debt maturities could be accelerated if SunEdison goes bankrupt and some power purchase agreements could be cancelled as well. Bottom line for investors: these events could potentially sink the company.  

We don't know all of the details of TerraForm Power's contracts, but the risk of cross-defaulting if SunEdison goes under appears to be a lot lower at Terraform Power. And that's why Tepper was buying TERP and not TerraForm Global.

This story is far from over
While David Tepper is clearly coming out on top against SunEdison, this story is far from over. Banrutpcy could see the control over both yieldcos change hands and it's uncertain what financing costs might look like in the future, meaning the dividend many not be safe long-term.

But we do know that David Tepper has made progress in changing the management team and future transaction TerraForm Power will be making. And that's a good sign for investors.