New York: The amount of money leaving hedge funds slowed in the second quarter as firms that rely on computer algorithms made money in the sell-off following the UK’s vote to exit the European Union.

The industry saw $8.2 billion in net outflows in the second quarter, about 46 per cent less than in the prior three months, Hedge Fund Research Inc. said Wednesday in a report.

Global hedge fund assets rose by $42.1 billion in the second quarter to nearly $2.9 trillion, the third-highest quarterly total on record. Asset growth was the strongest since the first quarter of 2015, boosted by a 2 per cent return for the HFRI Fund Weighted Composite Index.

The asset increase “was driven by strong quantitative CTA gains on Brexit Friday and broad-based industry-wide gains across equity, commodity and currency markets pursuant to the Brexit dislocations,” HFR President Kenneth Heinz said in the report, referring to commodity trading advisers.

Quant funds proved themselves better at managing the mayhem in the wake of the UK’s vote, which saw trillions of dollars wiped away from equity markets. Such funds rely on mathematical models to decide when and which securities to buy and sell.

Jim Simons’s Renaissance Technologies, which oversees $32 billion, saw its quantitative equity hedge fund gain 4.6 per cent in June and nearly 14 per cent in the first half of the year. P/E Investments’s quant currency fund surged 6.4 per cent the day after the Brexit vote, mostly from betting against the euro. Lynx Asset Management posted a 5.1 per cent gain that same day in one of its funds.