Announcement header or pricing ticker

Analyzing Trade Clustering To Predict Price Movement In Bitcoin Trading

Financial markets, like many interactions in the world, are often self-exciting. Said differently, events within a dataset can actually serve as the impetus for more of the same events to a calculable extent. Statistical models to analyze self-excitability are used to understand both the independence and causal dependence of observations in such fields as seismology (study of earthquakes), criminology (study of crime) and more recently by algorithmic traders to understand financial markets. With the bitcoin markets having grown enough to offer ample data, self-excitability and its implication on bitcoin prices can now be observed as well.

Excitability in Bitcoin Trading

In general, trades do not arrive in evenly-spaced intervals, but rather are clustered in time. Similarly, the same trade signs tend to cluster together and result in a sequence of buy or sell orders. Various explanations for this are possible, such as algorithmic traders who split up their orders in smaller blocks or trading systems that react to certain exchange events.

To analyze the effect of excitability on price within bitcoin markets, we looked at particularly dramatic trading data from Bitstamp on September 4 and 5 when prices fell 11.5% in less than 20 hours. By observing volatile periods, we can most clearly assess the impact of excitability on prices.

The average trade count per minute during this period is 6.8, however, we can make out a number of instances where it exceeds 100. Usually the higher trade intensity lasts a couple of minutes and then dies down again towards the mean. In statistics, Hawkes Processes, or self-exciting processes, aim to explain such clustering.

bitstamp_price

trade counts

Hawkes Process

A Hawkes Process models the time-varying intensity, or event occurrence rate of a process, which is partially determined by the history of the process itself. An example realisation of a Hawkes process is plotted in the next figure.

fake_intensity

The self-excitability is visible by the first four events prior to time mark 2. They occur within short time from each other which leads to a large peak of intensity by the fourth event. Every event occurrence increases the chance of another occurrence which results in clustering of events. The fifth data point only arrives at time mark 4 which, in the meantime, resulted in an exponential decrease of the overall intensity.

Statistical analysis of how past events affect the current events offers a quantifiable measurement of conditional intensity. From the measurement of conditional intensity, we can also derive two other quantities of interest. The first is expected intensity which, in the case of bitcoin, would describe the trading intensity for a given time period. We can also calculate the branching ratio, or fraction of trades that are endogenously generated (i.e. as the result of another trade).

The chart below shows what the Hawkes Process looks like fitted to the Bitstamp trading data referenced above. While not a perfect fit, it does show that trade clustering and the related implications may prove to be at least somewhat predictable.

trade count fitted

Effect on Bitcoin Trading

Excitability and trade clustering may also have a notable effect on the price of bitcoin, particularly during periods of high price volatility. By looking at the branching ratio (fraction of endogenous trades relative to the total trade count), we can see a potential signal of when market bottoms are occurring.

The chart below shows the branching ratio derived from the Hawkes Process calculation overlayed onto the trading dataset from Bitstamp used throughout this piece. In this case, the branch ratio is calculated on a rolling basis, updated every 500 trades. As you will notice, the branching ratio reaches its lowest points at the same time price does. Said otherwise, when the ratio of endogenous trades as a fraction of total trades reaches an outlying low level (around 30% in this example), it may indicate that highly-reactionary trading is ending and price will have a chance to recover.

branching ratio

Using the branching ratio as a signal of market bottom in a live trading scenario would require more complex algorithmic insight, as accurately fitting the Hawkes Process to live data requires use of more complicated historical inputs than does fitting the Hawkes Process to an existing data set. That said, it is a topic that has been explored extensively in traditional financial markets, and is now beginning to show its potential in bitcoin.

More detailed insight into the calculations and processes behind this analysis can be found on Jonathan Heusser’s personal website.

Schedule a Demo

"*" indicates required fields