Trading performance deterioration due to RTT increase to the quote server

Bottom line: we observed that a mere 25% increase in the round-trip time (RTT) to the TrueFX quote server resulted in considerable deterioration of the trading performance – for the same software, the strategy and its parameters.

In our previous post, we came to the conclusion that the 15% loss of ticks on the machine where the Smart Forex Tester software was run from the IDE – compared with the reference test – was caused by lower performance of the IDE version in handling HTTP requests to the TrueFX quote server.

While it is a known fact that the software run from the IDE is less optimized, we found that there are other factors at play that may better explain the difference.

We repeated our previous test – this time using the release version on both computers. The idea was to eliminate the alleged performance gap and thus minimize the difference between the number of received ticks.

Both computers had similar hardware and the Internet connections on both machines were more than adequate for the purposes of the test.

Both machines were connected to the same router. The reference setup was connected via a 2.4GHz WiFi link (Ookla speedtest: 45/5 Mbps), and the other machine had a Gigabit Ethernet connection (Ookla speedtest: 180/5 Mbps).

The below graph presents the test results for the reference setup.

GBPUSD test lost 14 pips during Friday session with low volatility of 88 pips. Times PST.

Despite a small loss, we can be satisfied with this result – which was achieved during low market volatility period. And overall, this loss was a drop in the bucket – the whole week remained solidly profitable. During the first four weekdays, our automated strategy gained just shy of 400 pips.

So, this Friday’s result is also coming in line with our previous observations that about 80% of trading sessions are profitable. Win ratio was also decent.

However, the other test went much worse than the reference one.

Same software. Same hardware. 4 times faster Internet connection. RTT increased 25% – the culprit.

At first glance, this result defies all logic. After all, we were using the release software this time, not the IDE. And the machine we ran it on has slightly better hardware – plus 4 times faster wired Internet connection than the reference setup.

After a quick investigation, we noticed that for some – yet unknown – reason, average RTT to the quote server was 25% more than that on the reference setup. Check the values marked by arrows on the below graph.

The setup with smaller RTT had more ticks and better trading performance.

For the reference setup, the RTT – averaged for this 14 hours test – was 115 ms. But for a more powerful machine with a much faster Internet connection RTT was 145 ms. Now, the test result suddenly started making a lot more sense.

We will have to investigate the reason why the RTT for a more powerful setup was actually worse. But this is not the most important here.

What really matters here is that our latest results actually confirmed the conclusions of our previous test: slightly less ticks – considerably less accurate signals.

So, it appears that to properly utilize the perfect (and free!) TrueFX live feed for live trading, we should consider implementing a 2-tier structure.

First, we have to make sure the software is run in the environment with the smallest possible RTT: less than 100ms should be good, and less than 50 – ideal. RTT this low will guarantee the best possible trading signals. Arranging a VPS physically close to the TrueFX server location is the way to achieve that.

Next, once a signal is generated, we can probably afford a reasonable (200-300 ms) delay for the trades’ execution: relying on the fact that in many cases, the market may see-saw a bit.