Software & Markets

When One Bug Moved the Market

In 2012, a bad software release sent millions of unintended stock orders into the market. Other machines reacted before people could understand what was happening.

On 1 August 2012, Knight Capital was preparing to use a new New York Stock Exchange programme. Its order-routing software had to be updated. The release did not reach one of eight production servers, and nobody performed the second-person check that could have caught it.

That one server still contained an old feature called Power Peg. The new release reused a flag that was supposed to activate new behaviour. On the untouched server, the flag woke up the old code instead. It kept sending orders even after the original customer order had already been filled.

An editorial illustration of one faulty server sending a flood of orange orders into an electronic stock market as other automated systems respond.
In an automated market, a bad order can meet a fast response before a human sees the alert.

For 45 minutes after the market opened, Knight’s router sent more than four million orders while trying to handle only 212 customer orders. The market did exactly what markets are built to do: other trading systems saw prices and available shares, then bought or sold against Knight’s unwanted orders. They were not “attacking” Knight. They were following their own rules at machine speed.

Knight accumulated huge positions it never wanted. By the time the firm stopped the system, it had traded more than 397 million shares and had lost more than $460 million. The company needed emergency funding a few days later, and the incident badly damaged confidence in it.

The lesson is not that fast trading is magic or evil. It is that production software needs barriers before it reaches the real world: tested deployments, independent checks, meaningful alerts, and a fast way to stop a runaway system. In some systems, a single broken release does not wait for a second chance.

Knight survived the day, but it did not return to its old shape. It raised emergency money, then combined with GETCO in 2013 to form KCG Holdings. In 2017, Virtu Financial bought KCG. The name Knight Capital disappeared, but its failure remains one of software engineering’s clearest warnings.

Sources

SEC: Charges against Knight Capital → SEC order: findings on the 1 August 2012 incident →