It may not seem like it based on mounting losses and a lagging stock price, but SunPower Corporation's (SPWR -3.61%) year is turning out a lot better than expected. Where it once hoped to just generate enough to keep its manufacturing plants going, it's now announcing expansion plans. Financial guidance a few months ago that just hoped to see the company with positive EBITDA for 2017 is now projecting $165 million to $190 million in EBITDA for the year.

Shares reacted positively after the results came out, and it's looking like this could be the start of a nice recovery for the company. Here's why I think SunPower is well positioned for growth in solar. 

Home with a large rooftop solar system.

Image source: SunPower.

Why SunPower's results crushed expectations

$477.2 million in revenue and non-GAAP net income of $29.5 million, or $0.21 per share, was easily better than expectations, and there were a few reasons why.

One is that SunPower sold the Gala project, which was anticipated to be sold in the fourth quarter, as well as the interconnection of the 100 MW El Pelicano project in Chile. Project-related sales can lead to big sales spikes in certain quarters, and this was one of the quarters where projects worked in SunPower's favor. 

What was even more surprising was strong revenue and margins in the commercial and residential markets. On a non-GAAP basis, residential solar revenue was $151.9 million with a gross margin of 21.5%. Commercial sales were $157.8 million with a gross margin of 16.2% after three straight quarters of single-digit margins. Gross margins of 4.5% in the power plant business still represent a lag on results, but the other two segments are performing very well.

Commercial solar is going like gangbusters

It doesn't get a lot of attention, but commercial solar is arguably the biggest untapped opportunity in solar energy. SunPower has long targeted this market with its Helix solutions for rooftops, carports, and small ground-mounted installations. But margins have been disappointing even as management touted the growing opportunity. 

Solar carport with cars underneath on a sunny day.

Image source: SunPower.

In the third quarter, the investment in commercial sales started to pay off. Not only were margins strong at 16.2%, SunPower announced it has $60 million of commercial energy storage as a pipeline. Management said that energy storage could be included in half of the company's commercial projects in 2018. 

Incorporating solar and storage will be a big differentiator for SunPower and could give it a big competitive advantage in the industry. If momentum continues, I would expect volumes and margins to both increase as solar plus storage adoption grows. 

Next generation panels are coming

For most of 2017, SunPower has been talking about its next-generation solar panel, which will be built from a larger, more efficient cell than is currently produced. This will help lower costs and simplify the manufacturing process. 

Management said on its conference call that production equipment has been ordered and will be installed in Fab 3 next year, with limited quantities produced. By the end of 2018, they expect a 75 MW run rate of next-generation production, with the potential to increase from there. This product would likely replace E-Series panel equipment, which is now nearly a decade old -- so it may not increase MW produced annually by much, but it will increase sales per watt and margins. 

Slow and steady progress is paying off

SunPower isn't the kind of company that's going to wow investors with its growth or profitability right now, but it's making steady progress in building a sustainable business in solar energy. Its commercial and residential solar platforms are starting to generate strong revenue and margins, and the company will be adding energy storage to the mix, which will add incremental value. In power plants, the Oasis platform is starting to be sold at higher volumes around the world, and as production ramps at a joint venture in China this business should grow. 

There's still a long road ahead before SunPower reaches sustainable profitability, but I think it's on the right path, and the efficiency advantage it has and investments in turnkey solutions are finally starting to pay off.