U.S. solar stocks rocketed higher this week after the California Energy Commission mandated that new homes and low-rise apartment buildings must install solar panels starting in 2020. The requirement, which needs final approval from the state's Building Commission, is expected to add about $10,000 to the cost of a single-family home but save owners up to $20,000 in energy costs over 30 years.

The Guggenheim Solar ETF (TAN) jumped to a three-month high after the news and is testing the three-year high posted in January 2018. This bodes well for the broad sector, including companies affected by the Trump tariffs put into place in February. Even so, local manufacturers should compete more forcefully for those lucrative contracts than companies importing panels from China and other big industry players. (See also: The Economics of Solar Power.)

First Solar, Inc.'s (FSLR) market cap stands at $7.0 billion, currently the highest among U.S.-domiciled solar manufacturers. The stock broke four-year support in the mid-$90s in 2011 and entered a steep downtrend that bottomed out at $11.43 in 2012. The subsequent recovery wave stalled in the mid-$70s in 2014, with that level repelling multiple breakout attempts. The stock fell to a four-year low in the $20s in 2016 and turned higher, reaching resistance for the fifth time in January 2018.

A shallow pullback found willing buyers in February, generating an impressive uptick that reached a six-year high at $81.72 in April. Sellers then took control once again, triggering a failed breakout before the shares found support in the mid-$60s. The stock surged higher this week in reaction to the California mandate, with a buying spike above $82 set to confirm a multi-year breakout that could tag triple digits. (For more, see: The History of First Solar.)

France's Total S.A. (TOT) holds a majority interest in California's SunPower Corporation (SPWR), which has a $1.2 billion market cap. It rallied to a six-year high in the low $40s in 2014 and rolled over, carving a topping pattern that broke to the downside in May 2016. Selling pressure persisted into the first quarter of 2017, giving way to a basing pattern with support near $6.00. A rally attempt into July failed at $11.70, generating months of sideways to lower price action.

The stock turned higher once again in February 2018 and is now trading less than three points below the 2017 high. It broke a trendline of lower highs in April, indicating rising relative strength that could presage a trip into that resistance level in the coming weeks. Even so, potential buyers should curb their enthusiasm because a partially unfilled August 2016 gap between $11 and $14 is likely to slow or stall progress in the coming months. (For more, see: SunPower Breaks Out After Seeking Exemption.)

Vivint Solar, Inc. (VSLR) covers just 21 states, including California, while carrying a $519 million market cap. The Utah-based manufacturer came public near $17 in October 2014, posted an all-time high in that session and turned sharply lower, finding support at $7.42. The stock held that trading floor into a February 2016 breakdown that reached an all-time low at $2.30 a few months later, ahead of a long-term basing pattern that yielded a June 2017 breakout.

The rally stalled at a16-month high just above $6.00, giving way to a slow-motion decline that posted a higher low in February 2018. It has been on the recovery trail since that time and just crossed the 50% sell-off retracement level, which also triggered an inverse head and shoulders breakout. This raises the odds for continued upside that could reach last year's high in the third quarter.

[Learn more about recognizing chart patterns and developing your trading strategy in Chapter 5 of the Technical Analysis course on the Investopedia Academy

The Bottom Line

U.S.-based solar stocks are gaining ground following California's decision to mandate solar panels on residential construction starting in 2020. The news should ease sector anxiety generated by tariffs placed on foreign manufacturers in February and could signal the start of a long-term sector uptrend. (For additional reading, check out: Top 3 Solar Stocks as of May 2018.)

<Disclosure: The author held no positions in the aforementioned securities at the time of publication.>