Abstract
Order flow analysis studies the impact of individual order book events on resulting price change. Using data acquired from BitMex, the largest cryptocurrency exchange by traded volume, the study conducts an in-depth analysis on the trade and quote data of the XBTUSD perpetual contract. The study demonstrates that the trade flow imbalance is better at explaining contemporaneous price changes than the aggregate order flow imbalance. Overall, the contemporaneous price change exhibits a strong linear relationship with the order flow imbalance over large enough time intervals. Lack of depth and low update arrival rates in cryptocurrency markets are found to be the main differentiators between the nascent asset class market microstructure and that of the established markets.
Similar content being viewed by others
References
Abergel, F., & Jedidi, A. (2015). Long-time behavior of a Hawkes process-based limit order book. SIAM Journal on Financial Mathematics, 6(1), 1026–1043.
Aït-Sahalia, Y., & Jacod, J. (2014). High-frequency financial econometrics. Princeton: Princeton University Press.
Antonopoulos, A. M. (2017). Mastering Bitcoin: Unlocking digital cryptocurrencies. Newton: O’Reilly Media, Inc.
Bershova, N., & Rakhlin, D. (2013). The non-linear market impact of large trades: Evidence from buy-side order flow. Quantitative Finance, 13(11), 1759–1778.
Bilokon, P. A. (2018). Electronic market making as a paradigmatic machine learning and reactive computing challenge. Working paper.
Bitcointalk. (2010). Pizza for bitcoins? https://bitcointalk.org/index.php?topic=137.0. Accessed 10 Mar 2018.
Black, F. (1971). Toward a fully automated stock exchange, part i. Financial Analysts Journal, 27(4), 28–35.
Cartea, Á., Jaimungal, S., & Penalva, J. (2015). Algorithmic and high-frequency trading. Cambridge: Cambridge University Press.
Chakraborti, A., Toke, I. M., Patriarca, M., & Abergel, F. (2011). Econophysics review: I. Empirical facts. Quantitative Finance, 11(7), 991–1012.
Chan, E. P. (2017). Machine trading: Deploying computer algorithms to conquer the markets. Hoboken: Wiley.
Chordia, T., Roll, R., & Subrahmanyam, A. (2002). Order imbalance, liquidity, and market returns. Journal of Financial Economics, 65(1), 111–130.
Chu, J., Chan, S., Nadarajah, S., & Osterrieder, J. (2017). Garch modelling of cryptocurrencies. Journal of Risk and Financial Management, 10(4), 17.
Cont, R., & De Larrard, A. (2013). Price dynamics in a markovian limit order market. SIAM Journal on Financial Mathematics, 4(1), 1–25.
Cont, R., Kukanov, A., & Stoikov, S. (2014). The price impact of order book events. Journal of Financial Econometrics, 12(1), 47–88.
Dixon, M. (2018). Sequence classification of the limit order book using recurrent neural networks. Journal of Computational Science, 24, 277–286.
Donier, J., & Bonart, J. (2015). A million metaorder analysis of market impact on the Bitcoin. Market Microstructure and Liquidity, 1(02), 1550008.
Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press. http://www.deeplearningbook.org. Accessed 12 Mar 2018.
Gould, M. D., Porter, M. A., Williams, S., McDonald, M., Fenn, D. J., & Howison, S. D. (2013). Limit order books. Quantitative Finance, 13(11), 1709–1742.
Guo, T., & Antulov-Fantulin, N. (2018). Predicting short-term Bitcoin price fluctuations from buy and sell orders. arXiv preprint arXiv:1802.04065.
Halaburda, H., & Gandal, N. (2017). Competition in the cryptocurrency market. Available at SSRN 2506463.
Hastie, T., Tibshirani, R., & Friedman, J. (2001). The elements of statistical learning. Springer series in statistics. New York, NY: Springer.
Heusser, J. (2013). Bitcoin trade arrival as self-exciting process. http://jheusser.github.io/2013/09/08/hawkes.htm. Accessed 10 Feb 2018.
Hileman, G., & Rauchs, M. (2017). Global cryptocurrency benchmarking study. Cambridge Centre for Alternative Finance. https://doi.org/10.2139/ssrn.2965436.
Huang, W., Lehalle, C.-A., & Rosenbaum, M. (2015). Simulating and analyzing order book data: The queue-reactive model. Journal of the American Statistical Association, 110(509), 107–122.
Jessen, C. R. (2015). Implementation and evaluation of an order flow imbalance trading algorithm. Unpublished MSc Thesis.
Jiang, Z., & Liang, J. (2016). Cryptocurrency portfolio management with deep reinforcement learning. arXiv preprint arXiv:1612.01277.
Johnson, B. (2010). Algorithmic trading and DMA. London: 4Myeloma Press.
Karpoff, J. M. (1987). The relation between price changes and trading volume: A survey. Journal of Financial and Quantitative Analysis, 22(1), 109–126.
Kelly, F., & Yudovina, E. (2017). A Markov model of a limit order book: Thresholds, recurrence, and trading strategies. Mathematics of Operations Research, 43(1), 181–203
Kirilenko, A., Kyle, A. S., Samadi, M., & Tuzun, T. (2017). The flash crash: High-frequency trading in an electronic market. The Journal of Finance, 72(3), 967–998.
Lee, C., & Ready, M. J. (1991). Inferring trade direction from intraday data. The Journal of Finance, 46(2), 733–746.
Madan, I., Saluja, S., & Zhao, A. (2015). Automated Bitcoin trading via machine learning algorithms (Vol. 20). http://cs229.stanford.edu/proj2014/Isaac%20Madan.
Morariu-Patrichi, M., & Pakkanen, M. S. (2017). Hybrid marked point processes: Characterisation, existence and uniqueness. arXiv preprint arXiv:1707.06970.
Osterrieder, J., Chan, S., Chu, J., & Nadarajah, S. (2017). A statistical analysis of cryptocurrencies. https://doi.org/10.2139/ssrn.2948315
Pagnottoni, P., Dimpfl, T., & Baur, D. (2018). Price discovery on Bitcoin markets. Available at SSRN 3280261.
Pasquale, F. (2014). Law’s acceleration of finance: Redefining the problem of high-frequency trading. Cardozo Law Review, 36, 2085.
Plerou, V., Gopikrishnan, P., Gabaix, X., & Stanley, H. E. (2002). Quantifying stock-price response to demand fluctuations. Physical Review E, 66(2), 027104.
Russo, C. (2018). One of the biggest crypto exchanges goes dark and users are getting nervous. https://www.bloomberg.com/news/articles/2018-01-12/crypto-exchange-kraken-goes-dark-and-user-anxiety-surges. Accessed 14 Feb 2019.
Shah, D., & Zhang, K. (2014). Bayesian regression and Bitcoin. In 2014 52nd annual Allerton conference on communication, control, and computing (Allerton) (pp. 409–414). IEEE.
Shen, D. (2015). Order imbalance based strategy in high frequency trading. Unpublished MSc Thesis.
Sirignano, J., & Cont, R. (2018). Universal features of price formation in financial markets: Perspectives from deep learning. arXiv preprint arXiv:1803.06917.
Steadman, I. (2013). Study: 45 percent of Bitcoin exchanges end up closing. http://www.wired.co.uk/article/large-bitcoin-exchanges-attacks. Accessed 15 Feb 2018.
Upson, J., & Van Ness, R. A. (2017). Multiple markets, algorithmic trading, and market liquidity. Journal of Financial Markets, 32, 49–68.
Verhage, J. (2018). Bitcoin’s 43% arbitrage trade is a lot tougher than it looks. https://www.bloomberg.com/news/articles/2018-01-09/bitcoin-s-43-arbitrage-trade-is-a-lot-tougher-than-it-looks. Accessed 14 Feb 2019.
Wheatley, S., Sornette, D., Reppen, M., Huber, T., & Gantner, R. N. (2018). Are bitcoin bubbles predictable. Combining a Generalised Metcalfe’s Law and the LPPLS Model, Swiss Finance Institute Research Paper (18–22).
Zheng, Z., Xie, S., Dai, H.-N., & Wang, H. (2016). Blockchain challenges and opportunities: A survey. Work paper—2016.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A: Exchange specification
An essential feature of BitMex is that, above all, it is a marketplace for derivatives on cryptocurrency, as opposed to a spot market. All margin payments are carried out in Bitcoin, thus the only predicate for participating in the markets is a Bitcoin deposit. Another key feature of BitMex is leverage that it offers to traders. Currently, maximum leverage that one can take out on XBTUSD contract is \(\times \) 100.
XBTUSD is effectively a perpetual swap contract, where one contract is worth 1 USD of Bitcoin. XBTUSD never expires, but participants are may be subject to margin funding. The contract tracks the underlying price of Bitcoin, which is calculated as an index across various spot markets. The tracking mechanism is dependent upon funding ratio. In essence, to reduce tracking error, BitMex will calculate the deviation between current XBTUSD contract value and spot price index. If the value of the contract is above the reference index, than the implied interest rate of Bitcoin is higher that USD. Hence, to stabilise the price, the long contract holders will pay funding the short-sellers of the contract. This mechanism applies vice versa when contract value falls below the reference index and is what keeps the contract at fair price.
Trading fee structure on BitMex is very straightforward and highly shifted towards market makers when compared to other exchanges. Market makers get paid a constant 25 bps rebate, while takers pay 35 bps in commission.
Appendix B: Python code
Rights and permissions
About this article
Cite this article
Silantyev, E. Order flow analysis of cryptocurrency markets. Digit Finance 1, 191–218 (2019). https://doi.org/10.1007/s42521-019-00007-w
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s42521-019-00007-w