Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're developing an HFT strategy for highly liquid futures traded at Eurex. We are planning to colocate our server and to use data feed of QuantHouse and execution API of ObjectTrading. Backtesting is performed on tick data bought from QuantHouse, where timestamps have millisecond resolution (BTW, trades and quotes are sorted separately, so if trades and quotes have a same timestamp, they are not sorted). My question is about latency we should use for backtesting. I define latency as: data feed latency + internal processing time (several microseconds) + execution latency. We simulate this by adding X ms to the feed time (T) of the tick that triggered the trade, then if the last tick with the feed time not later than T + X was a quote we use its book for execution, otherwise (if the last tick with the feed time not later than T + X was a trade) we wait for an incoming quote and its book is used for execution. So my questions are:

  1. Is our execution model reasonable?
  2. What X should be used for our setup?
  3. Could you suggest other (not too expensive) setup in order to reduce any kind of latency?
share|improve this question
The value of X is heavily dependent on your set-up. No one here will be able to answer that for you; you'll have to determine it empirically. – chrisaycock Jun 4 '12 at 11:19
Cross-posted on NP. – Joshua Ulrich Jun 4 '12 at 12:27
Q:Is our execution model reasonable? It looks reasonable, but are you keeping the liquidity and order quantities in the mix? Its easier to ignore the Qty of a quote available on book, but it may hurt you later in case you are using huge quantities and the market liquidity is not enough for it. Q:What X should be used for our setup? What kind of a network connection is being used? What speed? Copper or fibre? After this information is available to you, you should be able to make an educated guess. But it is always best to run your own tests to find the network time X. – Aziz Jun 5 '12 at 5:47
Thank you. Colocation in Equinix, fibre line. We're still developing a strategy, so currently we cannot find X empirically. – l.m Jun 6 '12 at 8:15

First the kind of strategy you plan to implement is of importance:

If it is scaling (arbitraging spread crosses: buy at one ask one one venue that is cheaper than one bid in another venue), the kind of approach you plan to use is rational. Nevertheless you should take into account:

  • the fact that the latency is somehow not deterministic, use a Poisson process for the duration between two messages,
  • the latency is not the same at any time during the day, more or less proportional to the activity (U shaped in the US, with an increase when NY is open in Europe).

If it is a stat arb based strategy, your PnL should not be too sensitive tonthe ordering of the messages. Instead of adding latency, you should backtest with local perturbations on the order of the messages (with for instance a radius of 1 to 10 messages).

share|improve this answer
Thank you. Our strategy is a stat arbitrage strategy. Does "bid-ask crossing" mean that we are liquidity takers? We are going to take liquidity. We thought about random perturbation of quotes, but only with a same timestamp (ms resolution, once again). – l.m Jun 6 '12 at 8:10
I mean: to arbitrage bid-ask crosses between two trading destinations. – lehalle Jun 6 '12 at 14:29
Could you please explain why stat arb PnL should not be sensitive to the ordering of the messages? – user2763361 Oct 6 '13 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.