---
title: "Knight Capital’s forty-five minutes"
url: "https://www.mikefluff.com/en/experiments/nw-ch04-knight"
locale: "en"
author: "Mikhail Savchenko (Mike Fluff)"
updated: "2026-11-22"
description: "The Knight Capital trading glitch of 2012"
book: "https://www.mikefluff.com/en/books/nobody-writes-code"
alternates:
  - locale: "en"
    url: "https://www.mikefluff.com/en/experiments/nw-ch04-knight"
    markdown: "https://www.mikefluff.com/en/experiments/nw-ch04-knight.md"
  - locale: "ru"
    url: "https://www.mikefluff.com/ru/experiments/nw-ch04-knight"
    markdown: "https://www.mikefluff.com/ru/experiments/nw-ch04-knight.md"
  - locale: "pt"
    url: "https://www.mikefluff.com/pt/experiments/nw-ch04-knight"
    markdown: "https://www.mikefluff.com/pt/experiments/nw-ch04-knight.md"
  - locale: "es"
    url: "https://www.mikefluff.com/es/experiments/nw-ch04-knight"
    markdown: "https://www.mikefluff.com/es/experiments/nw-ch04-knight.md"
---

# Knight Capital’s forty-five minutes

*The Knight Capital trading glitch of 2012*

On 1 August 2012 Knight Capital installed new trading code. It had to go onto eight servers, and the technician reached seven. The new code reused a switch that had once turned on an old program called Power Peg. On the eighth server the switch woke Power Peg up, and Power Peg no longer had the counter that used to tell it when to stop.

In the experiment you install the code server by server and then open the market at 9:30. Server 8 stays on the old code and the counters start to run. In 45 minutes 212 client orders turn into more than four million orders sent to the market and 397 million shares bought and sold, with a loss of more than 460 million dollars. The totals are from the findings of the US Securities and Exchange Commission. Between them the counters grow evenly to show the scale, because the chapter does not say how the orders went minute by minute.

Then tick the box that compares the eight servers before the open. Knight had no such check. With it, the mismatch on server 8 is found, that server stays off until it has the new code, and the 212 client orders are filled as usual. In 2012 the system was stopped after 45 minutes, and within a year Knight had merged into another firm.

The chapter uses Knight as the most expensive example of one change reaching a part of the system nobody looked at. The code that did the damage was old, forgotten and still installed. Writing the new version was the cheap part of that morning.

_The page has an interactive experiment that runs in a browser: https://www.mikefluff.com/en/experiments/nw-ch04-knight_

## Sources

- [SEC, In the Matter of Knight Capital Americas LLC (2013)](https://www.sec.gov/litigation/admin/2013/34-70694.pdf)

## From the book

Beside it in the book:

> There is not a single stupid decision in this story if you look at each one separately. The new code, by all accounts, was written correctly. Reusing a free switch is ordinary practice. The technician made the kind of mistake all people make. The disaster arose at the joints: between the change of 2005 and the code nobody checked after it, between the new code and the old code someone forgot to delete, between the switch and its previous meaning, between eight servers that were supposed to be identical. Each link looked sound on its own, and together they brought the company down.

- Read the chapter: [Chapter 4. Change One Thing Without Breaking Everything](https://www.mikefluff.com/en/read/nobody-writes-code/ch04) (free; Markdown: https://www.mikefluff.com/en/read/nobody-writes-code/ch04.md)

- Book: [Nobody Writes Code Anymore](https://www.mikefluff.com/en/books/nobody-writes-code)
