Shares of renewable energy company Bloom Energy (BE 10.99%) gained 16.9% through 11 a.m. ET Thursday after reporting a surprise quarterly profit Wednesday evening.

Heading into Q3 2023, analysts had forecast Bloom Energy would lose $0.04 per share, adjusted for one-time items, on sales of $369.6 million. In fact, Bloom earned a $0.15 per share profit, and its sales beat expectations as well -- $400.3 million.

Bloom Energy sales and earnings

Bloom's sales surged 37% year over year, setting a new record for quarterly revenue for the hydrogen power company, and that alone probably would have been enough to excite investors this morning. The fact that Bloom earned a profit when investors were expecting a loss, however, just added fuel (presumably, hydrogen fuel) to the fire.

And yet...did Bloom Energy really earn a profit?

Granted, CEO Greg Cameron boasted that his company achieved "record third quarter revenues with expanding margins." However, the company's $0.15 per share in earnings was a non-GAAP (generally accepted accounting principles) figure. When valued under GAAP accounting rules, it turns out that Bloom didn't earn even a gross profit for the quarter, reporting instead a negative 1.3% gross profit margin in Q3 2023 -- significantly worse than last year. Furthermore, the company's operating losses roughly doubled year over year from $52.6 million in Q3 2022 to $103.7 million this time around.

Is Bloom Energy stock a buy?

Far from earning a profit, on the bottom line, it turns out that Bloom lost $0.80, GAAP, per share in Q3 -- a loss 150% bigger than it suffered last year. And I must say it's hard to recommend buying a stock with news like that.

On the plus side, Bloom's GAAP losses year to date are only $1.47 per share, only a little worse than last year's $1.41 per share loss through the end of Q3. On the other hand, though, it's still some worse of a loss -- and not even a little bit better.

Long story short, despite growing revenues strongly and despite promising investors that it will end this year with sales of $1.4 billion to $1.5 billion, with a positive non-GAAP operating margin, Bloom, in the final analysis, remains a cash-burning, money-losing renewable energy stock.

Until that changes, I can't recommend buying it.