Solar stocks have been on a tear in the past few weeks, surrounding earnings season for the fourth quarter of 2016. Three of the largest solar companies -- First Solar, Inc. (NASDAQ:FSLR), SunPower Corporation (NASDAQ:SPWR), and Canadian Solar Inc. (NASDAQ:CSIQ) -- have seen shares spike, and it hasn't necessarily been because earnings have been great. 

Sometimes, the market can push stocks higher just because conditions aren't getting worse, and that has something to do with the stock run. But here's how I think we should look at solar stocks like this today.

Man smiling, standing next to electricity meter on his home.

Image source: Getty Images.

Getting over the 2017 abyss

The slump in solar stocks during 2016 was all about looking at the future. For a multitude of reasons -- declining Chinese demand, a lack of urgency to build U.S. projects, and falling Japan tariffs -- 2017 solar demand is expected to be lower than 2016. The market is also oversupplied with solar panels, so panel prices have plunged. 

FSLR Chart

FSLR data by YCharts

Investors simply didn't know what to expect in 2017 and many solar companies, including SunPower and First Solar, are using this opportunity to restructure their businesses. As a result, financial performance is going to be terrible in 2017, but it'll likely improve dramatically in 2018 when demand starts to pick up because of booming global demand. And a lot of the 2018 demand is already contracted, so we know the improvement is coming. 

Investing in solar stocks over the past year was like approaching an abyss and not knowing how deep it was. But the more time goes by, the less scary 2017 seems, and the focus will start to turn to growth in 2018 and beyond. 

Setting up a winning strategy

As I mentioned, the lull in 2017 will also give these companies a chance to look at the landscape and adjust strategically to where they fit in the market. First Solar scrapped its Series 5 module upgrade and decided to go straight from Series 4 to Series 6, which will mean the company will start selling its next-generation product next year. 

SunPower shut down a large chunk of its E-Series manufacturing and is focusing on industry-leading efficient X-Series and commodity-plus P-Series panels. Management also appears to be focusing more on residential and commercial solar than ever before. 

Canadian Solar is selling off assets in an effort to solidify its balance sheet for 2017. So far this year, the company has sold $342.5 million of solar projects, creating a lot of cash. 

Community solar installation on multiple buildings by SunPower.

SunPower solar installation. Image source: SunPower.

The deep value in solar stocks

When an industry like solar energy is going through a rough patch, we can sometimes lose sight of the value solar companies have in their business. First Solar's market cap sits at $3.9 billion and management expects to have $1.4 billion to $1.6 billion in net cash on the balance sheet at the end of this year. When plant upgrades are complete in 2019, the company will also have 3 GW of annual solar capacity that should have a cost advantage over commodity panels. 

SunPower is worth $1.2 billion today, but it has a $400 million position in 8point3 Energy Partners and the most efficient solar panels on the market. Add in the fact that oil giant Total owns two-thirds of the company and the downside risk is fairly low in the stock, but the upside is high if the strategic changes it's making work out. 

Canadian Solar's market cap is $855 million and the company's book value is $938 million with $1.2 billion of un-monetized assets on the balance sheet. With 5.8 GW of capacity, it is one of the largest solar manufacturers in the world. 

I think investors have overlooked the value in solar stocks lately and focused on risk. But as the market starts to look toward a brighter future in 2018 with less downside, there could be an increased interest in solar stocks. Maybe the recent pop in shares is a trend that will drive the industry higher in 2017.