Sunday, November 13, 2022

Limit Order Book Visualisation - Multi Part Post - Part 5

Quote Stuffing

Quote stuffing, which is referred to as "one of the most visually obvious forms of HFT" in Credit Suisse: High Frequency Trading – Measurement, Detection and Response and documented extensively by Nanex, for example here: Nanex: Quote Stuffing and Strange Sequences, occurs when bid or ask orders are added and then/deleted in rapid succession. Whether or not quote stuffing is malicious or not seems to be the subject of heated debate. I'm not an expert, so I'm not going to take a one sided position on this. I'm simply interested to see if similar observations can be made in Bitcoin, and whether or not it is possible to make sense of any observed activity. If I had to guess, I would say livelock like conditions are very likely to occur in event driven code: I've had to deal with all manor of different situations with my own trading code. I would also say that while this kind of activity may most of the time be a side effect of event driven processes, I think it is very plausible that it could be used in a targeted/creative way. Either way, the fact that this activity occurs at all is interesting in its own right.

The following examples show some activity on the Bitstamp exchange that appear to mirror quote stuffing (malicious or otherwise) found in conventional markets. The first example, below, shows a 15 minute time period on 2014-10-01. Note that 15 minutes is a very long time in comparison to where this phenomena are usually observed. Nevertheless, the asking price exhibits what is referred to as a square-wave in the Credit Suisse report.

https://preview.redd.it/sassqc8t8sz91.png?width=644&format=png&auto=webp&s=0ead1f743284986dc4e0fd028af37f351796f90a

This next example, taken from 2014-10-03, the best ask oscillates quite wildly over a long period of time (~30 minutes). If this is the result of a bug, then it is a pretty serious one: the fluctuation is huge.

https://preview.redd.it/pcbrn34z8sz91.png?width=642&format=png&auto=webp&s=d80cfe97d6e0eef182ec39f215b83ae7c882962f

Zooming in to a 5 minute period shows the anomaly in finer detail. In addition, the depth map shows the fluctuating liquidity as the order is continuously added and removed.

https://preview.redd.it/bbqnq9389sz91.png?width=644&format=png&auto=webp&s=496f6f22e71f09a7e27db16a44e6731fd41be3ac

https://preview.redd.it/dsxs9aa99sz91.png?width=634&format=png&auto=webp&s=9259f8405cf95f9dcfcded1cf433046dffe24d1b

The next example, taken from 2014-10-17, shows a more interesting pattern. The ask in this case is decreasing at an irregular rate. I'm guessing that this is simply 2 or more selling algos jumping over each other. The bid side however seems to exhibit a more regular pattern: the bid increases to some level in small steps, and then resets.

https://preview.redd.it/y137x1lf9sz91.png?width=646&format=png&auto=webp&s=12d86d24ecbb4270533cfc432260fc4740e47b5b

Looking at the bid event event data, restricted to the current best bid for the same period, shows this climbing and then reseting effect in greater detail.

https://preview.redd.it/fy3nr2xk9sz91.png?width=626&format=png&auto=webp&s=34425ac2d8913f76250e35ada65c6bfff0f5db23

A slightly more interesting observation occurring on 2014-10-18. This time, reminiscent of the "sawtooth" pattern.

https://preview.redd.it/osoeradq9sz91.png?width=640&format=png&auto=webp&s=2c9d938eb9924bca1d3a156c698d6e450c6e96dd

Another square wave pattern. This time occurring on 2014-10-20.

https://preview.redd.it/jhzfv4w6asz91.png?width=644&format=png&auto=webp&s=88cd7a6afc413894d2a9f458dad3662b9f2a1882

The sawtooth pattern occurring below, on 2014-10-22 is quite interesting. If we look at the corresponding order events, not only is this pattern increasing in price, but also in volume. The aligned cancelled volume chart shows the actual amounts.

https://preview.redd.it/7q4ez0clasz91.png?width=648&format=png&auto=webp&s=193bbce6d385e5f8eb6193a6bab32a1b2dbbdc11

https://preview.redd.it/871kcwimasz91.png?width=636&format=png&auto=webp&s=0b6d5a1e2b0dcd98b3ae146d9b172323b4cba921

https://preview.redd.it/y3cw3mtnasz91.png?width=644&format=png&auto=webp&s=abd4319f794ff272f83f7a4313d79e09f9ad9b39

The remaining visualisations show various other formations.

https://preview.redd.it/q3jucjbabsz91.png?width=642&format=png&auto=webp&s=2fff5e6e3503931c40011eff080befc447afd7b6

https://preview.redd.it/mrfug30cbsz91.png?width=632&format=png&auto=webp&s=0f7a44c23a13a584d176cebf744ff3b2788f72eb

https://preview.redd.it/e1w3mzkdbsz91.png?width=638&format=png&auto=webp&s=d1568f5b69a0ade5304b89c2cefc6ef5ace4df72

https://preview.redd.it/oxsg88oebsz91.png?width=646&format=png&auto=webp&s=f2c6106923f1f63e011e467a5b9c62bf4434f9bf

https://preview.redd.it/70gkj5bhbsz91.png?width=652&format=png&auto=webp&s=a5cca01ff30c9785adfac1376469e015e94eb419


No comments:

Post a Comment