It hasn’t been a good couple of years for TransAlta Corporation (TSX:TA)(NYSE:TAC) shareholders.

Among the things bringing down the stock have been some unscheduled and costly repairs to some of its aging coal-fired power plants, the slashing of the company’s dividend back in early 2014, and the market’s general dislike of coal, especially in today’s environmentally conscious times. Additionally, Alberta has recently elected an NDP government, a party that has pushed for stricter regulations on coal power in the past. Oh, and rock-bottom natural gas prices haven’t helped.

Add all this up and it’s easy to see why TransAlta has struggled. Shares have plunged more than 65% over the past five years, after spending much of the 2000s above $20 per share. Currently, they’re barely trading over $7.

After the preceding two paragraphs, you might think I’m nuts for saying I purchased shares in this beleaguered power generator, but I did exactly that on Friday at $7.10 per share. Here are the three main reasons behind my decision.

Still generates solid cash flow

Even though the results aren’t flowing to the bottom line, TransAlta is still generating a decent amount of cash flow.

According to the company’s recently reported second-quarter results, it’s on pace to generate approximately $1 billion in EBITDA this year, which is about the same as last year. The company has $5 billion in debt (including preferred shares) along with a $2 billion market cap. Thus, it trades at an enterprise value-to-EBITDA ratio of just seven.

Compare that with the other two large Canadian utilities, Fortis and Canadian Utilities. Fortis has an enterprise value of more than $24 billion, an EBITDA of $2.25 billion, and an EV/EBITDA ratio of nearly 11. Canadian Utilities has a similar ratio.

Plus, TransAlta has the potential to increase that cash flow. It has many power-purchase agreements in place in Alberta, which will start coming up for renewal in 2018. Management is confident it can get better prices when the time comes.

A large stake in a subsidiary

In 2013 TransAlta created TransAlta Renewables Inc. (TSX:RNW) a drop-down entity that would own many of its hydro, wind, and solar-powered assets. As I type this, it has a book value of $1.91 billion.

After a recent transaction that transferred ownership of some of its Australian gas assets to the subsidiary, TransAlta now owns a 76% share of Renewables, which is worth $5.20 per share based on the book value of Renewables. If you base the value on the market cap of Renewables, the stake is worth $6.17 per share.

Any way you slice it, the stake in Renewables makes up a very large percentage of TransAlta’s current market value. It’s like I’m getting a stake in Renewables, with TransAlta’s coal business almost thrown in for free.

Coal isn’t going away

As far as I can tell, the worst-case scenario for TransAlta’s coal-fired power plants is stricter environmental regulation.

Look at it this way. TransAlta’s coal plants generate quite a bit of Alberta’s power needs. You can’t just replace those plants with new, more environmentally friendly options overnight. It’s going to take time, and TransAlta has already laid out the groundwork for the conversion of most of its Alberta-based coal plants into facilities that are fueled by natural gas. And at some point, the price of natural gas will head higher, which will make the economics of coal power more attractive again.

There’s also the recent issues the company has had with Alberta regulators. In 2010 and 2011 TransAlta took several of its plants offline during a cold winter day, causing prices to spike. What’s interesting is TransAlta still maintains it broke no rules.

Regulators don’t see it that way, and it’s all but certain the company will face a fine. Industry experts have pegged a potential punishment to be between $20 and $30 million. Yes, that’s a lot of money, but it isn’t catastrophic for a company with an enterprise value of $7 billion.

When you look past the negatives, there’s a lot to like about TransAlta. I think the whole company is worth at least $15 per share on an asset basis alone, and possibly more if it finds a way to increase EBITDA. Value investors, take notice.

Another GREAT turnaround stock. You've gotta check this out!

If you think TransAlta has the potential to return to previous glory, then you'll love this story.

This Canadian icon has certainly fallen from grace, with shares declining some 90% over the past five years. But it has a new CEO at the helm, a solid balance sheet, and a new growth area that has all sorts of potential. We like this stock so much we're calling it our TOP turnaround name for 2015, 2016, and beyond!

If you're a curious soul (like me), then you can download the name, ticker symbol, and price guidance absolutely FREE.

Simply click here to receive your Special FREE Report, "A Top Turnaround Stock Idea for 2015."

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.