A number of quantitative hedge funds in China were hit severely on Friday as the nation’s equities staged their biggest rally in years, according to people familiar with the matter.

Some firms suffered heavy losses because they shorted index futures for their so-called Direct Market Access strategies, said the people, asking not to be identified discussing a private matter. Some saw their losses exacerbated by a Shanghai Stock Exchange glitch that left them unable to sell holdings to meet margin requirements, another person said.

The losses come as many quants are still recovering from record drawdowns suffered during China’s stock market meltdown in February, when their favored small-cap stocks crashed, prompting regulators to push for the DMA products to be phased out. Now they have been caught wrongfooted again after China’s latest economic stimulus measures sparked the biggest weekly equity rally since 2008.

“The losses on market-neutral products should be industrywide today, while some DMAs could have been forced to liquidate,” said Li Minghong, founding partner of Shanghai Jiutouxiang Financial Information Services.

Still, Friday’s drawdowns in the DMA products were smaller than the losses seen in February, and any forced liquidations should be rare, said the people. Some brokerages have agreed to extend deadlines for the quant clients to add margins for bets on index futures, they said.

The DMA strategy typically uses high leverage and involves holding long positions in individual stocks while shorting stock index futures. A surge in index futures on Friday exceeded gains in stocks, switching a persistent discount to a premium and imposing losses on market-neutral products’ positions, Li said.

The glitch in the Shanghai exchange may also have impeded efforts to add positions in the rising stocks, he added.

Li said that the impact on market liquidity should be minimal given the reduced size of such products, while quants’ other strategies like long-only index-enhanced products are benefiting from the rally.

This article was provided by Bloomberg News.