Solar stocks have been hot in 2017, driven by a solar market that will surpass 100 GW of installations for the year and by a slow consolidation of power among the industry's best companies. There have also been some policy changes that have driven a few specific stocks higher this year. 

The solar leaders for 2017 were SolarEdge Technologies (SEDG 2.37%), First Solar (FSLR 1.76%), and JinkoSolar (JKS 2.87%). Here's a look at why these three very different companies led the solar market this year. 

FSLR Chart

FSLR data by YCharts.

Solar power inverters get hot

SolarEdge is one of the industry leaders in solar power optimizers and inverters for residential solar systems. The company has taken market share from microinverters and built a formidable platform used by small residential solar installers around the world

What's odd about SolarEdge's run this past year is that it's come largely because the company has beaten expectations: Late in the year, the company has grown revenue and earnings by double digits. And that growth was driven by Tesla (TSLA 5.15%) essentially giving up its lead in the residential solar industry as it de-emphasized its solar business.

SolarEdge stepped into the gap, providing products and services that regional solar installers needed to grow their own businesses. That market share growth combined with an expanded product line and regulations that require panel-level electronics (for example, a power optimizer that can cut off power from a damaged solar panel) will remain tailwinds for SolarEdge in the next few quarters. Tesla may not leave as big an opening in 2018, but SolarEdge is well positioned to remain a strong solar player for years to come. 

Sunlight reflecting off a large rooftop solar installation.

Image source: Getty Images.

The big player in U.S. solar

First Solar's phenomenal performance in 2017 was driven largely by the threat of solar tariffs from the Section 201 trade case, and ultimately, the Trump administration. The company has signed at least 6.7 GW of solar panel sales, or about two years of production at the current rate, solidifying years of profitable operations.

In early January we'll find out if the Trump administration will put punitive tariffs on solar imports, which would help First Solar because its thin-film panels would be exempt from the current trade case. Tariffs could leave the company with the U.S. market nearly all to itself given the fact that it has the largest U.S. solar manufacturing plant; when combined with its Asian capacity, the company would be able to dominate the solar market. 

The question for First Solar long term is in non-tariff regions, where its new Series 6 solar panel has to compete with new mono-PERC capacity being built by large Asian solar manufacturers. Mono-PERC reduces some of the technical advantages thin-film traditionally has had over silicon-based panels, and is higher-efficiency than Series 6. Tariffs can only protect the company for so long, so investors should watch for technology improvements in 2018 to ensure that First Solar's business will maintain its strong profitability. 

The Chinese giant

JinkoSolar rounds out the list of top three solar leaders in 2017. The company is one of the biggest solar manufacturers in the world, and it's been able to build a rare profitable business as well. What drove the stock this year was the fact that Chinese solar installations are expected to be over 50 GW, and global installations will likely be over 100 GW. That's much higher than was expected coming into the year, and JinkoSolar has ridden the wave of higher demand. 

While the company has grown revenue and increased manufacturing capacity over the past few years, it has seen gross margins fall to low double digits, a level that makes it difficult to make a profit. You can see below that low gross margins have also led to low operating income, which is troubling for the company in the long term. 

JKS Revenue (TTM) Chart

JKS Revenue (TTM) data by YCharts.

Depending on whether or not solar panel prices rise as demand increases, the company could have trouble making money in the long term. That could make its stock gains of 2017 less sustainable, so keep an eye on long-term margins as a guide to whether or not JinkoSolar's business is going to be profitable for years to come. 

Solar stocks headed for a strong 2018

What's clear after a strong 2017 is that the solar industry is in a much better position than it was a year ago, and that leading companies are starting to build a sustainable competitive advantage. SolarEdge, First Solar, and JinkoSolar are leading that charge in three very different ways.