The amazing story of the last day for South Korean trading firm Hanmac made for case study material in the first morning of the WFEClear conference. Quick tip: when setting an algorithm to trigger your trades automatically, don’t divide by zero.

Our coverage of WFEClear 2025 is gathered here.

The direct cause was spectacular, of course. A staff member tasked with programming the trading algorithm should set a certain remainder to be divided with 365, but set that number instead to zero. As your school maths could have informed you, anything divided by zero is infinate. For Hanmac, it triggered 39,000 loss-making trades in 2 minutes and 23 seconds, and a default leaving losses in the region of 40 million dollars to be carried by the nation’s CCP and its members. A foreign fund picked up 90-something percent of the profits and refused to pay them back. 

On stage in Seoul on Tuesday morning, Sang Uk Park, Executive Director at the derivatives market division of the Korea Exchange, told the details of the story. With a broader view, the background was not as simple as just fat fingers. 

Not only was Hanmac one of the few participants lacking an automated “kill switch” for unreasonable situations. The incident happened against a background of tough times, and capital impairment at the firm, where event high management were encouraging trading staff to maximise profit at the expense of risk policy compliance. 

Still, Sang Uk Park’s analysis did not stop even at that. He pointed to a long list of aspects where the clearinghouse itself has since developed more mature risk management. Margining calculations at the time were relatively rough-handed by today’s standards, without due distinction between securities transactions and derivatives contracts. The construction of the “waterfall”, the order in which different stakeholders around the CCP take their hits in covering for losses, has been revised, too. In setting up the protective frameworks, setting the right incentives for trading participants is key. But, Sank Uk Park pointed out – even CCPs themselves can be exposed to misguiding incentives. Managing counterparty risk takes a look at the whole system.