Shares of FuelCell Energy Inc. shot higher on heavy volume Tuesday, after the fuel cell technology company pleasantly surprised investors by reporting a narrower-than-expected fiscal third-quarter loss, and revenue that rose well above expectations.

The company FCEL, +11.57% reported before the opening bell net losses for the quarter to July 31 that narrowed $12.8 million, or 4 cents a share, from $16.1 million, or 7 cents a share, in the same period a year ago. That beat the FactSet consensus for per-share losses of 5 cents.

That snaps a seven-quarter streak in which the company reported losses that were wider than expected, according to data provided by FactSet. The last time FuelCell beat bottom-line expectations was the second-quarter of 2019.

Revenue rose 43.2% to $26.8 million from $18.7 million, above the FactSet consensus of $21.1 million, boosted by a $7.2 million increase in service agreements and license revenue. That was the biggest revenue beat, in terms of the percent above expectations, in two years, according to FactSet.

As the cost of revenue increased just 17.7% to $25.72 billion from $21.86 billion, gross margin swung to a positive 4.1% from negative 16.7%.

The stock rocketed as much as 34.2% in intraday trading before paring gains to be up 17.7% in midday trading.

Volume spiked to 172.3 million shares, compared with the full-day average of about 17.5 million shares, and enough to make the stock the most actively traded on major U.S. exchanges.

The stock’s rally comes just two sessions after it closed at a 10-month closing low of $5.58 on Sept. 10, which followed an 80.0% plunge from the five-year high $27.96 reached seven months ago.

“The global energy transition continues to accelerate, and we believe FuelCell Energy is positioned to answer these opportunities with our patented portfolio of platform solution,” said Chief Executive Jason Few.

FuelCell’s stock has tumbled 40.8% year to date, but has rocketed 192.6% over the past 12 months. In comparison, the S&P 500 index SPX, -0.70% has gained 18.7% this year, and 31.8% over the past year.