For the second quarter in a row, American Superconductor (AMSC -4.85%) (doing business as AMSC), wowed investors with its earnings report Wednesday afternoon, beating on earnings and raising guidance. On Thursday, its stock rose 22.8% through 10:40 a.m. ET.

Heading into its fiscal fourth quarter of 2023, analysts forecast this specialist in interconnecting renewable power sources with electrical systems would lose $0.02 per share on sales of only $37.1 million. AMSC actually earned a $0.05 per share profit (well, sort of), and its $42 million in sales eclipsed analyst predictions.

AMSC Q1 earnings

Not all the news was good. It turns out that the $0.05-per-share "profit" that excited analysts today was only a pro forma number. When calculated according to generally accepted accounting principles (GAAP), AMSC actually lost $0.05 per share. Despite that quibble, however, AMSC's Q4 improvement was undeniable.

AMSC posted 32.5% sales growth in the final quarter of its fiscal 2024, with grid revenue rising 21% and wind revenue more than doubling. Yet cost of goods sold grew only 13%, and operating costs were up only 19%, both numbers much lower than the revenue growth.

As a result, gross profits more than doubled, operating losses declined by roughly two-thirds, and net losses slimmed by 80%, to the aforementioned $0.05 per share.

Is AMSC stock a buy?

All that being said, AMSC still ended fiscal 2024 with a loss -- just $0.37 per share, versus fiscal 2023's $1.26 per share loss, but still a loss. The company also forecast continued losses, and a sequential decline in sales, in fiscal Q1 2024. Management sees sales ranging from $38 million to $42 million this coming quarter, with another $0.05-per-share loss.

That being said, losing $0.05 on $40 million (the midpoint of revenue guidance), instead of losing $0.05 on $42 million (Q4 2023 revenue) speaks to continued improvement in profit margins. AMSC stock may not be a buy yet, but at least it's moving in the right direction.