Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Reminds me of this blunder: trader accidentally switches places for price and quantity and instead of selling 1 contract at ¥610,000 manages to send an order to sell 610,000 contracts at ¥1. Order passes through the GUI, limits checker and several dozen systems like knife through cheese and is placed on the exchange. Exchange happily accepts the order and mayhem is ensured.

If all were executed that would be more than $3B (billions!) loss, heck almost 4 billions. Eventually the company settles for about $300M (millions).

So Knight Capital isn't alone in this "hall of fame" :)

Here's the story: https://www.cbsnews.com/news/stock-trade-typo-costs-firm-225...



I implemented a slippage warning system in a trading GUI I was in charge of after exactly this scenario happened once: a trader switching price and quantity and temporarily cratering a market. It would show a second order confirmation screen if your order was going to fill with high slippage, and it made you type the words "SHOOT ME" into a text field to send the order. After we had built it, it seemed so obvious to have that kind of sanity checking.

It makes even more sense for the matching engine to disallow this on the back end, though.


I worked on a compliance add-on that blocked institutional traders based on rules they set for themselves. All day long was spent fielding their urgent support requests complaining that the rule was wrong. Massive amounts of time were spent finding the market data or computing their account value at the specific time the trade was blocked, 90% of the time arriving at the conclusion that the product worked as intended. I complained that I wasn't getting to code enough, I was told to "code on the train [while riding to work]".

One time, a client wanted a rule to block a trade if the price exceeded the daily high/low. Well, when you define the limit this way, you pretty much can't trade right at the opening because many/most price ticks are the highest/lowest of the day SO FAR, because the day is only a few seconds old! Customer had a meltdown, we traced the market data back, and realized yeah, it worked exactly as designed. sigh


lol @ that story, how would they not anticipate this kind of thing? what an odd request.


On the opposite end, sometimes the traders don’t want that kind of reminder: https://thedailywtf.com/articles/special-delivery

Relevant quote:

> As the senior trader at Æxecor, Brad made it very clear that no one — “not even His Holiness, the Pope” — shall question his trades. After all, Brad makes complex trading decisions that no one else could possibly comprehend.


I believe that Mizuho had a similar check in place. This stock was an IPO so there was no last price to compare against.


According to what I have heard at my former employer that supplied the trading platform to Mizuho, there was indeed a warning, and the user dismissed it. This was relevant when Mizuho tried to recover some of its losses from us.


> there was indeed a warning, and the user dismissed it.

And that’s where effective logging can also shine, confirming that the warning message was triggered and was explicitly dismissed.

The key trick is to know where logging can best CYA, so as to keep it down to a full roar instead of generating gigabytes of noise.


It shouldn't require price history. You just need the order book and you can simulate the execution of any order, and figure out its average price.

If the average price is X basis points worse than the current top of book, that's slippage. So eg if highest bid in book is $100 and you are entering a sell order that would eat so much of the book that it would fill with an average price of $70, that's 30% slippage and probably not what you meant to do.


You need to have a book in the first place though. If the instrument is highly illiquid the spread might be huge and the price have little real world relevance.

For liquid books, yes definitely I would expect these sort of checks (tipically against historical prices) to be in place.


Uh yeah if you don't even have a reasonably liquid order book then yes your price action will suck no matter what lol


What is slippage? Is that a trade scenario or something?





Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: