Limit Order Book Visualisation – Multi Part Post – Part 3

CategoriesGamestop., GME, Options Trading

Visualising Order Book Depth and Liquidity

The available volume at any given price level is the sum of the volume from the individual orders enqueued at that price. As such, the available volume at a price level can be viewed as an individual time series that changes when a new order is enqueued (Add), removed (Cancel), or filled (Modified). The cumulative sum of the volume available at price levels above and below the market midprice corresponds to the level of liquidity available in the market.

A common approach to viewing the order book volume is to plot the cumulative sum of the volume on either side of the book (as shown in the introduction). This approach shows available liquidity, order book imbalance and volume size at each level as a type of step function, more generally, the order book “shape”. The problem with this approach is that it is limited to displaying instantaneous information: it shows no persistent information, instead showing a snapshot of the order book for 1 particular instant in time.

Order Book Price Level Volume

The following visualisations show how the order book volume evolves through time, and show a complete picture of all limit order activity throughout the day. The first example, shown below, shows the volume available at every price level, in 1 cent ticks, filtered to show the 2100 levels >= $313 and <= $334 for a 24 hour period on the 2nd November. The white time series corresponds to the market midprice, which is defined as the average price between the current best bid and ask prices: (best.bid+best.ask)/2. All price levels above the midprice correspond to the Ask side of the book, while levels below correspond to the Bid side. The colours differentiate between the amount of volume at each level: Blue means little volume, through to Green, Yellow, and finally, Red to indicate a large quantity of volume. Since the majority of price levels contain very little volume, the colour scheme has been rescaled, so that most of the colour differentiation occurs below ~5 Bitcoin and anything above (rare) is in the red-end of the spectrum.

Post image

Unlike the order book event visualisations shown previously, this visualisation shows the actual life cycle of limit orders. In the context of this article, the sheer extent of limit order activity is shown, demonstrating the ebb and flow of activity throughout the day.

Order Book Liquidity

I borrowed the idea for visualising liquidity/depth (and the spectral colour scheme) fromĀ Nanex: I’m a big fan of the visualisations resulting from theirĀ research.

The below chart (which is aligned with the above) shows the cumulative sum of order book depth through time. The amount of data I am dealing with here comes nowhere near as close as the amount of data processed by Nanex. Furthermore, this exchange (Bitstamp) is highly unliquid. As such, instead of showing the available depth at actual price levels, I have grouped the volume into 40 percentile buckets above (20) and below (20) the current best bid and ask price. This example, shows the amount of volume available throughout the day on the bid side of the book (negative liquidity on the y-axis) vs the volume available on the ask side of the book (positive). Starting at the 0 line, the first red region above it shows the amount of volume available at the best ask price up until 0.0025% (25 BPS) above. The band above that, shows the amount of volume for all prices >= 25 BPS and < 50 BPS. The top band (blue), shows the amount of volume at price levels >= 475 BPS and < 500 BPS (5%). The same percentile ranges are repeated for price levels below the best bid price.

Post image
Some Examples

Using the same day as an example, zooming in to a 3 hour period, centered at 12pm, the following chart and accompanying depth map shows the order book activity at the end of a minor (in Bitcoin terms) sell off. It is interesting to note the midprice movement in this chart in relation to the order book depth. Firstly, note the ribbons of declining volume above the midprice. This shows quite a large amount of volume being periodically cancelled and then shifted down a few levels. Second, the depth map below the chart, shows the total volume above and below, note how immediately before the last sell off there is an increase in liquidity above the midprice, and immediately after, below.

Post image
Post image

Zooming in to a 15 minute interval, centered on the same region, it becomes appropriate to show the current best bid and ask along with trade events instead of the market midprice. Here, visible on both the order book price level chart and the depth map, we can see a number of limit orders being cancelled immediately before a sell off.

Post image
Post image

Using the price level and depth map visualisations above, it is possible to begin to interpret some of the activity. Looking though some random slices of the data, some re-occurring themes begin to emerge. As mentioned before, given that this market is completely unregulated (I’m not implying this is a bad thing), and is essentially a free-for-all in terms of the potential for competing trading algos, I hope to find some interesting activity to visualise. So far I have identified a few patterns reminiscent of the “Negative HFT” initially reported by and categorised by Nanex.

Continued in Part 4: https://piousbox.com/2022/11/limit-order-book-visualisation-multi-part-post-part-4/

Leave a Reply