Friday is shaping up to be a very good day for TransAlta Corporation (TSX:TA)(NYSE:TAC) and Capital Power Corp. (TSX:CPX), two struggling power producers that are overexposed to coal-fired energy.

It all started in November 2015. The province of Alberta announced a sweeping climate change plan, which included a carbon tax on gasoline, natural gas, and power. It also announced that the province would be coal-fired-power free by 2030.

Both TransAlta and Capital Power investors didn’t care for that news. Both companies generate a large chunk of their earnings from coal-fired power in Alberta. TransAlta’s facilities were older, and many were scheduled to be shuttered or converted to natural gas before the 2030 deadline. But Capital Power has many newer facilities–some built as recently as 2011.

Investors were mostly concerned about the uncertainty. The province promised it would give each power producer a nice settlement as compensation for losing the economic life of assets. Nobody knew what the settlement would be. That was the big problem.

After months of speculation, the province finally announced its plan. Alberta will pay TransAlta, Capital Power, and ATCO a total of $97 million per year until 2030. TransAlta will receive $37.4 million annually. Capital Power will receive $52.4 million per annum. And ATCO will get $7.2 million each year.

Investors obviously like the news. Both TransAlta and Capital Power rallied in early Friday trading. TransAlta shares were 12.5% higher, while Capital Power’s gain was closer to 11%.

Impact on earnings

Both companies will be free to continue selling power from their coal-fired plants until the 2030 deadline, meaning these additional payments will flow straight to the bottom line.

Over its last four quarters, Capital Power has delivered free cash flow of $264 million. The additional payments from the Alberta government would have pushed up free cash flow to $316 million. The company currently has a market cap of $2.3 billion, which puts shares at just 7.3 times free cash flow.

In short, the company potentially increased its free cash flow by 19.7%, but shares are only up 11%. Capital Power stock was cheap before. You could argue it’s even cheaper today.

The impact to TransAlta isn’t quite as pronounced, at least when you look at trailing free cash flow. It generated $363 million in free cash flow in the last 12 months, meaning its payments would only increase that metric by about 10% annually.

But the last 12 months have been a particularly good period for the company, at least from a free cash flow perspective. In 2013, 2014, and 2015, it generated $172 million, $275 million, and negative $70 million in free cash flow, respectively. When you look at those numbers, an extra $37 million annually makes a big difference.

Or, to put it another way, TransAlta can count on an additional 13 cents per share to the bottom line, while Capital Power can count on 54.5 cents per share based on the payments and the number of shares outstanding.

The bottom line

Investors are cheering the impact this move will have on both TransAlta’s and Capital Power’s earnings. But, most importantly, they’re cheering the removal of uncertainty. Investors now know that both companies will be fairly compensated for their assets.

The additional earnings for the next 14 years are nice, especially for TransAlta, which is struggling with debt. Now both companies are free to start investing in greener projects, which Alberta will desperately need over the next decade plus.

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 Nelson Smith owns shares of TRANSALTA CORPORATION.