Horrible Disaster Stories

Discussion in 'Automated Trading' started by clearinghouse, Nov 14, 2012.

  1. One of my dumbest ones were getting buy and sell orders switched (late night programming), so all my limits filled immediately on the OPG and the opposite trades also hit immediately. Costs me 1000s in less than a second. To top it off, I then got called by the broker months later as "I had been self-dealing (or whatever it was called)" by both selling and buying the same instrument within a very short period of time. I never quite understood the issue and "graciously" offered to undo the trades; which made the compliance officer laugh.

    If you haven't blown a few k on dumb programming mistakes you're not pushing it (or you're smarter than me; which is not hard)!
     
    #11     Nov 14, 2012
  2. 2rosy

    2rosy

    i have had a few development mistakes; not propagated to prod fotunately. I turned off acks in the messaging layer and everything froze. I mixed up order size with price. There was a bug that was never resolved with fpga and mac address lookup speed.
     
    #12     Nov 14, 2012
  3. I've made every dumb mistake possible, but a pretty good one was like TraD mentioned. I armed my limit-buyer system with old quote data.

    And since it was a big down day, a whole bunch of orders triggered in a few secs. Of course they were mostly all losers...

    I'm much more careful now! :D
     
    #13     Nov 14, 2012
  4. The latency might not be on your broker's side but the exchange's. The more messages the exchange is handling at one time the higher the latency will be.
     
    #14     Nov 14, 2012
  5. Another few bugs I've done:

    - One API I used in the past would push the routes available for trading to the program dynamically. Only, there was a bug where one of the routes published which was supposed to be a midpoint route was not really a midpoint route. Thus, whenever I crossed the spread to place a midpoint pegged order, I was getting filled instead. The cycle repeated over and over until I maxed out on my daily loss, and I lost about $50 on 100 share orders until I caught the problem.

    - Another API would send cancel reject messages for events that were not fills. (Sort of rare, at least from most systems I have used.) The order that got cancel rejected wasn't filled, but would remain live out on the exchange and get adversely selected every single time. I lost a few hundred dollars to that also.
     
    #15     Nov 14, 2012
  6. themickey

    themickey

    If you use IB on futures and go from being long to immediately short in one move, IB determine that as two positions and you need enough margin to cover two positions.
    If you go from long to flat to short ( two moves), it is considered you are only trading one position therefore require half as much margin as the first scenario.

    In the first scenario if you don't have enough margin to cover two position, when attempting to go from long to short, due to insufficient margin your position will remain locked in long.

    When I was starting out with IB not that long ago, I got caught with this a few times and lost money. IB customer support took 5 weeks to tell me what the reason was for my frozen trades - this after asking me to check my system for errors a few times due to their own ignorance of how their system worked.
     
    #16     Nov 15, 2012
  7. I've had two (both my fault).

    1. Several years ago I subscribed to a news service. It was somewhat popular and to process orders quicker I've had an email parser that would enter trades based on the recommendation. Once a trade gets filled it would set a flag so it doesn't process that email any more (it would also send a text to my cell). Long story short, something in my code was messed up, the flag never got set and the same trade got executed until the buying power was close to 0. I was in the dentist chair when my phone went wild and received all these messages about a successful trade execution. My wife wasn't home so there wasn't much chance to do anything other than wait and hope it works out. By the time I got home (about an hour later) the trade was a good size winner - got lucky.

    2. Many automated strategies are very particular about entries, so when it comes to testing I often comment these constraints out. One time I forgot to remove my comments and while typically the system finds 2-3 possible candidates a day, this time every other stock symbol looked like a good match. It opened a ton of trades on basically no entry criteria, but the worst part was that the volume selection was also excluded (commented out) so many trades were opened in really illiquid underlyings. I again was receiving many confirmation messages about trades. This time I did not get so lucky and most of them turned out to be big losers.
     
    #17     Nov 15, 2012
  8. You don't have "failsafes".

    You are entirely dependent on a retail broker server...
    Where no one gives a shit about 3 or 30 seconds or whatever...
    Because the average reporting time is, like, 1000 ms...
    Plus you're entirely exposed to being swept in a fast market...
    Because you are not integrated with pro grade market data.

    These are 2 different problems.

    Everybody here is building Automated Systems using inexpensive, retail level tools...
    Systems with typically 1000 ms latency...
    Some securities can be traded this way quite effectively... others can't.
     
    #18     Nov 18, 2012
  9. Remember FB ipo delays took days for some? Lol


     
    #19     Nov 18, 2012
  10. hft_boy

    hft_boy

    Nobody here holds a candle to Knight. "Yeah, I think I'll just multiply everything by one thousand ... "
     
    #20     Nov 20, 2012