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

So the spread is 0.0099999 instead of 0.01. When will that difference matter?


It matters if the strategy is designed to do very different things depending on whether or not the offers are locked (when bid == ask, or spread is less than 0.01).

In this example, I’m talking about securities that are priced in whole cents. If you represent prices as floats, then it’s possible that the spread appears to be less (or greater) than 0.01 when it’s actually not, due to the inability of floats to exactly represent most real numbers.


But I'm still not understanding the real-world consequences. What will those be, exactly? Any good examples or case studies to look at?


Many trading strategies operate on very thin margins. Most of the time it's less than one cent per share, often as little as a tenth of a cent per share or less.

A different example: let's say that you're trying to buy some security, and you've determined that the maximum price you can pay and still be profitable is 10.01. If you mistakenly use an order price of 10.00, you'll probably get fewer shares than you wanted, possibly none. If you mistakenly use a price of 10.02, you may end up paying too much and then that trade ends up not being profitable. If you use a price of 10.0199999 (assuming it's even possible to represent such a price via whatever protocol you're using), either your broker or the exchange will likely reject the order for having an invalid price.


I can imagine sth like: if (bid ask blah blah) { send order to buy 10 million of AAPL; }




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

Search: