TransAlta Corporation (TSX:TA)(NYSE:TAC) jumped 25% last week on positive news from the Albertan government.

Let’s take a look at the current situation to see if this beaten-up stock might extend its gains going into 2017.

Winds of change

TransAlta has come under pressure in recent years as falling electricity rates, the oil rout, and government plans to end coal-fired electricity generation hit the company’s balance sheet and sent investors running for the hills.

The result has been a nightmare for long-term investors, who watched the stock price slide from $20 just five years ago to below $4 in early 2016.

Uncertainty around Alberta’s plan for the province’s electricity market kept bargain hunters on the sidelines for most of this year, but recent developments have cleared up the picture, and money is now flooding back into the stock.

What’s up?

Alberta just announced its road map for getting the province off coal by 2030. The plan includes paying TransAlta and its peers to speed up the closure of some coal-fired plants and helping to cover the cost of switching from coal to natural gas on others.

TransAlta will receive about $37.4 million per year from 2017 to 2030.

The province is also changing the way the electricity market is structured, moving away from a free-market system to one that pays producers for both their capacity and the electricity they generate.

This will provide companies with an incentive to invest in new assets to replace lost power generation from the mothballed coal plants. Alberta currently gets about half of its electricity from coal-fired facilities.

TransAlta CEO Dawn Farrell was at the announcement and said her company will remain the largest investor in Alberta’s power-generation industry.

Could the stock double?

TransAlta is now at a 12-month high and should continue to recover as investors become more comfortable with the company’s prospects.

A 100% move from the current price would likely require a strong rebound in the energy sector. At the moment, that doesn’t seem to be in the cards.

Should you buy?

TransAlta has made good progress in reducing its debt in the past couple of years, and the company appears to have negotiated a positive deal with the government to ensure it remains healthy through the transition to cleaner electricity generation.

The Albertan power market will continue to be weak in the near term, but contrarian investors with a buy-and-hold strategy might want to take a position in this stock before the energy sector recovers.

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 Andrew Walker owns shares of TransAlta.