What happened 

Solar stocks were on fire Thursday after Sunrun Inc (RUN 1.39%) reported earnings and California mandated solar on all new homes. Sunrun jumped as much as 19.7% while Vivint Solar Inc (VSLR), Enphase Energy Inc (ENPH -2.46%), and SolarEdge Technologies Inc (SEDG -2.77%) were up 12.5%, 15.6%, and 16.3% respectively at their highs for the day. 

So what

Sunrun's first quarter saw installations fall 5 megawatts (MW) to 68 MW and creation costs were up 3.8% to $3.51 per watt. What surprised investors was net income of $28 million, or $0.25 per share, which beat estimates by a penny. If earnings alone were all investors had to digest, I don't think shares would have moved much, but there was other news on the market's mind. 

Large roof with solar panels.

Image source: Getty Images.

On Wednesday, the California Energy Commission passed a rule that effectively mandates solar panels on new homes starting in 2020. According to Sunrun's presentation to investors, about 100,000 new homes are built each year in California and if the average rooftop solar system is 6 kW, that could mean 600 MW of demand each year from new homes, a lot of which would be incremental growth for the market. 

As two of the top three solar installers in the country, Sunrun and Vivint Solar could see a sharp rise in demand from the new rule in California. According to GTM Research's U.S. Solar Market Insight report, there was 2,147 MW of residential solar installed in the entire country in 2017, so California's mandate could increase the market by 10% or more, depending on how many new homes already included solar. 

As component suppliers, Enphase Energy and SolarEdge Technologies would also see an increase in demand from the California rule. That's why they were following solar installers higher. 

Now what

The next challenge will be building the partnerships necessary to exploit a growing California residential solar market. There's an opportunity for each of these companies to grow, but they don't have residential homebuilders as regular partners right now. 

Its stock didn't move Thursday, but as of last June SunPower (SPWR -2.21%) had partnerships with 10 of the 13 largest home builders in the country. It seems they would be in the lead when it comes to selling more solar systems in California. 

Nevertheless, the stock market sees California's policy environment as a good thing for residential solar stocks on Thursday and it's easy to see why Sunrun, Vivint Solar, Enphase Energy, and SolarEdge Technologies will see greater demand when the rule goes into effect.