It’s been a volatile week for solar energy market leaders First Solar Inc. (FSLR) and SunPower Corp. (SPWR), as investors go back and forth in response to quarterly earnings results, new contract wins and analyst reports. While solar is set to become the world’s main source of energy production by 2050, the industry has experienced a rocky patch due to a variety of factors including Donald Trump’s election, low oil prices, restructurings​ to produce more cost-efficient models and overall market uncertainty.

First Solar Inc.

On Tuesday, Tempe, Ariz.-based First Solar reported full-year 2016 and fourth-quarter earnings that surpassed estimates, with adjusted earnings of $1.24 on a per-share basis beating the consensus by $0.24. At first, investors demonstrated confidence in the utility-scale solar leader’s Q4 results, lifting the stock in after hours trading Tuesday. Yet on Wednesday afternoon, First Solar has seen its shares slip an approximate 7.7% to a price of $33.82 per share, as analysts at Credit Suisse downgrade the stock.

The bears point to First Solar’s guidance on project timing as placing pressure on 2017 earnings estimates, along with putting the value of its limited partnership with SunPower, 8Point3 Energy Partners (CAFD) at risk. The $729 million pre-tax restructuring charge posted by the solar leader in Q4 is attributed to its larger restructuring, intended to streamline the production of a more cost-efficient Series 6 solar module, offsetting the major decline in solar prices set to continue into 2017.

SunPower Corp.

Despite posting weaker-than-expected fourth-quarter earnings results last week, San Jose, Calif.-based SunPower Corp. has seen its stock jump 26%, down about 0.9% on Wednesday afternoon at a price of $8.51 per share. Unlike First Solar, which leads in the utility-scale space, SunPower focuses more on residential and commercial solar projects, in which the firm says it holds the No. 2 and No. 1 market position, respectively. While the company struggles to restructure in the utility-scale space, analysts are bullish on SunPower’s strength in the growing residential solar power segment, in which the firm posted 94 megawatts deployed in the most recent quarter, up 13% on a year-over-year (YOY) basis. Optimism has been reinforced by the announcement of SunPower's two new major supply deals.

Overall, solar energy leaders point to strong long-term industry growth prospects, as uncertainty in the U.S. is outweighed by a solid global demand for alternative energy solutions. The firms foresee gradual improvement in oversupply conditions, benefiting from a stabilizing industry less effected by changing government policies. (See also: How First Solar and SunPower Differ.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.