Abstract
In this paper, we consider the approach of applying state-of-the-art machine learning algorithms to simulate some financial markets. In this case, we choose the cryptocurrency market based on the assumption that such markets more active today. As a rule, they have more volatility, attracting riskier traders. Considering classic trading strategies, we also introduce an agent with a self-learning strategy. To model the behavior of such agent, we use deep reinforcement learning algorithms, namely Deep Deterministic policy gradient. Next, we develop an agent-based model with following strategies. With this model, we will be able to evaluate the main market statistics, named stylized-facts. Finally, we conduct a comparative analysis of results for constructed model with outcomes of previously proposed models, as well as with the characteristics of real market. As a result, we conclude that our model with a self-learning agent gives a better approximation to the real market than a model with classical agents. In particular, unlike the model with classical agents, the model with a self-learning agent turns out to be not so heavy-tailed. Thus, we demonstrate that for a complete understanding of market processes simulation models should take into account self-learning agents that have a significant presence at modern stock markets.
Similar content being viewed by others
References
Aguirre, A. A. A., Medina, R. A. R., & Méndez, N. D. D. (2020). Machine learning applied in the stock market through the moving average convergence divergence (macd) indicator. Investment Management & Financial Innovations, 17(4), 44.
Aldrich, E. M., & López Vargas, K. (2019). Experiments in high-frequency trading: Comparing two market institutions. Experimental Economics, 23, 322–352. https://doi.org/10.1007/s10683-019-09605-2
Appel, G., & Dobson, E. (2007). Understanding MACD (Vol. 34). Traders Press.
Balvers, R. J., & Wu, Y. (2006). Momentum and mean reversion across national equity markets. Journal of Empirical Finance, 13(1), 24–48. https://doi.org/10.1016/j.jempfin.2005.05.001
Christoffersen, P. (2012). Elements of financial risk management. Academic Press. https://doi.org/10.1016/B978-0-12-374448-7.00008-7
Cont, R. (2001). Empirical properties of asset returns: stylized facts and statistical issues. Quantitative Finance, 1(2), 223–236. https://doi.org/10.1080/713665670
Gal´an, J. M., Izquierdo, L. R., Izquierdo, S. S., Santos, J. I., del Olmo, R., L´opez-Paredes, A., & Edmonds, B. (2009). Errors and artefacts in agent-based modelling. Journal of Artificial Societies and Social Simulation, 12(1), 1.
Grilli, R., & Tedeschi, G. (2016). Modeling financial markets in an agent-based framework. Economics with Heterogeneous Interacting Agents, 1, 03–155. https://doi.org/10.1007/978-3-319-44058-3_3
He, S., & Ibragimov, R. (2022). Predictability of cryptocurrency returns: Evidence from robust tests. Dependence Modeling. https://doi.org/10.1515/demo-2022-0111
Hill, B. M. (1975). A simple general approach to inference about the tail of the distribution. The Annals of Statistics, 3(6), 1163–1174. https://doi.org/10.1088/1469-7688/3/6/307
Huber, J., Kleinlercher, D., & Kirchler, M. (2012). The impact of a financial transaction tax on stylized facts of price returns—evidence from the lab. Journal of Economic Dynamics Control, 36, 1248–1266. https://doi.org/10.1016/j.jedc.2012.03.011
Li, S., Wu, Y., Cui, X., Dong, H., Fang, F., & Russell, S. (2019).Robust multi-agent reinforcement learning via minimax deep deterministic policy gradient, vol. 33. https://doi.org/10.1609/aaai.v33i01.33014213
Lillicrap, T.P., Hunt, J.J., Pritzel, A., Heess, N., Erez, T., Tassa, Y., Silver, D., Wierstra, D.: Continuous control with deep reinforcement learning. arXiv:1509.02971 (2015). https://doi.org/10.48550/ARXIV.1509.02971
Mansurov, K., Semenov, A., Grigoriev, D., Radionov, A., & Ibragimov, R. (2022). Impact of self-learning based high-frequency traders on the stock market. Expert Systems with Applications. https://doi.org/10.1609/aaai.v33i01.33014213
Marie, K., & Resnick, S. I. (1996). The qq-estimator and heavy tails. Communications in Statistics. Stochastic Models, 12, 366. https://doi.org/10.1080/15326349608807407
McGroarty, F., Booth, A., & Gerding, E. E. A. (2019). High frequency trading strategies, market fragility and price spikes: an agent based model perspective. Annals of Operations Research, 282, 217–244. https://doi.org/10.1007/s10479-018-3019-4
Oesch, C.: An agent-based model for market impact. In: 2014 IEEE conference on computational intelligence for financial engineering economics (CIFEr), pp. 17–24 (2014). https://doi.org/10.1109/CIFEr.2014.6924049
Packer, C., Gao, K., Kos, J., Krähenbühl, P., Koltun, V., Song, D.: Assessing generalizationin deep reinforcement learning 17 (2019). https://doi.org/10.48550/arXiv.1810.12282
Plerou, V., & Stanley, H. E. (2008). Stock return distributions: Tests of scaling and universality from three distinct stock markets. Physical Review E, 77, 037101. https://doi.org/10.1103/PhysRevE.77.037101
Ponta, L., & Cincotti, S. (2018). Traders’ networks of interactions and structural properties of financial markets: An agent-based approach. Complexity. https://doi.org/10.1155/2018/9072948
Rosu, I. (2009). A dynamic model of the limit order book. The Review of Financial Studies, 22(11), 4601–4641.
Rosillo, R., De la Fuente, D., & Brugos, J. A. L. (2013). Technical analysis and the spanish stock exchange: Testing the RSI, MACD, momentum and stochastic rules using spanish market companies. Applied Economics, 45(12), 1541–1550.
Samanidou, E., Zschischang, E., Stauffer, D., & Lux, T. (2007). Agent-based models of financial markets. Reports on Progress in Physics. https://doi.org/10.1088/0034-4885/70/3/R03
Serban, A. F. (2010). Combining mean reversion and momentum trading strategies in foreign exchange markets. Journal of Banking Finance, 34, 2720–2727. https://doi.org/10.1016/j.jbankfin.2010.05.011
Sharma, J., Andersen, P.-A., Granmo, O.-C., & Goodwin, M. (2021). Deep qlearning with q-matrix transfer learning for novel fire evacuation environment. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 51(12), 7363–7381. https://doi.org/10.1109/TSMC.2020.2967936
Smith, E., Farmer, J. D., Gillemot, L., & Krishnamurthy, S. (2003). Statistical theory of the continuous double auction. Quantitative Finance, 3(6), 481–514. https://doi.org/10.1088/1469-7688/3/6/307
Tsang, W. W. H., Chong, T. T. L., et al. (2009). Profitability of the on-balance volume indicator. Economics Bulletin, 29(3), 2424–2431.
Wagner, F. (2005). Estimation of agent-based models: The case of an asymmetric herding model. Computational Economics. https://doi.org/10.1007/s10614-005-6415-1
Acknowledgements
Financial support from the Saint-Petersburg University, Russia (D. Grigoriev and K. Mansurov, project ID: 101748259) and the Russian Science Foundation (R. Ibragimov, Project No. 20-18-00365) for various and non-overlapping parts of this research is gratefully acknowledged.
Funding
The authors have not disclosed any funding.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing interests
The authors have not disclosed any competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Mansurov, K., Semenov, A., Grigoriev, D. et al. Cryptocurrency Exchange Simulation. Comput Econ (2024). https://doi.org/10.1007/s10614-023-10495-z
Accepted:
Published:
DOI: https://doi.org/10.1007/s10614-023-10495-z