It was one of the wildest years ever to be a merger arbitrage trader, but betting on 2022’s megadeals still turned out to be worth it…just.

Several arbitrage funds, which make — and lose — money based on their traders’ ability to predict the outcomes of dealmaking among public companies, managed to eke out gains this year, despite broader market turmoil that’s left major equities indexes nursing double digit losses. While their profits were modest compared to recent years, it’s a dramatic turnaround from midyear, when many looked poised to follow the benchmarks down.

The Merger Fund, which manages $4.4 billion in assets, is up 0.8 percent this year through Thursday, according to data compiled by Bloomberg. At its lowest point in June, it had slipped more than 3 percent since the start of 2022. BlackRock’s Event Driven Equity Fund, with $8.2 billion of assets, is higher by 0.2 percent, but has bounced back from a similar midyear low. Both are open-ended funds that disclose real-time results and are often used by traders to gauge the health of the strategy.

Anecdotally, other arbitrage traders said their average returns this year were in the low single digits.

Five-year averages for the funds detailed above were around 4 percent, but in a year where the S&P 500 so far has fallen about 18 percent and an index tracking the U.S. bond market has slipped 11 percent, even funds that lost money often did better than more general strategies.

“In a normal environment, it wasn’t a great year, but compared with almost any other asset class, including those traditional haven ones, this performance is not bad,” said Brett Buckley, an event-driven strategist at WallachBeth Capital LLC. “Merger arb funds delivered what they advertise — market neutral returns.”

An unusually volatile dealmaking environment meant merger arbitrage traders needed a higher-than-average tolerance for risk this year. Increased regulatory scrutiny and antitrust enforcement threw major transactions into doubt, fear of buyer’s remorse stalked deals as valuations plummeted, and a dearth of M&A in general left funds more exposed to a smaller pool of situations.

While betting on merger outcomes is rarely predictable, arbs are used to most deals following a similar trading pattern. A target’s stock shoots upward once a deal is leaked or announced, but usually stays below the offer price unless a counterbid is expected. That gap — or spread — narrows as the transaction moves toward closing, a process that can take anywhere from a couple of months to well over a year.

Those rules were thrown out the window in 2022. In the most high-profile deal of the year, Twitter Inc., arbs endured a months-long roller-coaster ride in the stock as Elon Musk tried to back out of the takeover. But the reward was huge for those traders that stuck around: Twitter’s shares fell roughly 40 percent below the offer at one point, providing huge upside to anyone betting the deal would close.

Meanwhile a string of leveraged buyouts, from Tenneco Inc. to Citrix Systems Inc., saw their spreads blow up before eventually making it to closing, as banks struggled to offload the debt they’d financed for the deals.

Antitrust regulators also delivered a slew of enforcement actions. The Federal Trade Commission challenged Lockheed Martin Corp.’s purchase of Aerojet Rocketdyne Holdings Inc., while the Justice Department sued to block UnitedHealth Group Inc’s acquisition of Change Healthcare Inc. Only the UnitedHealth-Change deal ultimately made it, and not every arbitrage fund was able to weather the volatility.

“Even if a deal ultimately closes, some investors might have to sell or trim positions as the deal progresses if the spread widens materially and downside risk or probability of closing changes,” said Frederic Boucher at Susquehanna International Group. “The volatility has been hard to stomach.”

East53 Capital, a merger arbitrage-focused strategy at Izzy Englander’s mega hedge fund Millennium Management, shuttered in July after its bets on M&A involving companies such as Twitter performed poorly.

The average arb spread in the U.S. — the gap between the deal price and the share price — rose from 9 percent annualized at the start of the year to 18 percent at one point in July. In recent weeks, the average spread has stabilized at around 12 percent, according to data from Alpharank.com.

Going into 2023, all eyes are on Microsoft Corp.’s $69 billion acquisition of Activision Blizzard Inc., which the FTC has sought to block. Other competition regulators, including in the U.K. and European Union, have also raised concerns. While the videogame company’s shares are trading around 20 percent below the offer price, Activision is still generating analyst buzz even if it stays as a standalone company. That risk-reward profile makes it a compelling bet for arbs.

“Activision has replaced Twitter as the deal du jour that everybody is interested in,” said Roy Behren, co-chief investment officer at Westchester Capital Management. The ultimate outcome will serve as a key clue for dealmakers and investors assessing the regulatory landscape for big tech M&A going forward, he said.

Above all, what arbs really want next year is more deals to trade. A flurry of transactions this week added about $34 billion of M&A involving U.S. public-traded targets, bringing the total number of deals worth more than $500 million to 132 as 2022 draws to close. That’s still down from the 187 transactions that arbs were likely to wager on last year, according to data compiled by Bloomberg.

“The focus will be antitrust. Spreads right now, and particularly in deals with second requests, are very wide,” said Neetu Jhamb, an event-driven focused portfolio manager at Versor Investments. “The embedded returns in a portfolio holding all these deals is very attractive if they all close.”