Latency in Trading- Meaning and Measurement - AlgoJi

Latency in trading (algo or manual) can be calculated as the time taken from signal trigger to trade confirmation.

Types of Latency in Trading

Transmission Latency– is very less and depends on the Internet Provider. A normal retail trader can safely ignore it. It is the time taken to convert a message to bits for transmitting over router.

Propogation Latency– Depends upon internet and could be the biggest threat. To test propagation latency through ping test, read Trading Terminal Disconnection and Latency

Processing Latency– The time taken by software for calculations on strategy logic. It can be significant for poorly programmed strategies or computer poor hardware.

Latency for Chart Based Trading

The latency for taking initial buy/sell can be summed up in following steps:

  1. Data update (last tick) in charting platform (Propogation Latency)
  2. Time taken by script (such as AFL/VB) to do calculations and generate trigger (Processing Latency)
  3. Time taken for passing trigger from charting platform to trading terminal (Processing Latency)
  4. Time taken by trading terminal to process order (Processing Latency)
  5. Time taken by trading terminal to send order to exchange (Propogation Latency)
  6. Time taken by trading terminal to update order status (such as pending or filled) (Propogation Latency)

Latency for Discretionary/Manual Trading

  1. Time taken to fill up order parameters and confirm (Processing Latency)
  2. Time taken by trading terminal to send order to exchange (Propogation Latency)
  3. Time taken by trading terminal to update order status (such as pending or filled) (Propogation Latency)

Latency in Server Based Execution for Exiting Trade

In many conditions, such as square-off on profit target or stoploss, the trade exit may be executed by broker’s server. This can be extremely helpful because such execution saves money from slippage. As an example, say you have setup SL of 8000 in your charting platform. It may take 1-2 seconds of latency to complete the trade, and during this time the market may have already moved by 3-4 points. If the lot size is 75, this will translate to losing Rs. 225 per trade. On the other hand, say if the broker’s server executes sell order when the bid drops to 8000, it may just be able to exit your trade at desired price. Hence execution at the side of broker server can drastically reduce latency as well as slippage.

Use of Co-location

Submitting an order to the exchange faster than other traders creates an opportunity to maximize profit or minimize loss. The shorter the distance from exchange server, the shorter will be the amount of time to submit the order.

Colocation is the practice of running your strategy at exchange’s server to minimize distance. Hence it minimizes latency with greater bandwidth and host of other professional advantages.

The NSE server rack is available at annual cost starting at Rs. 6 lacs. The detailed specs can be found here: https://www.nseindia.com/membership/content/connectivity.htm

nsebse colo

HFT programs try to exploit short-term alpha which lasts in prices from nano seconds to few milliseconds. The slightest latency for HFT is the difference between profit and loss. HFTs these days account for more than 60% of overall market volume!

Latency at World’s Fastest Exchanges

  • NYSE Technologies Universal Trading Platform: 3 milliseconds for data, 2 milliseconds for order and cancel acknowledgements
  • LSE: 10 microseconds
  • BATS: 400 microseconds
  • Nasdaq: 250 microseconds