TerraForm Power's (NASDAQ:TERP) stock has been sizzling this year. Shares of the renewable energy company are up roughly 55% since the start of the year because its turnaround plan is starting to pay off. Add in the company's high-yielding dividend, and the total return is a market-crushing 61%.

Because of that surge, an analyst at J.P. Morgan recently downgraded the stock, suggesting that now is the time to take profits. Here's a look at the case for and against cashing in on TerraForm after its big run this year.

A road leading up to a row of wind turbines with the sun setting in the distance.

Image source: Getty Images.

The case for selling now

J.P. Morgan lowered its rating on TerraForm from overweight to neutral while setting its price target at $17 per share, which is right around the current price. The bank's analyst downgraded TerraForm following its red-hot stock performance this year. While the analyst believes that TerraForm's execution justifies the rally in its stock, shares have reached full value. So, it makes sense to take profits.

In the analyst's view, investors can look to get back into the stock on "pullbacks or stronger-than-expected dividend per share growth."

The case for holding on

While cashing in would lock in this year's big gains, there are several trade-offs to consider. Some investors, for example, will have tax consequences if they don't hold shares in a tax-deferred or exempt account like an IRA. Those taxes would eat into an investor's profits, even more so if they held shares for less than a year.

Furthermore, investors would potentially miss out on TerraForm's future upside, which could be substantial. While lucky investors might be able to quickly get back into the stock if there's a pullback, timing the market is a fool's game. Many would likely miss that opportunity, which might never come.

The reason shares might not pullback is that TerraForm is still in the early innings of its turnaround plan. The company just started working on its strategy last year after Brookfield Asset Management bought a controlling stake to help engineer a turnaround. Because of that, the company's cost-saving initiatives are just beginning to pay dividends. For example, the company produced an incremental $5 million in cash available for dividends (CAFD) during the second quarter thanks to these efforts, which have it on track to make an extra $30 million this year. That's only part of the $53 million in annual incremental CAFD the company expects these initiatives to deliver once fully implemented. That's a lot of money for a company that only generated $126 million in CAFD last year.

Meanwhile, the company has already unexpectedly made two needle-moving acquisitions that have helped bolster its growth prospects. Its most recent deal for a U.S. solar portfolio will boost its cash flow per share in the near term. That deal has further upside as the company cross-sells other products and services such as energy storage to the existing customers. As a result, TerraForm has enhanced its ability to grow its dividend at a 5% to 8% annual rate through at least 2022. It could further bolster its growth prospects by making more deals.

The company's longer-term upside could be even more substantial. That's because the world's developed economies alone need to invest a staggering $10 trillion to transition from fossil fuels to renewables. That's a massive market opportunity for TerraForm Power. It sets the company up on a multidecade growth trajectory, which has the potential to significantly enrich investors in the years ahead.

Think in terms of decades, not months

Investors could potentially make more money by cashing in on TerraForm right now and then buying back in on a pullback. However, that short-term mind-set misses the bigger picture, which is that TerraForm is a long-term growth story. For starters, the company plans to grow its dividend at a 5% to 8% annual rate through 2022. On top of that, the renewable energy sector is in the early innings of a multidecade growth trajectory. Thus, investors risk missing out on the long-term upside in the company's stock by cashing in right now. That's why as tempting as it might be to ring the register after this year's big gains, I plan on holding out for the potentially much bigger future payday.