NexusFi: Find Your Edge


Home Menu

 





How to measure data feed latencies between continents?


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one Koepisch with 22 posts (5 thanks)
    2. looks_two Big Mike with 18 posts (6 thanks)
    3. looks_3 artemiso with 11 posts (1 thanks)
    4. looks_4 gomi with 7 posts (21 thanks)
      Best Posters
    1. looks_one gomi with 3 thanks per post
    2. looks_two Fat Tails with 3 thanks per post
    3. looks_3 Big Mike with 0.3 thanks per post
    4. looks_4 Koepisch with 0.2 thanks per post
    1. trending_up 27,973 views
    2. thumb_up 48 thanks given
    3. group 8 followers
    1. forum 66 posts
    2. attach_file 15 attachments




 
Search this Thread

How to measure data feed latencies between continents?

  #21 (permalink)
 Koepisch 
@ Germany
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: FDAX
Posts: 569 since Nov 2011
Thanks Given: 440
Thanks Received: 518

Big thanks at all of your input and i will look into the links provided. BigMike Comment No. 1 is also my understanding. Only 2 timestamps are important , first exchange time (is settled) second my local time. I can't believe that any clock Provider in the world differs in terms of seconds. If i utilize the nearest NTP Server (Radio controlled via USB is an promising Option) i have my local time. The delta time (transmission time is of course part of the overall lag) is easy to measure.

It's clear that i have to measure with my LIVE trading feed (continuum), but due to the lack of NT capabilities this isn't possible. The ping approach doesn't look reliable (TCP vs. UDP, Priority) - but without a comparision we don't know, all guessing.

The only valid test setup seems to be the R|API solution, because it's an low latency feed and i can get the exchange time stamps. Furthermore i need only a local time reference and some R|API programming. But this takes a while because i haven't a rithmic broker yet and i have to join the R|API development program. To test the VPS part is deleted from my list, because i don't assume a big lag.

It's important to understand that i only want to measure the lag to my european machine, because there is the supervisior instance to my running systems on the VPS's in the US. I have a certain amount of tolerable lag, but if the lag is too high then the trading will be blocked. Sadly i can't program all of my discretionary parts into my strategy, so i have to control my running strategies on the VPS (execution) from europe (Supervisor) . Controlling means NOT to enter trades immediately but rather SAY the strategy ENABLE auto entry detection NOW. Then the strategy is in control and searches for entry conditions usually for the next 0-60 seconds and enters per market or stop orders. It will disable himself when the setup is not occuring or an "quitting" pattern occur.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
Battlestations: Show us your trading desks!
26 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
  #22 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534

Ping is good enough based on my understanding of your requirements.

Say ping shows 150ms to your broker, it is extremely unlikely this would vary more than +/- 10% or so from a proper test using exchange timestamps.

Sent from my LG Optimus G Pro

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #23 (permalink)
 Koepisch 
@ Germany
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: FDAX
Posts: 569 since Nov 2011
Thanks Given: 440
Thanks Received: 518



Big Mike View Post
Ping is good enough based on my understanding of your requirements.

Say ping shows 150ms to your broker, it is extremely unlikely this would vary more than +/- 10% or so from a proper test using exchange timestamps.

Sent from my LG Optimus G Pro

In fact +/- 10% isn't an issue and would not justify the efforts for doing it otherwise. For other reasons i wanted to switch to R|API too, so i can antedate this and make my measuring. Then the most interesting part is to compare the results with the ping results. If the costs for an usb radio clock isn't too high i will buy one (Spec: Accuracy < +/-5 ms to UTC).

For me the question is answered and i got a broad input from you guys, thanks! It's not that easy for an semi-descretionary trader trading from europe. If anybody has made some reliable statistics, here is the place to drop it.

Koepisch

Started this thread Reply With Quote
  #24 (permalink)
 Koepisch 
@ Germany
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: FDAX
Posts: 569 since Nov 2011
Thanks Given: 440
Thanks Received: 518


Big Mike View Post

Thanks, excellent document! Well designed system.

Started this thread Reply With Quote
  #25 (permalink)
 artemiso 
New York, NY
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,685


Koepisch View Post
I don't want to play games - i won't make manual trading faster and simpler. MS + Sony designed controller to offer excellent game control, vendors like KeybordTrader designed keyboards for traders. There is no intersection between both requirements. Keyboard hardware design is a no brainer. Use a controller (atmel) with ready to use usb stack, design YOUR PCB + integrate it in YOUR trading solution, thats it.

I see. I think that the typical game console controller is more ergonomic than a keyboard, but I could be mistaken. I had friends at (if I recall correctly) SIG that spent their time tuning Playstation controllers for trading over 10 years ago and I think they have over 1400 employees today. An Xbox controller has about 9 milliseconds between button press and hitting the interface controller (several pieces were designed at Harvard, which is still the leader in tactile technologies, before Microsoft acquired them). Your ordinary USB keyboard probably has a 20 ms debouncing latency followed by 0.5-8 milliseconds of polling latency on the USB bus.

Reply With Quote
  #26 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Big Mike View Post
I am not one to usually disagree with @Fat Tails... but...

1) Yes you can measure latency with millisecond and even microsecond accuracy. It is trivial when using any API that sends the Exchange timestamp. The difference between your PC time and the Exchange time is your latency, or how old that update is when you receive it. The transmission time does not distort the results, it will simply be part of the results.

2) If you are in a data center, you will find NTP <1ms away. If you aren't in a data center, why bother with latency at all?

3) You don't need a hardware device when in a data center. Steadfast already has an NTP server and there are many others in Chicago that do as well. NTP will sync with any of them and the precision can be measured as less than 1ms.

Pretty much all of this is irrelevant, I think the simplest answer to the original question is just to use ping.

Mike

@Big Mike: I was talking about the case where the trading station is in Europe, but the broker access point near Chicago. This is more a configuration for a discretionary trader.

In my first answer - see link below - I had recommended to use a VPS located near the access point of the broker. This includes of course data centers, which serve the purpose, so I do not think that we disagree.


Reply With Quote
  #27 (permalink)
 Koepisch 
@ Germany
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: FDAX
Posts: 569 since Nov 2011
Thanks Given: 440
Thanks Received: 518

I've searched i view hours today about NTP and local time sync. Fortunately i've found an excellent solution for that (also defined as stratum 1 source). You can use an Raspberry PI + GPS module and some code to get an sub ms accuracy with less efforts.

I will do it this way: Raspberry-Pi-NTP

One problem solved, yes!

Started this thread Reply With Quote
  #28 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534


artemiso View Post
There's a problem with this suggestion. If you switch to a US-based VPS, the bottleneck will not be your transmission latency (<150 ms) but rather the latency of your OS interrupts due to the virtualization software

VPS is good for someone with a tiny budget. Anyone who is somewhat latency sensitive won't mind spending $150 a month to get a full dedicated Xeon box at Equinix with Steadfast (etc). Anyone who is extremely latency sensitive would co-locate in Aurora.

I can't believe that anyone who was up against this problem would not already know this.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #29 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534


artemiso View Post
the rest of the thread is laden with misinformation.

Post some details.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #30 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534



artemiso View Post
To prove my point, I wrote a simple application (attached) to test this. The testing methodology can be improved but this is the shortest approach (15 lines of code). Compile with g++ and run it on your own PC and then run it on your VPS to compare. Haven't tried it out on another machine (it's 1 AM), but on my workstation, this is about 164 microseconds, but it should be several orders of magnitude larger on your VPS.

I don't have all the libraries installed, post compiled code for Windows and x64 linux and I'll post my results from a VPS vs dedicated.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on February 17, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts