Trading incident

ishaanbhatia31
Hello! I have been doing Algo trading on Zerodha since the past 6 months. On may 14th 2024, we experienced a glitch in the system. The trader executed the same strategy but the executed trades were far away from the coded strategy. It resulted in 152 trades being executed between 9:20 and 9:25 am which resulted in nearly Rs 30,000 loss and another Rs 22,000 in transaction charges. The team was efficient in closing the strategy and squaring off the trades quickly.

We have checked and rechecked our codes to find why this happened. However, everything in the code is right and has been working since then (we continued trading the next day - May 15th, 16th and 17th). At this point, we believe the error was at broker's end.

We kindly ask if any one has experienced such a phenomena before. We are still in testing mode and fortunately did not have a bigger corpus invested. It will be good to know what happened and find ways to mitigate the risk in the future. Happy to share more information.

Thank you for the assistance.
  • seth
    You need to have the proper error handling logic built into your code. I write trading bots for a living and 80% of my time goes in writing code for error handling.

    And you aren't really explaining what the error was. Have you matched the executed orders with the tickdata? Is it the slippage that is unusual or the number of orders? Slippage can be caused by outdated market data. Too many orders often happens because of infinite loop in your code.
  • sujith
    For order related issues, it better to keep the debug level logs of pykiteconnect or any other client library logs which contains request and response json and report it on the same day for investigation.
    The order history gets wiped out after BOD. Hence it is better to report the same day and follow up.
  • sujith
    We haven't come across a case like this.
Sign In or Register to comment.