Orderbook Profile

I haven’t posted for quite a while as have been busy getting a new high-frequency venture off the ground.   We started trading 2 weeks ago so will start posting periodically again.

There is some modeling crossover between the medium-daily frequency to high-frequency space, but of course each of these areas has their own characteristics.

The highest profit-per-trade strategies focus on short-term cross-asset relationships, MR, and long-run mean prediction.   These strategies have holding periods in minutes, anywhere from 5-20 minutes generally.  That said, there is a whole world of opportunity at the higher frequencies.    In some cases the profit after transaction cost may only be a couple 10ths of a basis point, but with a very high win/loss ratio.

For some of the simpler HF strategies, interpreting the order book and the flows in and out are key.   Here is a sample order book profile showing the longevity of orders in the book versus initial positioning relative to the inside price (as-of just before placement).  +pips are outside of the inside price and -pips are better than inside (i.e. better than best bid or ask as appropriate).

Clearly for this sample most orders live in the 15sec – 15min range from inside to inside + 3 pips.   More interesting is to look at the higher frequency activity in a subset of this:

We can use this to see where most of the activity is occurring.   With a bit more analysis get an idea of what other algorithms are doing and their frequency in the market.    Seeing how this changes with market time and regime is also telling..

In the above density graph it is easy to see that +5/10ths pip is a popular target for HF algorithms in this sample, for order durations 1ms and larger.  There is also something interesting going on with orders < 1ms (basically a place followed closely by a cancel).   One can then trace through order streams against targets like these and get a view on other games in town.


Filed under strategies

11 responses to “Orderbook Profile

  1. roberto

    Hi i would like to know how is possible to do that picture wich program are you using to do it… thanks

    • tr8dr

      You need access to a high-frequency data source that has market updates in the form of order deltas. I’m not sure whether you have access to this. You cannot get data in this form from brokers, rather directly from the exchange / venues. I am using R in combination with our proprietary low-level libraries. In R there is a graphics package called ggplot2 which can be used to generate visualizations such as this.

      • dar

        hi tr8dr which R package did you use for HF data manipulation and analysis as there are only few that can handle it xts, quantmode, orderbook.

        Thanks for sharing.

      • tr8dr

        Actually none. My infrastructure for HF is C++ / java based. I use rJava to call out to this stuff and R is primarily used for visualization. Don’t think one can reasonably do a lot of this in R (short of writing a package in a compiled language), as the volume of data is *very* large and R is too inefficient in processing large data sets.

  2. roberto

    I have rithmic and i have conect to matlab, i am aprop trader and now i am starting a hht projet and i would like to share things with you.. still i am not understandig really well the picture that you have post .. i need it to read again it but can you give me some clues how you can use r there the operations to do it.. i am using matlab.. really i think is better specially the new aplications to generate code in c in mex files compile for linux.. if you want i give my mail to explain the bos please really not understand the picture sorry and thanks

  3. roberto

    one more thing the delta level that you are saying to me is all depth of it.. we are a memeber and ca see it too.. thanks

  4. roberto

    Can we give us some reference like books or white papers to do this type of analyzed and studies.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s