Optimizing the slippage

Discussion in 'Automated Trading' started by BlackPhoenix, Dec 3, 2023.

  1. Hi,

    I'm developing an algo day trading platform (only US stocks for now, so mainly NYSE/NASDAQ) using IB TWS API and would like to optimize the slippage. Based on my testing the slippage can have quite a large negative impact on P&L, particularly for trades early in the day in volatile markets. I have identified couple of factors contributing to the slippage:
    1) The delay in getting the price data. AFAIK, IB aggregates ~250ms worth of price data before passing to clients via the API. There's also the internet latency and the price data feed seems quite sporadic.
    2) Submitting the order and getting filled (internet latency home=>IB=>exchange, and delays by IB servers processing the order before passing to an exchange)

    I'm currently running the trade app at home but would it make any notable difference to run it closer to the exchange/IB servers on VPS? AFAIK IB doesn't offer services to run trading apps on their servers to minimize the latency. Is there ways to get more immediate price data without IB being the "middle man" and introducing delays? I also currently submit odd lot sizes and market orders (for execution speed), but would it make a difference for filling to submit whole lots instead? Or using different order types?

    Any tips or tricks, particularly if backed by first hand experience would be appreciated, thanks!