It's October, and that means that like everyone else, investors are a little more wary of things that could spook their portfolios. Lately, market participants have counted on lawmakers in Congress to find a way to work with the White House and come up with a plan to provide more economic stimulus to make ends meet. Today's suggestion that there might not be a near-term solution to the economic woes of millions of Americans led to a sell-off. By the end of the session, the Dow Jones Industrials (^DJI -0.98%), S&P 500 (^GSPC -0.46%), and Nasdaq Composite (^IXIC -0.64%) had all suffered significant losses.

Today's stock market

Index

Percentage Change

Point Change

Dow

(1.44%)

(411)

S&P 500

(1.63%)

(57)

Nasdaq Composite

(1.65%)

(193)

Data source: Yahoo! Finance.

Yet there was an interesting group of stocks that managed to gain ground even on a dark day. Shares of solar energy companies were strong performers, with many different facets of the industry seeming to attract investors to take a closer look. That's somewhat surprising given the state of the energy market more broadly, but it points to a trend in solar that could spell more gains for these stocks.

Sun rising over mountain, with solar panels in foreground.

Image source: Getty Images.

The sun is shining on solar stocks

There were several bright spots in the solar industry on a dreary day for the broader market. Here are just a few:

  • Solar power giant SunPower (SPWR -3.09%) saw its stock rise another 3%, adding to recent gains.
  • Some solar panel manufacturers saw even larger moves higher. JinkoSolar (JKS -0.34%) picked up more than 8% Monday, while Canadian Solar (CSIQ -3.08%) climbed nearly 4%.
  • On the equipment side of the business, microinverter specialist Enphase Energy (ENPH 0.62%) pushed higher by 3.5%. That marked another all-time high for Enphase.

Fundamentally, the moves were strange. Solar energy tends to do best when prices of fossil-fuel energy sources are high, because it then makes more economic sense to substitute in renewable energy sources. That's certainly not the case right now, with crude oil still stuck around $40 per barrel.

Going beyond price

However, the solar market hasn't behaved with perfect alignment to economic conditions lately. Solar and other renewable energy sources, including wind, appear poised to become the most prevalent source of electrical generation worldwide by the end of the 2020s, according to the International Energy Agency.

In the U.S., there are still significant incentives supporting solar energy. Many states have programs to pay additional money to residential solar power system owners, requiring utilities to account for a certain portion of their overall production through renewable energy credits. Even when fuel prices are low, that can be enough to make things more economical.

Moreover, in other countries around the world, more stringent regulations make solar power even more attractive. In some areas, fossil fuel-burning generation simply isn't an option.

In recent years, we've seen not only rising demand for electricity, but also the consequences of an outdated energy infrastructure system. Solar advocates see the potential for a game-changing shift in electrical distribution to focus more on local generation from solar. If that happens, then the gains that solar stocks like SunPower and Enphase saw today could be just the beginning.