It's no surprise that SunPower Co. (NASDAQ:SPWR) reported a big loss for the fourth quarter -- investors had been expecting that for some time now. What is surprising is how big the loss was, and the charges the company is taking to adjust the business for the future. 

Its Q4 revenue was $1.02 billion, gross margin was negative 3.1%, and net loss was a whopping $275.1 million, or $1.99 per share. There are a lot of moving pieces for a company like SunPower, so I'll break things down by how the business is doing in residential, commercial, and utility-scale solar. 

A community of solar powered buildings.

A community of solar powered buildings. Image source: SunPower.

The one bright spot for SunPower

As expected, residential solar was the best segment for SunPower in the quarter. Revenue was $184.7 million, gross margin was 2.3%, and 84 MW of production capacity was installed. Management said the company gained market share and if it weren't for charges associated with losses from polysilicon contracts and the shutdown of equipment the segment would have had a margin of around 20%. 

Demand was strong for SunPower's high-efficiency X-Series product, which had an average cell efficiency of 25%, and margins for it were high. Management said it gained ground to to the No. 2 position for residential market share in the U.S., and saw traction in the E.U. and Japan as well. 

If there's one business are that should be strong for SunPower in 2017, it's residential solar. Look for its sales and margins to improve throughout the year, and for energy storage and smart energy to start becoming a more important part of its product mix. 

Bigger roofs, bigger challenges

Commercial solar has been a bit more hit-or-miss for SunPower. Revenue was $215 million on 108 MW of recognized sales, but gross margin was negative 5.9%. Even if you pull out the polysilicon charge referenced earlier, the segment was likely barely better than breakeven. 

Helix is the full solution SunPower has developed for commercial projects, but the company has found it harder to make money with the product it than originally expected. CEO Tom Werner told me after the third quarter that commercial solar is where SunPower needs to execute better, and that it needs to lower costs for the Helix system, but it may be too early to see much progress on those efforts. 

SunPower says it has the No. 1 market position in commercial solar; as the market grows, that should be a point of strength, particularly as energy storage becomes a more common piece of the puzzle for commercial customers. And high efficiency should bring lower costs than competitors in constrained spaces. But right now, the commercial business is struggling, and certainly didn't help abate losses last quarter. 

The headache for SunPower today

Where conditions get really tricky is with SunPower's utility business. Rapidly falling power purchase agreement prices have squeezed margins, and rising interest rates are making project sales less profitable. On $697.6 million in utility sales -- 385 MW of recognized sales -- the company had a negative margin of 2%. 

The good news is that project sales led to $50 million in net cash generated and about a $500 million reduction in debt on the balance sheet. Generating cash is the company's top priority in 2017, so these sales were key to its strategy. And P-Series production capacity is supposedly increasing faster than planned, with 400 MW of capacity expected to be operational by the end of the first quarter.

SunPower is going through a major strategic shift in its utility solar business, moving from building and owning projects until they're completed to self-developing in select markets and selling full solutions with a new solar panel to other markets. If SunPower is going to turn its utility-scale solar business around, its P-Series panel and Oasis design will have to be made cost competitive around the world at a time when companies are beating each other up to win business. Keep an eye out for potential project wins in the next quarter or two as signs the business is, or isn't, heading in the right direction. 

Hidden value for SunPower

While SunPower goes through the challenges inherent in adjusting its business, it's important to keep in mind the value that's hiding on the balance sheet. It holds 443 MW of operating assets, with another 334 MW under construction, and 795 MW worth of contracted projects. This includes 340.6 MW of residential projects with $1.29 billion in contracted payments. 

The company's stake in 8point3 Energy Partners, worth about $400 million at today's stock price and will pay around $30 million annually in dividends. 

Then there's the fact that French energy giant Total owns two-thirds of SunPower's stock, and will likely help it build a bridge to the future if 2017 is rougher than expected. 

Green shoots are starting to appear in SunPower from residential markets and even commercial solar projects. And the value on the balance sheet is a backstop for a company worth just $1 billion on the market today. If it can get its products and strategy right in utility-scale solar over the next few quarters, we could finally see a turnaround in the stock. But the market has shown it needs to see proof that improvement is on the way, not just rosy projections. And that may still be a few quarters away. 

Travis Hoium owns shares of 8point3 Energy Partners and SunPower. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.