×

A generative model of a limit order book using recurrent neural networks. (English) Zbl 1520.91388

Summary: In this work, a generative model based on recurrent neural networks for the complete dynamics of a limit order book is developed. The model captures the dynamics of the limit order book by decomposing the probability of each transition into a product of conditional probabilities of order type, price level, order size and time delay. Each such conditional probability is modelled by a recurrent neural network. Several evaluation metrics for generative models related to trading execution are introduced. Using these metrics, it is demonstrated that the generative model can be successfully trained to fit both synthetic and real data from the Nasdaq Stockholm exchange.

MSC:

91G15 Financial markets
68T07 Artificial neural networks and deep learning

References:

[1] Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G.S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mané, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viégas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y. and Zheng, X., TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. 2015. Software available from https://www.tensorflow.org,
[2] Alfonsi, A.; Fruth, A.; Schied, A., Optimal execution strategies in limit order books with general shape functions, Quant. Finance, 10, 143-157 (2010) · Zbl 1185.91199
[3] Almgren, R.; Chriss, N., Optimal execution of portfolio transactions, J. Risk, 3, 5-39 (2001)
[4] Ba, J.L., Kiros, J.R. and Hinton, G.E., Layer normalization. 2016. arXiv preprint arXiv:1607.06450.
[5] Bertsimas, D.; Lo, A. W., Optimal control of execution costs, J. Financial Mark., 1, 1-50 (1998)
[6] Brent, R. P., Algorithms for Minimization Without Derivatives (1973), Prentice-Hall: Englewood Cliffs, NJ · Zbl 0245.65032
[7] Buehler, H.; Gonon, L.; Teichmann, J.; Wood, B., Deep hedging, Quant. Finance, 19, 1271-1291 (2019) · Zbl 1420.91450
[8] Buehler, H., Horvath, B., Lyons, T., Perez Arribas, I. and Wood, B., A data-driven market simulator for small data environments. 2020. Available at SSRN 3632431.
[9] Byrd, D., Hybinette, M. and Balch, T.H., ABIDES: Towards high-fidelity multi-agent market simulation. In Proceedings of the 2020 ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, pp. 11-22, 2020 (Association for Computing Machinery: New York, NY).
[10] Cartea, Á.; Jaimungal, S.; Penalva, J., Algorithmic and High-Frequency Trading (2015), Cambridge University Press: Cambridge: Cambridge University Press: Cambridge, UK · Zbl 1332.91001
[11] Cont, R.; De Larrard, A., Price dynamics in a Markovian limit order market, SIAM J. Financ. Math., 4, 1-25 (2013) · Zbl 1288.91092
[12] Cont, R.; Stoikov, S.; Talreja, R., A stochastic model for order book dynamics, Oper. Res., 58, 549-563 (2010) · Zbl 1232.91719
[13] Dixon, M., Sequence classification of the limit order book using recurrent neural networks, J. Comput. Sci., 24, 277-286 (2018)
[14] Doering, J., Fairbank, M. and Markose, S., Convolutional neural networks applied to high-frequency market microstructure forecasting. In 2017 9th Computer Science and Electronic Engineering Conference, CEEC 2017 - Proceedings, pp. 31-36, 2017 (IEEE: Colchester).
[15] Gers, F.A., Schmidhuber, J. and Cummins, F., Learning to forget: Continual prediction with LSTM. Neural Comput., 2000, 12, 2451-2471. .
[16] Gould, M. D.; Porter, M. A.; Williams, S.; McDonald, M.; Fenn, D. J.; Howison, S. D., Limit order books, Quant. Finance, 13, 1709-1742 (2013) · Zbl 1284.91584
[17] Graves, A., Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013.
[18] Graves, A., Mohamed, A.R. and Hinton, G., Speech recognition with deep recurrent neural networks. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 6645-6649, 2013 (IEEE: Vancouver, BC).
[19] Hochreiter, S.; Schmidhuber, J., Long short-term memory, Neural Comput., 9, 1735-1780 (1997)
[20] Horvath, B.; Muguruza, A.; Tomas, M., Deep learning volatility: A deep neural network perspective on pricing and calibration in (rough) volatility models, Quant. Finance, 21, 11-27 (2021) · Zbl 1479.91400
[21] Huang, W.; Lehalle, C. A.; Rosenbaum, M., Simulating and analyzing order book data: The queue-reactive model, J. Am. Stat. Assoc., 110, 107-122 (2015) · Zbl 1373.62519
[22] Huang, W.; Rosenbaum, M., Ergodicity and diffusivity of Markovian order book models: A general framework, SIAM J. Financ. Math., 8, 874-900 (2017) · Zbl 1407.91126
[23] Hult, H. and Kiessling, J., Algorithmic trading with Markov chains, 2010. Preprint. Available at: https://www.researchgate.net/publication/268032734_ALGORITHMIC_TRADING_WITH_MARKOV_CHAINS.
[24] Kercheval, A. N.; Zhang, Y., Modelling high-frequency limit order book dynamics with support vector machines, Quant. Finance, 15, 1315-1329 (2015) · Zbl 1406.91511
[25] Kingma, D.P. and Ba, J.L., Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, pp. 1-15, 2015 (ICLR: San Diego, CA).
[26] Kondratyev, A. and Schwarz, C., The market generator. 2019. Available at SSRN 3384948.
[27] Kondratyev, A.; Schwarz, C.; Horvath, B., Data anonymisation, outlier detection and fighting overfitting with restricted Boltzmann machines, SSRN Electron. J., 2020 (2020)
[28] Massey Jr, F. J., The Kolmogorov-Smirnov test for goodness of fit, J. Am. Stat. Assoc., 46, 68-78 (1951) · Zbl 0042.14403
[29] Muni Toke, I.; Yoshida, N., Modelling intensities of order flows in a limit order book, Quant. Finance, 17, 683-701 (2017) · Zbl 1402.91736
[30] Ntakaris, A.; Magris, M.; Kanniainen, J.; Gabbouj, M.; Iosifidis, A., Benchmark dataset for mid-price forecasting of limit order book data with machine learning methods, J. Forecast., 37, 852-866 (2018)
[31] Obizhaeva, A. A.; Wang, J., Optimal trading strategy and supply/demand dynamics, J. Finan. Mark., 16, 1-32 (2013)
[32] Oomen, R., Price signatures, Quant. Finance, 19, 733-761 (2019) · Zbl 1428.62465
[33] Parlour, C.A. and Seppi, D.J., Limit order markets: A survey. In Handbook of Financial Intermediation and Banking, Vol. 5, pp. 63-95, 2008 (Elsevier: Amsterdam).
[34] Passalis, N., Tsantekidis, A., Tefas, A., Kanniainen, J., Gabbouj, M. and Iosifidis, A., Time-series classification using neural bag-of-features. In Proceedings of the 2017 25th European Signal Processing Conference (EUSIPCO), pp. 301-305, 2017 (IEEE: Kos, Greece).
[35] Sadhwani, A.; Giesecke, K.; Sirignano, J., Deep learning for mortgage risk, J Financ. Econ., 19, 313-368 (2021)
[36] Sirignano, J. A., Deep learning for limit order books, Quant. Finance, 19, 549-570 (2019) · Zbl 1420.91555
[37] Sutskever, I., Vinyals, O. and Le, Q.V., Sequence to sequence learning with neural networks. In Proceedings of the Advances in Neural Information Processing Systems, pp. 3104-3112, 2014 (Curran Associates, Inc.: Montréal).
[38] Tsantekidis, A., Passalis, N., Tefas, A., Kanniainen, J., Gabbouj, M. and Iosifidis, A., Forecasting stock prices from the limit order book using convolutional neural networks. In Proceedings of the 2017 IEEE 19th Conference on Business Informatics (CBI), Vol. 1, pp. 7-12, 2017.
[39] Tsantekidis, A., Passalis, N., Tefas, A., Kanniainen, J., Gabbouj, M. and Iosifidis, A., Using deep learning to detect price change indications in financial markets. In Proceedings of the 2017 25th European Signal Processing Conference (EUSIPCO), pp. 2511-2515, 2017 (IEEE: Kos, Greece).
[40] Vyetrenko, S., Byrd, D., Petosa, N., Mahfouz, M., Dervovic, D., Veloso, M. and Balch, T., Get real: Realism metrics for robust limit order book market simulations. In Proceedings of the First ACM International Conference on AI in Finance, New York, NY, pp. 1-8, 2020 (Association for Computing Machinery: New York, NY).
[41] Wiese, M., Bai, L., Wood, B. and Buehler, H., Deep hedging: Learning to simulate equity option markets. In NeurIPS 2019 Workshop on Robust AI in Financial Services: Data, Fairness, Explainability, Trustworthiness, and Privacy, Vancouver, 2019.
[42] Wiese, M.; Knobloch, R.; Korn, R.; Kretschmer, P., Quant GANs: Deep generation of financial time series, Quant. Finance, 20, 1419-1440 (2020) · Zbl 1454.91366
[43] Zhang, Z.; Zohren, S.; Roberts, S., DeepLOB: Deep convolutional neural networks for limit order books, IEEE Trans. Signal. Process., 67, 3001-3012 (2019)
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.