What happened

Shares of SunPower Corporation (NASDAQ:SPWR) jumped as much as 14.5% in trading Tuesday as solar stocks soared. Shares were still up 12.5% at 3:30 p.m. EDT as the trading day neared a close.

So what

There were no big news items about SunPower, but a few larger trends could be helping the stock. First, the attack on Saudi Arabia's oil production has raised questions about the stability of the world's energy production. Investors may be seeing solar energy, which is growing rapidly in the U.S. and around the world, as a good alternative, pushing the entire industry higher today.

A large roof covered in solar panels, with the Washington Monument in the background

Image source: SunPower.

Investors are also digesting a lawsuit Walmart filed against Tesla (NASDAQ:TSLA) over solar installations that have caught fire on the company's rooftops, something Amazon has experienced as well. If Tesla loses its commercial solar customers, SunPower, the largest commercial solar installer in the U.S., will be the natural winner. In fact, it already has a contract with Walmart to install rooftop solar.

Now what

The combination of macro worries about oil and an industry-specific shift to SunPower's solar panels in the U.S. are a bullish trend that can take shape on days when volatility is high. That's what's going on today, with oil down 6.2% at this writing and most solar stocks up by mid-single digits.

As a high-volatility solar stock with a lot of operating leverage, SunPower has a lot to gain if the industry sees a rise in demand, and that's what investors are betting on today. But we've seen big gains before -- and unless SunPower's operations turn a corner, this gain could be short-lived.