Check out the latest Canadian Solar and Plug Power earnings call transcripts.

2018 was a rough year for renewable-energy stocks. For example, shares of Canadian Solar (CSIQ 4.48%), one of the world's largest solar panel manufacturers, were down 16% for the year. That's bad, but the hydrogen fuel cell industry was hit even harder. Shares of Plug Power (PLUG 1.26%), the No. 2 manufacturer of fuel-cells, were off by 47.5%.

But green energy is the wave of the future...isn't it? Maybe these 2018 losers are ripe to become 2019's big winners. Let's dig deeper into these renewable-energy companies (and their industries) and see which looks like the better buy. 

A man's hand holds a lit Edison bulb against a background of green grass.

Many green-energy-industry companies have underperformed in 2018. Image source: Getty Images.

Solar meets headwind

For Canadian Solar in 2018, the company was in the wrong place at the wrong time. 

The wrong place was outside the United States, as 30% tariffs on imported solar panels that were implemented in 2017 remained in place throughout the year. Some U.S. installers had imported large quantities of panels before the tariffs took effect, which caused a dip in sales as installers worked through those backlogs. The tariffs also made Canadian Solar's imported panels less attractive compared to those of domestic manufacturers like First Solar

2018 was the wrong time for solar panel manufacturers across the globe, which have been squeezed by a rise in the price of raw silicon ingots -- an important component of solar cell manufacturing. Because solar panel makers don't manufacture most of their own ingots, a rise in the price of ingots results either in higher prices passed on to consumers or in tighter margins. 

As if this squeeze wasn't bad enough, China -- which had been a big buyer of solar panels and an attractive option for companies wanting to sell outside the U.S. to avoid tariffs -- made big changes to its solar investment policy in June, effectively collapsing what had been a major market for Canadian Solar.

Finally, in 2015, Canadian Solar expanded into the project development space, building solar farms for which it supplied the panels. Those projects had been a driver of big margins. But recently, margins on solar project development have diminished

In short, it's a challenging environment for solar in general and for Canadian Solar in particular. Nobody knows how U.S. or Chinese energy and trade policies might change -- or remain unchanged -- over the next few years, and any changes are likely to have an outsize effect on Canadian Solar. But in spite of all that, the growth opportunities for the industry, in general, are still massive.

Powering down

If solar is a promising industry that just happens to have hit a rough patch, the hydrogen fuel cell industry has hit a rough continent. Fifteen years ago, fuel cells were being mentioned in the same breath as electric batteries as the transportation fuel of the future. Today, battery technology has soared ahead while fuel cell tech has stagnated. Now battery-powered electric cars (like Tesla's Model 3) are a regular feature on highways around the world, while fuel cells have been relegated to a few niche applications like industrial forklifts and airport vehicles. 

That's not to say that Plug Power has thrown in the towel. On the contrary, it has cozied up to some high-profile partners, inking forklift deals with major warehouse operators like Walmart and Amazon and supplying a road-ready delivery van to FedEx in May. These deals and others like them have lifted Plug's revenue to record highs. 

Unfortunately, those big bumps in revenue haven't translated into profits. In fact, Plug Power has only posted a quarterly net profit once in the last 10 years...and that was back in 2014. While gross margins have been improving during 2018, it doesn't seem to be the kind of consistent improvement investors can count on:

PLUG Revenue (TTM) Chart

PLUG Revenue (TTM) data by YCharts.

Financial position

While both of these companies have been weathering tough times, at least Canadian Solar has been consistently turning a profit, while Plug Power...er...hasn't. Additionally, the solar industry is clearly still a going concern with a bright future, but the hydrogen fuel cell industry's outlook is (in the immortal words of the Magic 8 Ball) hazy.

But perhaps the biggest contrast in the companies is how their balance sheets have fared as they battle their respective industry issues:

CSIQ Total Long Term Debt (Quarterly) Chart

CSIQ Total Long-Term Debt (Quarterly) data by YCharts.

In 2018, Canadian Solar has been paying down long-term debt, while Plug Power has been accumulating it -- a lot of it. Meanwhile, over the last five years, Plug Power's share count has gone up as the company has issued more equity to raise money. By contrast, Canadian Solar's share count has remained roughly the same, with some small quarterly fluctuations.

The winner is clear

What we have here are two major players in troubled green-energy industries. One has remained consistently profitable without taking on excessive debt or diluting shareholder value. The other can't seem to turn a profit despite consistent revenue increases and has been taking on debt and diluting the value of its shares. Even without considering the likely futures of the solar industry versus the hydrogen fuel cell industry, the winner is clear: Canadian Solar.

Of course, short-term trends, shifting government policies, and the whims of the market could certainly cause Plug to outperform Canadian Solar over the short term. And over the long term, Canadian Solar may underperform some of its solar manufacturing peers. In fact, I wouldn't recommend Canadian Solar or any solar-industry stock to investors right now unless they could stomach a good deal of risk. But for those who can, Canadian Solar is the better buy.