I am interested in how to calculate order flow intensity. I got access to high frequency data and can simulate a limit order book. What is the best approach if I want to calculate order flow intensity?

  • 2
    $\begingroup$ You need to specify what you mean by the intensity. $\endgroup$ – LazyCat Feb 28 '16 at 3:31

Have a look to this paper, the methodology is well defined: Simulating and analyzing order book data: The queue-reactive model, by Huang, L and Rosenbaum.

You need first to define properly the events of which you want to estimate the intensity. I would suggest

  • insert
  • cancel
  • trade.

Then for each available tick of price $p$ (not each limit):

  • normalize its size $Q_p$, for instance dividing it by the average limit order size, and rounding: $N_p:=[Q_p/L]$
  • take $dt$ as the time to the next event affecting this queue $p$
  • record the type of the event ${\cal T}\in\{$ insert, cancel, market$\}$
  • just compute as estimate of $\lambda(p,{\cal T})=\mathbb{E}(dM(p,{\cal T})/dt)$: $$\hat\lambda(p,{\cal T}):=\frac{\#\{e(\omega)={\cal T}, N_p(\omega)=N \}}{\#\{N_p(\omega)=N \}}\cdot\frac{1}{{\rm mean}(dt(\omega)|N_p(\omega)=N )}$$

See the paper for exact definitions, but they are quite obvious: $\omega$ is "any event", and $\#\{ \cdot\}$ is the cardinal of a set. Since the paper has been published in the Journal of the American Statistical Association (110.509 (2015): 107-122), the statistical aspects are quite well defined.

Of course, there are questions about should you count time in seconds, or in "events"? My opinion is seconds (i.e. physical time) is the best because for orderbook dynamics, the time to really take into account may be in events of all instruments related to the one you are looking at (ETFs, Futures, stocks of the same index, options, bonds, etc). Hence there is always something happening: take seconds, it is a good proxy of "anything happened".


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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