SunPower (NASDAQ:SPWR) is trading at a trailing P/E ratio around 50 while its competitor First Solar (NASDAQ:FSLR) trades at a trailing P/E ratio around 20. Such a big difference in valuation could signal that SunPower is heavily overvalued or that it is a far superior company. The situation is complex, but taking into account changing margins and fundamental product differences SunPower really is the superior growth stock for long-term investors.

SPWR Gross Profit Margin (TTM) Chart

SPWR Gross Profit Margin (TTM) data by YCharts

First Solar has traditionally had superior margins to SunPower and low-cost manufacturers like Yingli Green Energy (NYSE: YGE), but things are moving in a new direction. SunPower's high efficiency panels are in such high demand that in 2013 it produced 1,134 MW, utilizing 94.5% of its annual capacity. First Solar's panels are not as attractive and its 2013 capacity utilization was just 77%.

Yingli's rising margins are a dangerous sign for First Solar. Yingli's growth allows it to pump more money into its R&D operations and better serve cost-sensitive solar purchasers. Yingli did post an operating loss of $185 million in 2013, but from Q1 2013 to Q4 2013 its gross margin improved from 4.1% to 12.2%.

First Solar's thin film panels were designed to win the cost wars by offering a low price and low efficiency, but the return of Chinese manufacturers and the rising importance of efficiency has forced First Solar to go in a new direction. Its new TetraSun modules offer significantly higher efficiencies and are expected to ramp up production in Q3 and Q4 of 2014. First Solar's TetraSun panels will be a big help with their high efficiencies over 21%, but SunPower already offers panels that are up to 24% efficient.

The rooftop difference
Not only is SunPower producing great panels, it is a big distributed generation player. In Q4 2013 it shipped 48 MW of residential and light commercial systems in North America. This is significant as the dedicated solar installer SolarCity (NASDAQ:SCTY.DL) installed 103 MW, just slightly more than double what SunPower installed.

Both SunPower and SolarCity are growing by leaps and bounds, but SunPower's integrated approach has big advantages. SunPower can easily work in the distributed generation markets or the utility markets, offering panels and complete systems. By working with the entire solar market it is better able to deal with instabilities in government policies. The U.S. residential market is heavily exposed to the solar tax credits that are set to expire in 2016, and this could put a big dent on SolarCity's growth. 

SolarCity is still a major growth stock. Its revenue grew from $30 million in Q1 2013 to $47 million Q4 2013, but SunPower's diversification helps it to have a more consistent growth profile.

First Solar has traditionally focused on the utility market instead of the distributed generation market. This was its only choice given thin film's low efficiency. Now that First Solar is bringing its TetraSun panels to market SolarCity and SunPower will have another competitor. Still, SolarCity's and SunPower's head start should give them an advantage.

What's a Fool to do?
Year over year First Solar's 2013 revenue fell by $60 million while SunPower's revenue grew $90 million in the same time frame. SunPower's margins are improving and it is running at capacity while First Solar is far below capacity. First Solar is in a better position than others like Yingli, but at the end of the day SunPower has the superior growth trajectory.

The downside is that SunPower is trading with a valuation around 50 times earnings. To justify an investing at this valuation you need to be willing to invest for the long term and be ready for the market's swinging sentiments.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.