TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The $440M software error at Knight Capital (2019)

294 pointsby bfmabout 3 years ago

26 comments

bfmabout 3 years ago
The OP details how poor software engineering practices brought down a 1.4B market marker with 1400 employees in 2012.<p>Some of the issues mentioned include:<p><pre><code> - Keeping synthetic test data generation as part of a production build. - Keeping dead code for years. - Re-purposing a feature flag. - Refactoring without regression tests. - Manual deployments without peer reviews. They forgot to update one of their servers with the new code. - Automated alerts sent via email were ignored. - Rolled back to a version of the code running on the server they forgot to update, making things worse. - Rushing out a release without proper software engineering hygiene. </code></pre> The article suggests improvements that could have prevented the chain of events.<p>For those here who are in HFT circles, have things improved after the Knight Capital Group debacle?<p>edit: formatting
评论 #31240238 未加载
评论 #31240731 未加载
评论 #31240334 未加载
评论 #31241433 未加载
评论 #31239963 未加载
评论 #31239515 未加载
评论 #31241440 未加载
评论 #31244206 未加载
评论 #31240502 未加载
评论 #31240586 未加载
评论 #31243194 未加载
throwyawayyyyabout 3 years ago
Random, but I interviewed at Knight Capital for a software engineering position a few weeks before this all went down. I was in London, so the interview was done over the phone. Picture me in the evening, handwriting C to solve some problem (the fog of time too thick to remember what that problem was), then reading out what I&#x27;d written, semicolons and all, to the interviewer. Because of course there was no shared doc. I did very badly. But then, so did they.
评论 #31241998 未加载
评论 #31244803 未加载
评论 #31241710 未加载
评论 #31243127 未加载
评论 #31243131 未加载
评论 #31245844 未加载
评论 #31242639 未加载
评论 #31242685 未加载
gzer0about 3 years ago
<i>The incident happened after a technician forgot to copy the new Retail Liquidity Program (RLP) code to one of the eight SMARS computer servers, which was Knight&#x27;s automated routing system for equity orders. RLP code repurposed a flag that was formerly used to activate an old function known as &#x27;Power Peg&#x27;. Power Peg was designed to move stock prices higher and lower in order to verify the behavior of trading algorithms in a controlled environment. Therefore, orders sent with the repurposed flag to the eighth server triggered the defective Power Peg code still present on that server</i> [1]<p>&gt; Power Peg was designed to move stock prices higher and lower in order to verify the behavior of trading algorithms in a controlled environment.<p>This is insane. Make one wonder, what <i>is</i> or <i>isn&#x27;t</i> actually being deployed in prod in 2022.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Knight_Capital_Group#2012_stock_trading_disruption" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Knight_Capital_Group#2012_stoc...</a>
评论 #31240377 未加载
评论 #31242642 未加载
randomhodler84about 3 years ago
Back in the day $440M loss due to coding error was a landmark warning case. How could this happen??<p>In 2021 alone something like $10B was lost due to bugs in defi land.<p>Something about the worst possible thing could happen tends to happen eventually and it gets worse every passing year.
评论 #31240511 未加载
评论 #31240493 未加载
评论 #31240287 未加载
dangabout 3 years ago
Related:<p><i>Knight Capital Says Trading Glitch Cost It $440 Million</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4329101" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4329101</a> - Aug 2012 (90 comments)
anonuabout 3 years ago
Original Post-Mortem: <a href="https:&#x2F;&#x2F;www.sec.gov&#x2F;litigation&#x2F;admin&#x2F;2013&#x2F;34-70694.pdf" rel="nofollow">https:&#x2F;&#x2F;www.sec.gov&#x2F;litigation&#x2F;admin&#x2F;2013&#x2F;34-70694.pdf</a>
anonuabout 3 years ago
My small footnote to this story: we had the look on the &quot;blind bid&quot; to purchase the portfolio of erroneous trades on the program trading desk I worked on. Ultimately we didn&#x27;t bid (thank you risk department) and it traded away to Goldman as the article correctly reports. Would&#x27;ve been a great trade though. I estimated it netted Goldman $2m+
toddmabout 3 years ago
Important to add that this occurred in August 2012 and not in 2019 as the title implies.<p>I had interviewed there in my garden year (2010-2011) and was ultimately not considered for a role as a high-frequency quant.
评论 #31242930 未加载
inter_netuserabout 3 years ago
Peanuts, just a regular day in DeFi.<p><a href="https:&#x2F;&#x2F;rekt.news" rel="nofollow">https:&#x2F;&#x2F;rekt.news</a>
jmyeetabout 3 years ago
What&#x27;s amazing to me is that there are many software engineers here who can recognize how errors like this can so easily creep into software (some would say they&#x27;re inevitable in any sufficiently complex software) but they still somehow think immutable smart contracts on blockchains are somehow still the future.<p>Crazy.
评论 #31246073 未加载
jspawabout 3 years ago
Hindsight is a helluva drug. The SEC report cannot be viewed as a “postmortem.”<p><a href="https:&#x2F;&#x2F;www.kitchensoap.com&#x2F;2013&#x2F;10&#x2F;29&#x2F;counterfactuals-knight-capital&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.kitchensoap.com&#x2F;2013&#x2F;10&#x2F;29&#x2F;counterfactuals-knigh...</a>
bovermyerabout 3 years ago
Interesting. Five years prior, this story was posted on this blog: <a href="https:&#x2F;&#x2F;dougseven.com&#x2F;2014&#x2F;04&#x2F;17&#x2F;knightmare-a-devops-cautionary-tale&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dougseven.com&#x2F;2014&#x2F;04&#x2F;17&#x2F;knightmare-a-devops-caution...</a>
photochemsynabout 3 years ago
Really good write-up. Perhaps there&#x27;s a dawning realization that the model of &#x27;move fast and break things&#x27; is fatally flawed?<p>&gt; &quot;Knight’s IT project managers and CIO should have pushed back on the hyper-aggressive delivery schedule... Thirty days to implement, test, and deploy major changes to an algorithmic trading system that is used to make markets daily worth billions of dollars is impulsive, naive, and reckless.&quot;<p>The fact that <i>since 2008, the portion of all stock trades in the U.S. taking place away from public markets has risen from 15 percent to more than 40 percent</i> is also kind of astonishing. It&#x27;s long past time to re-erect the walls between commercial and investment banking.
user3939382about 3 years ago
Here’s a 225 million dollar oopsie from 2005 <a href="https:&#x2F;&#x2F;www.foxnews.com&#x2F;story&#x2F;typing-error-causes-225m-loss-at-tokyo-stock-exchange" rel="nofollow">https:&#x2F;&#x2F;www.foxnews.com&#x2F;story&#x2F;typing-error-causes-225m-loss-...</a>
评论 #31241007 未加载
评论 #31242196 未加载
linuxhanslabout 3 years ago
&gt; However, a dark cloud remains: market data suggests that 70 percent of U.S. equity trading is now executed by high-frequency trading firms<p>Is it just me, or was this one of the scarier statements in the article? High frequency trading does not seem to add anything, it&#x27;s not a market instrument to balance anything. It&#x27;s more like gambling with the odds slightly in your favor.<p>Oh course, I&#x27;m a laymen when it comes to high frequency trading and might totally wrong.
评论 #31245193 未加载
blobbersabout 3 years ago
My experience in quant finance is that strong engineering teams are viewed as cost centers and are not well compensated the way they are at “real” tech companies, especially when the firm isn’t doing well. Management foolishly tends to only value seeking alpha, rather than reliability of existing alpha.<p>Unsurprisingly poor management tends not to realize when their software is built on a house of cards.<p>Definitely saw bugs cause large losses (8 digit numbers).
评论 #31245227 未加载
sonicgggabout 3 years ago
My brother worked in a medium-sized fintech not long ago. This example is shown in their onboarding process. I guess the same goes for other companies out there.
rewsifferabout 3 years ago
Wow, I just started a new position at a tech company in the NYC financial sector, and this was part of today’s training!
eek2121about 3 years ago
Fascinating read. I love code horror stories such as this.
alchemist1e9about 3 years ago
There are several more of these of approximately the same order of magnitude but those firms are able to keep it successfully out of the media.
评论 #31243566 未加载
jll29about 3 years ago
Excellent report of a fault case study.<p>Yes, check lists help, not just in medicine, but also in aviation. But automating things is of course the best option.
NovemberWhiskeyabout 3 years ago
(2019)
评论 #31240359 未加载
robofanaticabout 3 years ago
at the end .. its just money going from one account to another right? Its not like some physical thing that has perished and cant be brought back. Why is it difficult to reverse the transactions?
评论 #31240679 未加载
评论 #31240957 未加载
评论 #31243509 未加载
paulpauperabout 3 years ago
sorta like a precursor to a smart contract hack
Terry_Rollabout 3 years ago
I read this<p>&gt;Under stock exchange rules, Knight would have been required to pay for those shares three days later. However, there was no way it could pay, since the trades were unintentional and had no source of funds behind them. The only alternatives were to try to have the trades canceled, or to sell the newly acquired shares the same day.<p>And then I understand why &#x2F;r&#x2F;WallStreeBets and &#x2F;r&#x2F;Antiwork is gaining traction.<p>All it takes is a bit of organisation and the adoption of Govt tactics and practices which is ultimately violence and then just maybe you might see a Govt that works for the people and not the criminals, but I cant picture Bernie Sanders wielding a pitchfork!<p>Still I see Musk was market making with his tweet. I dont think you can be any more blatant! LOL <a href="https:&#x2F;&#x2F;twitter.com&#x2F;elonmusk&#x2F;status&#x2F;1520650036865949696?cxt=HHwWgICjsdvJt5oqAAAA" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;elonmusk&#x2F;status&#x2F;1520650036865949696?cxt=...</a>
faangiqabout 3 years ago
No lessons have been learned. There is no catharsis. This blog post has meant nothing.