BOEING, AN aerospace giant, has been a darling of the American stockmarket. Over the past three years its share price has tripled. In 2017 it was America’s best-performing industrial stock. In 2018 it was the eighth-best. But the crash of a Boeing 737 MAX jetliner in Ethiopia on March 10th—the second crash of this model in just five months—led to the grounding of the aircraft type around the world and wiped nearly a tenth, or around $25bn, off Boeing’s stockmarket capitalisation.

In the past few days the news from Boeing has been getting worse. On April 4th Ethiopia’s transport ministry published a preliminary report from its crash investigators. They said that the pilots followed the procedures recommended by Boeing to prevent the plane from crashing. They suggested the plane’s flight-control system was to blame for the crash, not its crew. This system, including software to ensure the plane does not stall—called the Manoeuvring Characteristics Augmentation System or MCAS—was also seen by Indonesian investigators as contributing to the crash of a Lion Air 737 MAX last October.

Later the same day Boeing’s chief executive, Dennis Muilenburg, admitted for the first time that its software played a role in the crashes and repeated that “we at Boeing are sorry for the lives lost in the recent 737 accidents”. Then it emerged that the software fix Boeing had said would be available last week to allow the planes to take to the air again would be delayed, due to the discovery of a second problem unrelated to the crashes. Some commentators predicted that it may now take many months to fix the planes and get them flying again.

It would be easy to imagine that all this bad news would weigh heavily on Boeing’s share price. In fact it has risen about 2% over the course of the past week. According to Reuters, a news agency, 20 out of 25 analysts who took part in a survey still give the stock a positive “buy” and “outperform” ratings. In part this is because Boeing is seen as “too big to fail”, because of the reliance of America’s Department of Defence on its military aircraft. The 737 programme generates a third of Boeing’s revenues and up to half of its overall profits, according to Andrew Gollan of Berenberg Bank. But some analysts, such as Carter Copeland of Melius Research, think the total financial damage could be as little as $1bn, in which case Boeing’s share price may have fallen too far.

Marc Szepan, a former executive at Lufthansa, now at Oxford University, argues that the company’s executives and its analysts are underestimating the financial risk posed by the crashes. First, airlines have begun to refuse deliveries of new 737 MAX so long as it is grounded. As Boeing gets paid for each one on delivery, this hurts its revenues. And it emerged on April 5th that, as Boeing runs out of space to store all the unwanted planes coming off its assembly lines, the company is planning to slash production rates from 52 a month to 42, instead of increasing it to 57 later this year as originally planned. This suggests that Boeing’s executives think a return to business-as-normal could take longer than they are currently letting on.

But that is not all. Boeing has begun to be hit by lawsuits from the relatives of people who died on the two flights. If the cases turn into a class-action suit, the company could end up on the hook for billions of dollars in punitive damages. Mr Muilenburg’s admission that its software is connected to the crashes is unlikely to help its defence case. And it could be forced to pay compensation to existing users of 737 MAX jets for loss of earnings for the time they are grounded. TUI, a European tour operator, estimates that the grounding could cost it €300m ($337m) if flights on its fleet of 15 737 MAXs do not resume by the end of the summer.

The attraction of Boeing’s shares to many investors is less the result of a careful assessment of the risks associated with the company, and more of its policy of giving away 95% of the cash generated from operations in dividends and share buybacks. “That’s all Wall Street analysts care about,” warns Scott Hamilton of Leeham Company, a consultancy. One investment app favoured by many younger and less sophisticated investors has said that their clients have been piling into the stock since the crash.

But a prolonged grounding of the 737 MAX is likely to slash the amount of cash the company generates, the very thing that has made its shares so attractive to investors in recent years. For the share price, as for the plane itself, the troubles may be far from over.