Global energy demands are growing. And with the world's middle class and urban populations set to add more than 1 billion new members by 2030 -- and continue growing beyond that -- it's going to take a lot of investment into nearly every energy source (with the possible exception of coal and nuclear energy) to meet that need. 

Between the impact of air pollution from coal and emissions from all fossil fuels affecting climate change, clean energy from solar panels is likely to grow at an even faster pace than the energy industry as a whole. With the rate of technological advances in both solar panels and energy storage, solar's future is -- pardon the pun -- very bright. 

Aerial view of a utility-scale solar farm.

Image source: Getty Images.

Unfortunately, solar stocks, as a group, haven't made for very good investments in recent years, even as the greater stock market has continued a historically long and profitable bull run: 

TAN Chart

TAN data by YCharts.

You read that right: Solar stocks -- as measured by the Invesco Guggenheim Solar ETF -- have lost almost 45% in value, compared to the S&P 500's 68% in total returns over the past five years. The solar industry has grown substantially in that period; it's just proven a tough space to invest in. 

The lesson isn't to avoid solar stocks. Investors should tread carefully and take the time to understand what they're getting into, but there's enormous upside. It is estimated that global solar capacity could increase as much as 6,500% over the next three-plus decades. Some solar stocks will almost certainly be huge winners over that period. Investors who take the time to develop their knowledge of the industry, and invest for the long term, should do incredibly well in the decades to come. 

Let's take a deep dive into the solar industry. Solar power is set to play a massive role in delivering clean energy to billions of people around the world, and savvy investors should be able to profit from that trend. 

What are the different kinds of solar stocks?

In general, solar companies are involved in one or more of the following:

Solar cell and panel manufacturers. These companies develop, make, and distribute solar panels. Solar panel makers are generally divided into two different groups: those who focus primarily on low-cost, low-efficiency panels, and those who make more technologically advanced panels that produce greater energy per panel. In addition to manufacturing, many of these companies also work with utility companies to design and build the largest utility-scale solar power plants, leaving small-scale commercial and residential installation to companies that focus on those segments. 

Solar installers. Solar installers are the one-stop shop for residential and commercial solar shoppers, providing system design, sales (including leasing and financing options), and maintenance and support of the solar systems they sell and install.  

This sector of the industry offers substantial appeal to growth investors. These are often recognizable names to consumers, such as Sunrun (NASDAQ:RUN) and Vivint Solar (NYSE:VSLR), which you may have seen operating a booth at your local home improvement store or wholesale club, or advertising on local radio or TV. In short, these are the companies that market a "turnkey" solar system to residential and commercial energy consumers. 

Solar component and accessory manufacturers.  In addition to solar modules, there are a bevy of specialized components necessary to get power from the solar panel to a home. This includes things like inverters, power optimizers, solar panel mounting racks, and energy storage systems. There are only a handful of publicly traded companies in this space, and they tend to be smaller and often cater to a specific niche or produce only a few different products. This can introduce a higher risk of disruption from a competing product or company, but it can also lead to tremendous growth for the disruptors. Two of the best-known players in this space are SolarEdge (NASDAQ:SEDG) and Enphase (NASDAQ:ENPH), leaders in inverter and power-optimizer manufacturing. 

Independent power producers, or "yieldcos." More similar to traditional utilities (and in some cases, subsidiaries of one), yieldcos own and operate solar systems (generally large utility-scale projects, but also some smaller industrial or commercial installations) and then sell the power output to utilities, or to end users such as manufacturers or other large industrial power consumers. 

These companies, like their traditional utility brethren, often carry substantial debt loads. But their sizable debts, as in the case of utilities, tend to be very long-term and locked into fixed rates, while their cash flows are typically quite secure and recession-resistant. In most cases, yieldcos have the vast majority of their existing power capacity already sold under long-term contracts, which are almost always in excess of 10 years in length. 

Yieldcos can be very attractive to dividend-seekers. Many pay above-average yields that are secured by long-term contracts for energy production, while also offering prospects for dividend growth as clean energy steadily takes market share from coal and nuclear energy in the years to come. 

Key solar energy terms to know

As with many industries, the solar energy industry has specific terminology that is important to understand. These terms don't replace the importance of basic GAAP (generally accepted accounting principles) accounting, or following a company's revenue, cash flow, and other typical metrics, but they will go a long way toward helping you understand solar companies and the industry in general. 

Solar cell: This is the starting point for photovoltaic solar cells. Solar cells are made using one of several technologies, including thin-film, mono-crystalline silicon, and multi-crystalline silicon, just to name a few of the many different types. These cells are then grouped together into the panels you see on rooftops, parking garages, and in utility-scale solar farms. While most solar cells have little to differentiate themselves from competitors and compete almost entirely on price, some manufacturers have proprietary technologies that create some competitive advantage. 

Solar module or panel: This is what you see on a rooftop or commercial/utility-scale solar installation. Solar panels are an assembled collection of solar cells, grouped together into a standard size and configuration to maximize both space and power output. Typically, residential panels are comprised of 60 cells, while panels for commercial installs are made up of 72 panels. Residential rooftop panels are generally smaller in order to support more flexibility in configuration, while commercial and utility-scale panels are often less space-constrained, and the bigger panels can produce more power and be more cost-effective. 

Inverter: Solar panels generate DC, or direct-current, electricity, while the power grid supplies AC, or alternating-current, to homes, businesses, and industrial customers. Inverters take the DC current from solar panels and convert it into AC current. 

Efficiency: This is a term that can apply to both cells and panels, and is generally denoted as a percentage. In short, the more efficient a panel is, the more of the sun's light it can convert into electricity. The most efficient commercially available panels today are around 23% efficient -- the ones made by SunPower Corporation -- with most panel makers closer to 16% efficiency. And while more efficient is better, it generally comes back around to price. 

Cost per watt: This is one of the most important metrics to know, and explains how a 16% efficient panel can compete against a 23% efficient one. For panel makers, it's a measure of their production costs. Solar installers, on the other hand, often use it to show their "all-in" costs to sell a solar panel, including equipment, installation, and sales/marketing expense. In short, this measure is a handy way to normalize and compare results across different companies, and the companies with the lowest cost per watt are often in the best position. 

Megawatt: Often shown as "MW," this is 1 million watts. It is used to measure many things in the solar energy, but the starting point is power output capacity of solar panels or modules, often referred to as the "nameplate" capacity of a solar install. It's important to note that a solar system will never produce its nameplate capacity, because the sun doesn't shine all the time, and variables including temperature, the time of the year, and how well-maintained the system is will affect its real output. 

This measure is used by panel makers to report their manufacturing capacity, sales, and backlog of orders; by installers to report their total completed or booked installations; and by yieldcos to report how much power their facilities can generate, how much power they generated and sold in a given period, and the capacity of projects they are building, acquiring, or, in some cases, selling. 

Let's take a more in-depth look at each of the segments discussed above, and some of the key companies involved. 

These are the biggest solar panel manufacturers

These are often the first names that come to mind when someone says "solar stock." Here are the five largest publicly traded panel makers, by sales:

Company Revenue* Market Capitalization**
Canadian Solar (NASDAQ: CSIQ) $4.1 billion $1.04 billion
JinkoSolar Holding (NYSE: JKS) $3.6 billion $470.6 million
First Solar (NASDAQ:FSLR) $2.3 billion $4.8 billion
Hanwha Q Cells (NASDAQ: HQCL) $2.2 billion $806.7 million
SunPower (NASDAQ:SPWR) $1.98 billion $1.03 billion

Data source: Ycharts. *Revenue reported in four most-recent quarters. **Market capitalization as of Nov. 29, 2018.  

To be clear, these are the biggest publicly traded companies that make solar panels as their primary business. In recent years, other major panel makers, including industry giants Trina Solar and JA Solar, have gone private, but are still major players in the solar business. Furthermore, Tesla and its partner Panasonic are also major players in the solar industry, but neither counts solar panel manufacturing as its primary business. 

Like most manufacturing businesses, solar panel makers are directly affected by cyclical swings in demand. These cycles can be driven by multiple factors, including order cycles from large utility customers, government policies, and overall economic conditions. The past couple of years offer a great lesson on how demand can swing wildly from one year to the next. 

For instance, global spending on distributed solar (which consists of residential rooftop and commercial installations, excluding utility-scale projects) surged from less than $45 billion in 2016 to over $60 billion in 2017. Not only was this a substantial increase, but it ended four consecutive years of declines in global investments in this important subsector of the solar industry. 

However, the trend has reversed again. It's estimated that total global solar sales (including distributed and utility solar) will fall 24% in 2018, and prices could tumble as much as 30% as panel producers lower prices to offset the loss of financial incentives in China to counter import tariffs in the United States, and fight one another over a smaller global pie. 

The key takeaway is that, while global solar demand is expected to generally rise over time, there will likely be tremendous volatility from one year to the next. Keep reading further down for an overview at what's happened with panel makers in recent years, as well as a closer look at which ones you can invest in. 

Generally, panel makers are divided into two groups: commodity panel manufacturers such as Canadian Solar, JinkoSolar and Hanwha Q Cells, and more advanced-technology-focused panel makers like SunPower and First Solar. 

This can help explain the significant difference in how the market values these companies. For instance, JinkoSolar generated $3.6 billion in sales over the past 12 months, fully 50% more than First Solar. Yet First Solar is worth $4.8 billion, making it 10 times more valuable than the bigger commodity panel maker. 

Part of the reason for this extreme difference in valuation -- that is, using various financial metrics to determine what a company is worth -- is that First Solar has historically generated much higher margins and profits. Two metrics that show this are gross margin -- the percentage of gross profits a company generates -- and operating income, which subtracts operating expenses (but not expenses like tax and interest) from gross profit.

Here's a comparison of the companies over the past five years: 

FSLR Gross Profit Margin (TTM) Chart

FSLR Gross Profit Margin (TTM) data by YCharts.

First Solar has simply been more profitable, and investors have been willing to pay a premium to own the more profitable company.

But that's only part of the equation. Panel manufacturing is incredibly capital-intensive, meaning it requires substantial expense to build and operate the manufacturing facilities, and demand is very cyclical. A company with a strong balance sheet -- in other words, one that has enough cash or access to capital (such as a revolving credit facility) to tap during cyclical downturns, and not so much debt that it may struggle to service -- is far more capable of riding out the market's swings. No solar company comes close to First Solar in this regard: 

FSLR Total Long Term Debt (Quarterly) Chart

FSLR Total Long Term Debt (Quarterly) data by YCharts.

While the rest of its peers have twice or more debt than cash, First Solar carries an enormous $2.7 billion in cash while also having the smallest debt load -- by a very wide margin -- of the group. 

Here's why panel makers have been bad investments recently (despite incredible growth)

In recent years, solar has gone through unprecedented growth. Here's a look at just how much global installed capacity has increased over the past decade:

Table of cumulative solar PV capacity on a global basis.

Image source: IRENA.

This growth is expected to continue. The International Energy Agency projects that by 2022, global capacity will be between 1,000 and 1,300 gigawatts (GW), while GTM Research projects a more modest 871 GW by 2022. 

Despite the overall growth in capacity, spending and demand can fluctuate substantially from one year to the next: 

Chart showing annual net additions of solar PV capacity from 2007-2017.

Image source: IRENA.

A number of factors contribute to the sharp swings in annual solar panel sales.

Unfortunately for panel makers, 2018 is on track to be another down year, largely due to the implementation of U.S. tariffs on most imported modules (which make up the vast majority of panels installed in the country) along with China's recent move to slash incentives

These two major policy reversals in the two biggest solar markets in the world are having a major impact. Estimates are that global solar installations will fall 24% this year, and panel prices could fall as much as 30%. And it's playing out that way, with almost all of the biggest panel makers' stocks taking a beating in 2018:

FSLR Chart

FSLR data by YCharts.

To sum it up, panel making is a tough business. It's very capital-intensive, and as we have seen, very cyclical. And those cycles can make it tough on investors. That's made solar panel makers fairly poor stocks to hold over the past five years: 

FSLR Chart

FSLR data by YCharts.

Two solar-component makers to buy

If the solar modules in a solar panel are the engine, then the inverters that turn a panel's DC output into grid-usable AC and power optimizers, which help maximize output, are the transmission that gets the "power to the wheels." There are two companies with great prospects in the solar-component segment: power optimizer maker SolarEdge and microinverter leader Enphase. 

Both companies stand to benefit from the recently implemented electrical standard requiring the use of module-level power electronics, or MLPE, in the installation of rooftop solar systems. It just so happens that Enphase and SolarEdge are leaders in power optimizers and microinverters, respectively; it's estimated that about one-third of all solar panels installed each year will be in rooftop systems.

During what is shaping up to be a down year for the industry, these two suppliers have delivered positive returns since the beginning of the year:

SEDG Chart

SEDG data by YCharts.

And there's good reason to expect them to continue outperforming their panel maker peers. Fellow Motley Fool contributor and solar industry expert Travis Hoium recently pointed to their strong leadership in MLPE as likely to generate a lot of growth in the years to come.  

A closer look at solar installers

Sunrun and Vivint Solar are the two biggest pure-play solar installers, but face a lot of competition. That includes Tesla, following its 2016 acquisition of SolarCity, and panel maker SunPower, which has a substantial presence in residential and commercial solar via its partnerships with local independent installers. 

As with their panel maker cousins, recent policy shifts have also impacted solar installers. In 2018, 30% tariffs were placed on solar modules imported into the U.S., and high tariffs are set to remain in the years ahead: 

U.S. Solar Tariffs on Foreign Imports
Year 2018 2019 2020 2021
Amount 30% 25% 20% 15%

Data source: U.S. Trade Representative fact sheet. 

While panel makers have tried to absorb some of the tariff by lowering their selling prices, some of the tariff still gets passed along to the panel installers and the end customer. These higher prices have impacted demand so far this year in the U.S., a major distributed solar market and the primary (in most cases only) market the solar installers above operate in. 

Through the first half of 2018, industry analyst Wood Mackenzie Power & Renewables estimated that second-quarter 2018 residential solar installations were flat year over year at 577 megawatts (MW), and is predicting they will be flat for the full year. 

This reality is affecting different installers in different ways. On one hand, Tesla -- whose formerly named SolarCity installation business was once the largest residential and commercial installer in the U.S. -- has spent most of the past year reorganizing its solar business, costing it substantial market share to pure-play installers like Sunrun, which has aggressively expanded its operations and moved into the top spot. In the second quarter of 2018, Sunrun grew installations 20% over last year to 91 MW, but as my colleague Travis Hoium pointed out, growth in installations doesn't necessarily add value if your costs outpace your ability to raise prices. 

Vivint Solar, on the other hand, looks like it could be making solid moves to deliver better shareholder value. After reporting a tough first quarter with declining installations and rising costs, its 2018 Q2 result was a step forward. Installations were up very slightly from 2017 on a megawatt basis (and down in terms of the number of installs), both total installs and MW installed were up by double digits sequentially, while costs improved slightly, resulting in at least one Wall Street analyst upgrading the stock

But going forward, SunPower may have the most to gain in the U.S. residential and commercial market, following the decision by the Trump administration to exempt its panels from the tariffs. This one move could be worth a near-doubling of the company's earnings before interest, taxes, depreciation, and amortization, or EBITDA. But the immediate reduction in its costs on its current pipeline of business is only part of the upside. SunPower's sales model to residential customers, via independent local installers, could add substantial upside over the next several years. Not only does the tariff exemption significantly improve its competitive position on panel pricing, but small, independent installers tend to have lower overhead and installation costs than bigger national players like Vivint and Sunrun. 

Yieldcos: Solar stocks for dividend investors

If you're looking for steady income today, dividends to reinvest for the long term, or investments that could deliver years of dividend growth for future income, clean-energy yieldcos with solar power in their portfolios can be very appealing. Here are some of the biggest for investors to consider, ranked by dividend yield:

Name Dividend Yield* Market Capitalization
Pattern Energy Group (NASDAQ: PEGI) 8% $2.1 billion
Brookfield Renewable Partners (NYSE:BEP) 6.8% $8.8 billion
TerraForm Power (NASDAQ:TERP) 6.6% $2.4 billion
Clearway Energy (Class C) (NYSE: CWEN) 6.6% $3.5 billion
Clearway Energy (Class A) (NYSE: CWEN-A) 6.6% $3.5 billion
Nextera Energy Partners (NYSE: NEP) 3.7% $2.6 billion

Data source: Ycharts. Data as of Oct. 1, 2018. *Yield based on forward projections from last distribution. 

The first thing that investors should note is that the companies and master limited partnerships above aren't pure-play solar yieldcos. Instead, their portfolios of power-producing assets are composed of some mix of solar, wind, hydroelectric, and in a few cases, some fossil fuels such as natural gas. There really isn't such a thing as a pure-play publicly traded solar yieldco any longer, after a spate of acquisitions over the past year resulted in the handful out there to be acquired and taken private or combined with other companies. 

But the lack of a pure play in this space isn't a bad thing. To the contrary, the emergence of more diversified renewable energy producers is a reflection on the dynamic nature of the renewables space. By participating in solar, wind, and other sources of clean energy and renewable energy, these yieldcos have optionality to invest in the best, lowest-cost technology based on multiple variables, including the geographic area, impact of tax incentives, tariffs, or other regulatory and government programs. 

The second thing of note is that essentially all yieldcos have a sponsor or majority investor (sometimes publicly traded, sometimes privately held) behind the scenes. 

For instance, Pattern Energy Group is backed by privately held Pattern Development, sharing the same CEO. Pattern Development is a major developer of renewable energy projects, giving Pattern Energy access to a substantial pipeline of projects to acquire or take a partial stake in. Historically, this portfolio has been focused on wind projects, but it has recently announced that it will also invest in solar, power transmission, and battery-storage projects in the future. 

TerraForm Power and Brookfield Renewable Partners share a sponsor, in Brookfield Asset Management, the global infrastructure asset developer and investing giant. While they share a common controlling party, there are some substantial differences in the makeup and structure of the two.

TerraForm Power (which Brookfield Asset Management took control of in 2017) owns approximately 3,600 MW of wind and solar power producing assets, with one-third of that solar, and two-thirds wind. Brookfield Renewable, on the other hand, derives more than three-fourths of its power production -- a massive 17,400 MW -- from hydroelectric power. More recently, Brookfield Renewable has invested substantial capital in developing and acquiring solar and wind, including spending over $400 million to increase its stake in TerraForm Power to 30%. 

Next up is Clearway Energy, formerly known as NRG Yield until privately held Global Infrastructure Partners acquired its general partnership and a controlling common equity stake from former parent, utility giant NRG Energy. At last count, Clearway owned just over 7,000 MW of production, with almost 3,600 of that coming from solar and wind, and the rest from a combination of conventional fossil fuels (mostly natural gas) and thermal energy. 

Nextera Energy Partners is sponsored and controlled by Nextera Energy, one of the biggest utilities in the world. Nextera Energy Partners pays the lowest yield of this group, but has a lot going for it with its major utility backer taking advantage of the MLP structure as a growth vehicle for its own renewable aspirations. Nextera Energy Partners owns 4,100 MW of wind and 600 MW of solar assets, as well as over 540 miles of natural gas pipelines. 

Consider this one important thing before buying a yieldco

Another important thing to consider is corporate structure -- that is, what kind of legal entity the business is -- as it can affect the tax implications for you as an investor. Brookfield Renewable Partners and NextEra Energy Partners are limited partnerships, not corporations. There are advantages to this structure, since they don't pay corporate taxes and can therefore reinvest and pass through more cash flows to investors. There are disadvantages as well, mainly for investors. Since master limited partnerships (MLPs) don't pay corporate taxes, it can increase the tax burden (and complexity) for shareholders (technically called unitholders).

Instead of the typical 1099 form you may be familiar with, MLPs send investors a Schedule K-1 form. The short version is that you could end up paying a bigger tax rate on distributions from a MLP than on dividends from a company with a more-familiar kind of corporate structure. Furthermore, some MLPs pay distributions that can be considered "unrelated business taxable income," or UBTI. And while that doesn't really matter that much if you own shares in a taxable brokerage, it could result in paying tax on investments even inside a retirement account.

Because of this, some online brokers restrict the purchase of MLPs in retirement accounts. Brookfield Renewable Partners states that it is eligible to own in retirement accounts and doesn't pay UBTI, but your broker may still restrict ownership of this stock in these kinds of accounts. 

Top solar stocks to buy now

Of this substantial list of companies involved in the solar industry in one or more ways, there are six that stand out the most for me:

Stock Who should buy?
First Solar Investors looking for long-term growth, but who are relatively risk-averse (the company has the strongest balance sheet in the group)
SunPower Growth investors with a tolerance for significant price volatility
Enphase Energy High-growth investors with extreme tolerance for major double-digit price volatility
Vivint Solar High-growth investors looking for a risk-reward opportunity in residential solar growth
TerraForm Power Income and dividend-growth investors in taxable and retirement accounts
Brookfield Renewable Partners Income and dividend-growth investors in taxable accounts (and potentially retirement accounts, depending on your broker)

Investing in solar stocks can be daunting. Frankly, the ups and downs aren't likely to stop anytime soon, as so much of the industry is driven by the cyclical nature of utility-scale spending, which can swing sharply from year to year. But the more you deepen your knowledge of the industry, the easier it can be to ride out those swings, and even identify opportunities to buy. 

Furthermore, investors of all stripes can invest in -- and profit from -- solar stocks. Whether you're after growth, income, or some of both, this dynamic and growing industry fits somewhere in your portfolio. 

Jason Hall owns shares of First Solar, Pattern Energy Group, SunPower, TerraForm Power, and one share of Tesla. The Motley Fool owns shares of and recommends Tesla. The Motley Fool recommends First Solar. The Motley Fool has a disclosure policy.