Trading Bots blog

Case study

Knight Capital and the router that missed completed orders

The SEC's account of the August 2012 incident shows why order routing needs a reliable view of completed work.

What happened at market open

On August 1, 2012, some orders arriving at Knight Capital's automated equity router triggered an old, defective function after a software deployment. The SEC found that the router failed to recognise when those orders had been filled. In the first 45 minutes of the trading day, it sent more than four million orders while attempting to fill 212 customer orders.

What investigators found

The SEC's 2013 account identified inadequate checks immediately before orders were submitted to the market. In particular, the agency highlighted the absence of an adequate comparison between orders entering the router and orders leaving it. The two counts described fundamentally different activity. Measuring each side would have exposed a growing discrepancy between the work customers requested and the messages the router generated.

A lesson for a paper-trading test

In a simulator, attach each outgoing order to the input instruction that generated it. Feed in a completed instruction twice and check that the second pass produces zero additional submissions. Exercise partial fills as a separate case. Capture the quantities requested, submitted and filled so a reviewer can explain each difference. An unexpected outgoing message should end the test and preserve the event history for inspection.

Sources

All articles and case studies Describe your bot