Canadian Solar (CSIQ -0.83%) has gone through a rough three-year stretch as the commodity solar market has come under immense pressure. Margins on the sale of solar panels have plunged, and the large solar projects that drove profits in 2014 and 2015 have fallen by the wayside as competition in the developer market heats up. 

You can see below that the decline in Canadian Solar's stock has followed its declining margins, a trend that may not reverse anytime soon. With that in mind, here are three stocks that are better bets in the solar industry today. 

CSIQ Chart

CSIQ data by YCharts

First Solar

No solar manufacturer in the world has the history of profitably selling solar panels like First Solar (FSLR 0.43%). Its thin film panels were the lowest cost in the industry for most of the 2000s and into the 2010s, leaving First Solar with the best balance sheet in the industry. Despite a relatively slow year and spending up to $625 million on capital expenditures, the company expects to exit 2017 with $1.5 billion to $1.7 billion in net cash.

Management is betting that the upgrade to a product called Series 6 and moving to component sales will lead to better margin and faster capital turnover, a strategy that could play out as planned. But the reason First Solar is a better bet than Canadian Solar is that it has the financial flexibility to adapt to the solar market as it evolves. It could buy most of the world's largest solar manufacturers (including Canadian Solar) with the cash on its balance sheet, which isn't a bad position to be in as the solar industry rapidly evolves around us. 

NextEra Energy Partners

A much safer bet in solar energy is buying yieldcos that own projects with long-term contracts to sell energy to utilities. These contracted cash flows are then used to pay dividends to investors. If this dividend is low enough, the yieldco can issue new shares and debt to buy projects that have returns higher than their cost of capital (the weighted cost of debt + cost of equity). 

One of the best yieldcos right now is NextEra Energy Partners (NEP 0.26%), the renewable yieldco arm of NextEra Energy. It has a low yield of 4%, which is actually an advantage in the yieldco industry. The low yield allows management to issue shares and new debt to fund project acquisitions that can be accretive to the dividend long-term. And management has said it will be able to raise the dividend 15% annually through 2020. If its dividend can grow double digits long-term, this could be a great dividend stock for decades to come. 

A SunPower rooftop solar system on a home.

Image Source: SunPower.

SunPower

Canadian Solar is a bigger manufacturer than SunPower (SPWR -2.21%) with about 6x the capacity, but it isn't the better manufacturer. SunPower makes the most efficient solar panels in the world, with efficiency over 22% for its X-Series product, according to data sheets. And its new P-Series product will have a panel that's cost competitive with commodity solar panels by the end of the year, and 19% efficient or more. 

SunPower has a growing market share in residential solar in the U.S., the #1 market share position in commercial solar, and a product in P-Series and Oasis that could compete with any manufacturer in the world. SunPower isn't necessarily a safe bet, but a differentiated product and the backing of parent company Total (TTE 1.72%) make it a better bet to be a long-term winner in solar versus Canadian Solar.