Knight Capital Failure Due to Development Bug
Learn how a trading firm lost $440 million in 45 minutes due to a software bug.
We'll cover the following
On 1st August 2012, a trading firm that goes by the name of Knight Capital lost $440 million due to what they refer to as a "trading glitch." The example of Knight Capital is of particular interest because it took the company 17 years of hard work to build itself, but it went almost bankrupt in roughly 45 minutes. A simple software update caused Knight Capital to lose
Knight Capital had a rich API providing a variety of trading functionalities to its users. Unfortunately for Knight, it didn't last because of a major developmental bug. Let's see how this failure was caused by an update in the trading algorithm of Knight Capital.
How did it happen?
This section details the sequence of events that caused the failure:
Knight's software development team wanted to update their trading execution system called Smart Market Access Routing System (SMARS) within a short span of one month to complete the development cycle.
The development team had to deploy the updated trading algorithm to eight production servers containing outdated
from as far back as 2003. The dead test code was called Power Peg. It was previously used for quality assurance (QA) purposes, and it required a flag to be activated. Knight repurposed the activation flag used for Power Peg to execute the SMARS updated code.dead test code A dead code refers to a piece of code that is no longer executed. Even if it is executed, it has no effect on the overall behavior of the application. The deployment team forgot to update the trading algorithm in one of the eight production servers. At the same time, the repurposed flag was activated for all production servers.
This resulted in activating the flag for the execution of Power Peg on one of the eight production servers. Power Peg was a test code that placed orders that bought stocks for higher prices and sold them for lower prices. This caused disastrous losses for the trading firm.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.