Abstract
This study proposes a new model to reverse engineer and predict traders’ behavior for the financial market. This trial is essential to build a more reliable simulation because the reliability of models is a fundamental issue in the increasing use of simulations. Thus, we tried to build a behavior model of financial traders through the traders’ future action predicting using the actual order data. This study focused on one category of traders employing high-frequency market-making (HFT-MM) trading in financial markets. In our experiments, we build models for predicting the next actions of each trader and evaluate how correctly these models successfully predict trades’ future actions in the next one minutes. Although the task is the same as previous work, this study newly used an architecture based on the transformer and residual block, and a loss function based on the Kullback-Leibler divergence (KLD). In addition, we established a new evaluation metric. Consequently, our new models, both transformer-based and residual-block-based models, outperformed the previous model based on LSTM in terms of both old and new evaluation metrics. These results suggested that transformer and residual block are effective in capturing traders’ behaviors. In addition, the KLD-based new loss function also showed better results than the previous MSE-based loss function. We assumed it is because the KLD-based loss function has a better fitting to this task due to its mathematical form.
Similar content being viewed by others
Notes
In fact, the JSD is not used for GAN learning; usually, cross-entropy is used. Note that the JSD is used not for the loss function but for theoretical discussion.
This is our fictional name. In NLP, BERT often refers to a language model. However, ironically, there is no connotation of a language model in its abbreviation.
References
Arjovsky, M., Bottou, L.: Towards principled methods for training generative adversarial networks. In: 5th international conference on learning representations (2019). arXiv:1701.04862
Arjovsky, M., Chintala, S., Bottou, L.: Wasserstein GAN (2017). arXiv:1701.07875
Avellaneda, M., Stoikov, S.: High-frequency trading in a limit order book. Quant. Finance 8(3), 217–224 (2008). https://doi.org/10.1080/14697680701381228
Ba, J.L., Kiros, J.R., Hinton, G.E.: Layer Normalization (2016). arXiv:1607.06450
Battiston, S., Farmer, J.D., Flache, A., Garlaschelli, D., Haldane, A.G., Heesterbeek, H., Hommes, C., Jaeger, C., May, R., Scheffer, M.: Complexity theory and financial regulation: economic policy needs interdisciplinary network analysis and behavioral modeling. Science 351(6275), 818–819 (2016). https://doi.org/10.1126/science.aad0299
Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: pre-training of Deep Bidirectional Transformers for Language Understanding (2018). arXiv:1810.04805
Dixon, M.F., Polson, N.G., Sokolov, V.O.: Deep learning for spatio-temporal modeling: Dynamic traffic flows and high frequency trading. Quant. Finance 19(4), 549–570 (2019). https://doi.org/10.1002/asmb.2399
Edmonds, S.M., Bruce: towards good social science. J. Artif. Soc. Soc. Simul. 8(4) (2005). https://jasss.soc.surrey.ac.uk/8/4/13.html
Farmer, J.D., Foley, D.: The economy needs agent-based modelling. Nature 460(7256), 685–686 (2009). https://doi.org/10.1038/460685a
Goodfellow, I.J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial nets. In: advances in neural information processing systems, 3, 2672–2680 (2014). https://proceedings.neurips.cc/paper/2014/hash/5ca3e9b122f61f8f06494c97b1afccf3-Abstract.html
He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: proceedings of the IEEE computer society conference on computer vision and pattern recognition, pp. 770–778. IEEE computer society (2016). https://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_ CVPR_2016_paper.html
Hirano, M., Izumi, K., Matsushima, H., Sakaji, H.: Comparing actual and simulated HFT traders’ behavior for agent design. J. Artif. Soc. Soc. Simul. 23(3) (2020). https://doi.org/10.18564/jasss.4304
Hirano, M., Matsushima, H., Izumi, K., Sakaji, H.: STBM: stochastic trading behavior model for financial markets. In: Yada, K., et al. (eds.) Advances in Artificial Intelligence. JSAI 2020. Advances in Intelligent Systems and Computing, vol. 1357. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-73113-7_14
Hochreiter, S., Schmidhuber, J.: Long Short-Term Memory. Neural Comput. 9(8), 1735–1780 (1997). https://doi.org/10.1162/neco.1997.9.8.1735
Kercheval, A.N., Zhang, Y.: Modelling high-frequency limit order book dynamics with support vector machines. Quant. Finance 15(8), 1315–1329 (2015). https://doi.org/10.1080/14697688.2015.1032546
Kim, K.: Financial time series forecasting using support vector machines. Neurocomputing 55, 307–319 (2003). https://doi.org/10.1016/S0925-2312(03)00372-2
Kullback, S., Leibler, R.A.: On information and sufficiency. Ann. Mathe. Stat. 22(1), 79–86 (1951). https://www.jstor.org/stable/2236703
Lux, T., Marchesi, M.: Scaling and criticality in a stochastic multi-agent model of a financial market. Nature 397(6719), 498–500 (1999). https://doi.org/10.1038/17290
Mizuta, T.: An agent-based model for designing a financial market that works well (2019). arXiv:1906.06000
Mizuta, T., Kosugi, S., Kusumoto, T., Matsumoto, W., Izumi, K., Yagi, I., Yoshimura, S.: Effects of Price Regulations and Dark Pools on Financial Market Stability: An Investigation by Multiagent Simulations. Intel. Syst. Acc. Finance Manag. 23(1–2), 97–120 (2016). https://doi.org/10.1002/isaf.1374
Nagumo, S., Shimada, T., Yoshioka, N., Ito, N.: The effect of tick size on trading volume share in two competing stock markets. J. Phys. Soc. Japn. 86(1), 12 (2017). https://doi.org/10.7566/JPSJ.86.014801
Nanex: nanex - market crop circle of the day (2010). http://www.nanex.net/FlashCrash/CCircleDay.html
Sirignano, J.A.: Deep learning for limit order books. Quant. Finance 19(4), 549–570 (2019). https://doi.org/10.1080/14697688.2018.1546053
Tashiro, D., Matsushima, H., Izumi, K., Sakaji, H.: Encoding of high-frequency order information and prediction of short-term stock price by deep learning. Quant. Finance 19(9), 1499–1506 (2019). https://doi.org/10.1080/14697688.2019.1622314
Torii, T., Izumi, K., Yamada, K.: Shock transfer by arbitrage trading: analysis using multi-asset artificial market. Evolut. Instit. Econ. Rev. 12(2), 395–412 (2015). https://doi.org/10.1007/s40844-015-0024-z
Tsantekidis, A., Passalis, N., Tefas, A., Kanniainen, J., Gabbouj, M., Iosifidis, A.: Using deep learning to detect price change indications in financial markets. In: proceedings of the 25th european signal processing conference, pp. 2580–2584 (2017). https://doi.org/10.23919/EUSIPCO.2017.8081663
Uno, J., Goshima, K., Tobe, R.: Cluster Analysis of Trading Behavior: An Attempt to Extract HFT [in Japanese]. In: The 12th Annual Conference of Japanese Association of Behavioral Economics and Finance (2018)
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I.: Attention is all you need. In: Advances in Neural Information Processing Systems, pp. 5999–6009 (2017). arXiv:1706.03762
Wang, J., Sun, T., Liu, B., Cao, Y., Zhu, H.: CLVSA: A convolutional LSTM based variational sequence-to-sequence model with attention for predicting trends of financial markets. In: proceedings of the twenty-Eighth international joint conference on artificial intelligence (IJCAI-19), pp. 3705–3711 (2019). https://doi.org/10.24963/ijcai.2019/514
Zhang, L., Aggarwal, C., Qi, G.J.: Stock price prediction via discovering multi-Frequency trading patterns. In: proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, 2141–2149 (2017). https://doi.org/10.1145/3097983.3098117
Acknowledgements
We thank the Japan Exchange Group, Inc. for providing the data. This research was supported by MEXT via Exploratory Challenges on Post-K computer (study on multilayered multiscale space-time simulations for social and economic phenomena) and JSPS KAKENHI Grant Number JP 21J20074 (Grant-in-Aid for JSPS Fellows). This research also used the computational resources of the HPCI system provided by the Information Technology Center at The University of Tokyo, and the Joint Center for Advanced High Performance Computing (JCAHPC) through the HPCI System Research Project (Project ID: hp190150).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflicts of interest
The authors have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Hirano, M., Izumi, K. & Sakaji, H. STBM+: Advanced Stochastic Trading Behavior Model for Financial Markets using Residual Blocks or Transformers. New Gener. Comput. 40, 7–24 (2022). https://doi.org/10.1007/s00354-021-00145-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00354-021-00145-z