In the past few years, a lot of focus has been on technology stocks. The tech-heavy Nasdaq Composite Index has returned 49% since the beginning of 2020. That's significantly better than other popular indexes. But the fickle winds of stock market sentiment are shifting.

Lately, energy stocks are shooting higher. That makes sense with commodities spiking. But many investors want nothing to do with traditional oil and gas stocks. For them, Generac Holdings (GNRC 3.70%), a company best known for residential generators, could be a great addition to a portfolio lacking energy exposure. Here's why.  

A downed power line from a tree falling.

Image source: Getty Images.

The next-generation energy grid

Beginning in 2020, most residential construction in California was required to have solar panels. The same will be true for commercial buildings beginning in 2023. As usual, California is the leader in a green energy initiative.

But more people across the country are looking for homes that generate at least as much energy as they consume. Through increased monitoring and sending excess power back onto the "smart grid," homeowners can help increase efficiency and balance demand and capacity for a large power generation system.  

The trend is expected to accelerate as younger generations become a larger percentage of homebuyers. Generac is known for generators that keep the lights on when the power goes out, but it also has expanded into solar energy and battery storage and has what it believes is the broadest line of products with smart-grid-ready capabilities. It's a large and expanding market that should fuel growth for years.

Graph showing projected increasing market size of smart grid industry.

Home as a sanctuary

Although residential sales have been the most consistent grower, the smart grid will also benefit sales for Generac's commercial and industrial unit. The latter segment experienced a downturn in 2020 as construction slowed. But residential sales more than made up for the drop. 

A larger number of power outages and the increasing reliance by consumers on their houses as both home and office (and sometimes gym) accelerated demand for generators. The residential segment made up two-thirds of revenue last year after contributing only half as recently as 2015.

Graph showing residential segment growing faster than commercial.

Data source: Generac Holdings. Chart by author.

Powering a smarter world

Despite the recent growth, there is still huge potential. The company estimates only about 5.5% of homes currently have a standby generator. The number exceeds 20% in areas with the highest penetration. Extreme weather events are making them essential to many. And scientists expect those episodes to become even more frequent. 

Management is continuing to prepare for that future. It's moving beyond its traditional generator market to provide an energy ecosystem. Last year, it purchased Ecobee for its suite of home-monitoring products that help optimize heating and cooling, leading to both energy conservation and savings. And it's a perfect extension into the home to connect to the smart grid.  

Many investors, especially environmentally conscious ones, might not invest in a traditional energy company. And history shows investments in environmental technology are risky. That's why I believe buying shares of Generac can be a savvy way to get broad exposure to the energy industry without going outside your comfort zone.