California just took another step towards going green.

Starting on Jan. 1, 2020, most new homes in the state will be required to have solar panels installed. California is the first U.S. state to require homes to have solar panels. 

After a tumultuous start to the year—with hefty tariffs placed on solar panels—the news of the new regulation has sent solar stocks soaring. Some of the top solar panel companies, which include First Solar Inc. (FSLR) - Get Report , Sunrun Inc. (RUN) - Get Report , SolarEdge Technologies Inc. (SEDG) - Get Report , Sunpower Inc. (SPWR) - Get Report , and Vivint Solar Inc. (VSLR) - Get Report , saw their stocks rise in Thursday. Tesla Inc. (TSLA) - Get Report , which also produces solar panels via its SolarCity subsidiary, was up 1% on Thursday.

Sunrun, the largest U.S. solar installer, has seen the highest gains so far, over 7% in trading on Thursday morning.