It's no secret that 2023 has been a brutal year for renewable energy stocks, especially the once-red-hot solar energy industry. The Invesco Solar ETF (TAN 2.46%) rose 233.6% in 2020 while most of the stock market was floundering. After a follow-up jolt from the Inflation Reduction Act in 2022, it's been all downhill for solar stocks in 2023.

The multi-decade growth prospects of the solar industry are undeniable. The question for some investors isn't whether to invest in the industry, but rather which part of the industry holds the most promise. 

Let's look at how the Invesco Solar ETF, down over 25% year-to-date and pretty much flat over the last three years, stacks up against two of the most popular solar stocks -- Enphase Energy (ENPH 3.80%) and SolarEdge Technologies (SEDG 2.81%).

A technician installing solar panels on top of a roof with the bright sun in the background.

Image source: Getty Images.

A lesson in margin compression

When a new idea with limited competition hits the ground running, it typically enjoys high margins and pricing power. But over time, competition seeps in, and margins compress. At least in most cases.

Some companies, like Apple (AAPL -0.35%), have impeccable brand equity and vertical integration that protects their high margins despite droves of competition. That isn't usually the case in industries that are providing a commodity, like electricity.

Solar panel manufacturers have undergone a global price war, which has hurt the industry but benefited project operators thanks to lower panel costs. However, higher interest rates reduce the return on investment for utility-scale solar projects, and also dissuade residential buyers from installing rooftop solar by extending the time it takes to recoup the installation's initial investment.

Today, it's not just the panel manufacturers that are under pressure. The whole industry is feeling the heat as growth slows. Another factor at stake is the stability and security of oil and gas, two traits that are top of mind given geopolitical disruptions. Energy-dependent countries may turn to a proven solution like oil and gas instead of intermittent energy resources. And since oil and gas prices are relatively high, many companies in that industry can fund growth with cash flow instead of debt, giving them yet another leg up on renewable energy companies.

In sum, the energy transition is having a tough time stacking up against the near-term advantages of oil and gas.

How to approach a solar investment

The Invesco Solar ETF is an excellent starting point for investors interested in the solar industry. It features a nice blend of renewable energy equipment and information technology companies like Enphase and SolarEdge. Over 37% of the fund is in utilities and industrial companies as well. Most importantly, over 45% of the fund is allocated toward companies outside of the United States, so international exposure to countries like China, Germany, and Spain are real factors to consider here.

Enphase and SolarEdge are the largest and third-largest holdings in the fund, respectively, making up just shy of 20% of the total fund's holdings. For some investors, it may make the most sense to simply go with Enphase and SolarEdge instead of a more diversified approach.

Both companies have seen sizable sell-offs despite the fundamentals holding up nicely. The biggest issue is slowing revenue growth. But besides that, margins have held up in what has been a very challenging time for the solar inverter and power optimizer market, especially in Europe.

ENPH Chart

ENPH data by YCharts

In the above chart, you can see that revenue and earnings growth have stalled but are still strong, while gross margins remain above 30% for both companies.

Premium stocks for a below-premium price

Enphase and SolarEdge are excellent values for investors who believe the companies can sustain their high margins and growth over time. And even if you think the growth rates will slow and the margin advantages may give ground, which they very well could, both stocks are not nearly as expensive as they used to be.

Enphase trades at just a 23.4 forward price to earnings ratio, while SolarEdge clocks in at just 14.7. These valuations are reasonable for the bear cases that argue that both companies will slow down. But in the event that growth does return and margins hold up better than many expect, these valuations will start to look very cheap.

A sell-off worth taking advantage of 

The Invesco Solar ETF has a lot to offer and remains an excellent starting point for investors looking to dip their toes into the beaten-down international solar industry. But simply buying a 50/50 split of Enphase and SolarEdge may be an even better play.

Both companies have strong fundamentals and haven't succumbed to price wars, competition, and margin compression thus far. And to top it all off, the stocks have been crushed and are not as expensive as they once were.

The situation is likely to get worse before it gets better. But if you're willing to be patient, now seems like a great time to take a closer look at Enphase and SolarEdge.