Price Discovery in Bitcoin exchange
I applied price discovery algorithms to 5 Min OHLCV data from Bitmex and CME contracts and Bitstamp, Coinbase, HitBTC, Kraken, Poloniex, Binance, and OkEx BTCUSD/BTCUSDT markets from March 2016 to May 2020 to find the leading bitcoin exchanges and how their role correlate with Bitcoin Price Direction. Some exciting observations I made are:
-
Before the 2017/18 bull run, Bitfinex dominated the price discovery process. They started the run. But as the price increased, trades on other exchanges, Binance and Bitstamp played a more dominant role in leading the price up.
-
Since then, CME Contracts and Bitmex contracts have had an increasing role in price discovery. Today Bitmex and CME Contracts play the most substantial role in determining the direction of Bitcoin price.
-
In 2020, market dominance by Bitmex has been negatively correlated with price. Dominance by Bitfinex, Huobi and OkCoin has had high positive correlation with price.
Introduction
(Skip to the analysis section if you want to avoid the theory)
Price discovery is the overall process of setting the price of an asset. Price discovery algorithms identify the leader exchanges whose traders define the price. Several academics have already done various price discovery analysis on Bitcoin Markets. And although they used novel approaches, they ignore exchanges with huge real volumes like Bitfinex, OkEx, and Huobi.
There are different approaches to measure price discovery. The most popular ones are Hasbrouck (1995) and Gonzalo and Granger (1995). Hasbrouck (1995) measures price discovery by calculating something called an efficient price. They define efficient price as the actual true price and measure discovery by measuring each exchange’s variance from the efficient price. Gonzalo and Granger (1995) do it a bit differently by decomposing the price series into components that represent the deviation from the efficient price. Both of these work have a different level of noise and in an attempt to decrease the noise Putniņš (2013) combined both of them to create a new measure.
All of the algorithms mentioned above assume cointegration, random walk, and a common efficient price. And although cointegration is a fair assumption, I do not feel comfortable assuming random walk and common efficient price in Bitcoin Markets. This is a speculation based market where significant trades can cause change. So although the measures in previous paragraphs are better studied, I use a new and little know method by De Blasis (2019). De Blasis assumes that “the fastest price to reflect new information releases a price signal to the other slower price series.” This assumption seems fair in Bitcoin Markets. De Blasis (2019) tested their work in different futures and ETF contracts and found that the index’s lead discovery in line with accepted literature adding credibility to their work.
De Blasis (2019) uses Markov Chains to measure Price Discovery. Markov Chain is a way of modeling random processes. Without going into the mathematical details their work calculates Price Discovery using the following steps:
- Data is first grouped into a daily interval. Then inside each daily interval’s 5-minute candles, the change in prices between the current time t and previous time t-1 is calculated. The difference across the same time t across all exchanges in a given day is juxtaposed to create an initial matrix.
- The initial matrix is used to create a Transition Matrix, which measures the probability of price changing to something else at time t+1 for its state at t.
- Then Markov Chain based algorithms are used to measure the influence an exchange at time t had over all other exchanges’ price movement at time t+1 individually.
- Reduction and normalization is done to this data. In the end, each exchange receives a single number that sums to 1 for a given day.
De Blasis (2019) names this number Price Leadership Share (PLS). High PLS indicates a large role in price discovery. As the sum of the numbers is 1, they can be looked at as a percentage contribution. I recommend reading the original paper if you are interested to know more about the mathematical detail.
Data
Andersen (2000) argues that 5 Minute window provides the best trade-off between getting enough data and avoiding noise. In one of the first work on Bitcoin’s Price Discovery, Brandvold et al. 2015 had used 5M window. So I obtained 5M OHLCV data using the following sources:
- Poloniex, Bitfinex, Binance and HitBTC: Exchange’s API through CCXT.
- Huobi: Official Websocket Market API
- Coinbase: Official API using cbpro
- Kraken, Bitstamp, OkCoin: I created candles from the trade data obtained from Bitcoincharts
- OkEx: Bitdataset API
- CME: Okay, this was was supposed to be tricky and expensive. I broke a TOS and scraped the data for free, removing the expensive part from the equation. I will not go into detail about where I scraped this data.
- Bitmex: I got Bitmex data from the API.
Futures data are different from other data because multiple futures contract trades at the same time. I formed a single data from the multiple time series by selecting the nearest contract until it was three days from expiration. I used the next contract when the contract was three days from expiration. This approach was advocated by Booth et al ( 1999) and and was also used by Alexander et al (2019) in the cryptocurrency market.
Analysis
In the figure above, each colored line shows the total influence the exchange had towards the discovery of Bitcoin Price on that day. Its axis is on the left. The black line shows a moving average of the bitcoin price at the close in Bitfinex for comparison. The chart was created by plotting the EMA of price and dominance with a smoothing factor of 0.1. This was done to eliminate the noise. Let’s start looking from the beginning. We start with a slight Bitfinex dominance at the start. When the price starts going up, Bitfinex’s influence does too. This was the time large Tether printing was attributed to the rise of price by many individuals. But Bitfinex’s influence wanes down as the price starts rising (remember that the chart is an exponential moving average. Its a lagging indicator). Afterward, exchanges like Binance and Bitstamp increase their role, and there isn’t any single leader in the run. So although Bitfinex may have been responsible for the initial pump trades on other exchanges were responsible for the later rally.
CME contracts were added to our analysis in February 2018. Initially, they don’t have much influence. On a similar work Alexandar and Heck (2019) noted that initially CBOE contracts had more influence. CBOE later delisted Bitcoin futures so I couldn’t get that data. Overall, Bitmex and CME contracts have been averaging around 50% of the role in price discovery. To make the dominance clear, look at this chart where I add Bitmex Futures and Perp contract’s dominance figure to create a single dominance index. There bitmex leads 936 of the total 1334 days (Bitfinex leads 298 days and coinbase and binance get 64 and 6 days). That is a lot. One possible reason for this might be Bitmex’s low trading fee. Bitmex has a very generous -0.025% maker fee and price discovery tend to occur primarily in the market with smaller trading costs (Booth et al, 1999; Hsieh et al., 2008). It may also be because our market is mature. In mature markets, futures lead the price discovery.
Exchange | bitmex_futures | bitfinex | coinbase | bitmex | okex | binance | cme | bitstamp | okcoin | kraken | poloniex |
---|---|---|---|---|---|---|---|---|---|---|---|
Days | 571 | 501 | 102 | 88 | 34 | 12 | 8 | 7 | 6 | 4 | 1 |
Out of 1334 days in the analysis, Bitmex futures leads the discovery in 571 days or nearly 43% of the duration. Bitfinex leads for 501 days. Bitfinex’s high number is due to its extreme dominance in the early days.
Exchange | binance | huobi | cme | okcoin | bitmex_futures | okex | hitbtc | kraken | poloniex | bitstamp | bitfinex | coinbase | bitmex |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Correlation | 0.809190 | 0.715667 | 0.648058 | 0.644432 | 0.577147 | 0.444821 | 0.032649 | -0.187348 | -0.365175 | -0.564073 | -0.665008 | -0.695115 | -0.752103 |
Binance, Huobi, CME, and OkCoin had the most significant correlation with the close price. Bitmex, Coinbase, Bitfinex, and Bitstamp’s dominance were negatively correlated. This was very interesting. To know more, I captured a yearwise correlation.
index | 2016 | 2017 | 2018 | 2019 | 2020 | |
---|---|---|---|---|---|---|
0 | bitfinex | 0.028264 | -0.519791 | 0.829700 | -0.242631 | 0.626386 |
1 | bitmex | 0.090758 | -0.752297 | -0.654742 | 0.052242 | -0.584956 |
2 | bitmex_futures | -0.011323 | -0.149281 | -0.458857 | 0.660135 | 0.095305 |
3 | bitstamp | 0.316291 | -0.373688 | 0.600240 | -0.255408 | -0.407608 |
4 | coinbase | -0.505492 | -0.128336 | -0.351794 | -0.410874 | -0.262036 |
5 | hitbtc | 0.024425 | 0.486229 | 0.104912 | -0.200203 | 0.308862 |
6 | kraken | 0.275797 | 0.422656 | 0.294762 | -0.064594 | -0.192290 |
7 | poloniex | 0.177616 | -0.087090 | 0.230987 | -0.135046 | -0.154726 |
8 | binance | NaN | 0.865295 | 0.706725 | -0.484130 | 0.265086 |
9 | okcoin | NaN | 0.797682 | 0.463455 | -0.010186 | -0.160217 |
10 | huobi | NaN | 0.748489 | 0.351514 | -0.298418 | 0.434164 |
11 | cme | NaN | NaN | -0.616407 | 0.694494 | -0.012962 |
12 | okex | NaN | NaN | -0.618888 | -0.399567 | 0.432474 |
Price movement is pretty complicated. If one factor, like a dominant exchange, could explain it, everyone would be making money trading. With this disclaimer out of the way, let us try to make some conclusions. This year Bitfinex, Huobi, and OkEx, Tether based exchanges, discovery power have shown a high correlation with the close price. This means that when the traders there become successful, price rises. When the traders there are failing, the price is falling. When Bitmex traders are getting a say, price is falling. I leave the interpretation of other past years to the viewer.
Limitations
My analysis does not include market data for other derivative exchanges like Huobi, OkEx, Binance, and Deribit. So, all future market’s influence may be going to Bitmex. I did not add their data because they started having an impact recently. A more fair assessment may be to conclude this as the new power of derivative markets instead of attributing it as the power of Bitmex. But Bitmex has dominated futures volume most of the time (until recently). And they brought the concept of perpetual swaps.
Conclusion
There is a lot in this data. I think there is some edge here. Someday I will backtest some trading logic based on this data. Then I will have more info and might write more. But, this analysis was enough for to shift my focus from a Bitfinex based trading algorithm to a Bitmex based one. It has been giving me good results.
If you have any good ideas that you want me to write about or discuss further contact me. If you are interested in this analysis and want to discuss further leave a comment or contact me.