{"title":"Deep Reinforcement Learning Approach for Trading Automation in the Stock Market","authors":"Taylan Kabbani, Ekrem Duman","volume":190,"journal":"International Journal of Computer and Information Engineering","pagesStart":441,"pagesEnd":451,"ISSN":"1307-6892","URL":"https:\/\/publications.waset.org\/pdf\/10012717","abstract":"<p>Deep Reinforcement Learning (DRL) algorithms can scale to previously intractable problems. The automation of profit generation in the stock market is possible using DRL, by combining&nbsp; the financial assets price \u201dprediction\u201d step and the \u201dallocation\u201d step of the portfolio in one unified process to produce fully autonomous systems capable of interacting with its environment to make optimal decisions through trial and error. This work represents a DRL model to generate profitable trades in the stock market, effectively overcoming the limitations of supervised learning approaches. We formulate the trading problem as a Partially observed Markov Decision Process (POMDP) model, considering the constraints imposed by the stock market, such as liquidity and transaction costs. We then solved the formulated POMDP problem using the Twin Delayed Deep Deterministic Policy Gradient (TD3) algorithm and achieved a 2.68 Sharpe ratio on the test dataset. From the point of view of stock market forecasting and the intelligent decision-making mechanism, this paper demonstrates the superiority of DRL in financial markets over other types of machine learning and proves its credibility and advantages of strategic decision-making.<\/p>","references":"[1] J. Patel, S. Shah, P. Thakkar, and K. Kotecha, \u201cPredicting stock and\r\nstock price index movement using trend deterministic data preparation and\r\nmachine learning techniques,\u201d Expert Systems with Applications, vol. 42,\r\nno. 1, pp. 259\u2013268, 2015.\r\n[2] A. Tsantekidis, N. Passalis, A. Tefas, J. Kanniainen, M. Gabbouj,\r\nand A. Iosifidis, \u201cForecasting stock prices from the limit order book\r\nusing convolutional neural networks,\u201d in 2017 IEEE 19th Conference on\r\nBusiness Informatics (CBI), vol. 01, pp. 7\u201312, 2017.\r\n[3] A. Ntakaris, J. Kanniainen, M. Gabbouj, and A. Iosifidis, \u201cMid-price\r\nprediction based on machine learning methods with technical and\r\nquantitative indicators,\u201d PLOS ONE, vol. 15, pp. 1\u201339, 06 2020.\r\n[4] Y. Hao and Q. Gao, \u201cPredicting the trend of stock market index using\r\nthe hybrid neural network based on multiple time scale feature learning,\u201d\r\nApplied Sciences, vol. 10, no. 11, 2020.\r\n[5] M. M. L. de Prado, \u201cThe 10 reasons most machine learning funds fail,\u201d\r\nWGSRN: Data Collection & Empirical Methods (Topic), 2018.\r\n[6] T. L. Meng and M. Khushi, \u201cReinforcement learning in financial markets,\u201d\r\nData, vol. 4, no. 3, 2019.\r\n[7] M. L. Puterman, Markov decision processes: discrete stochastic dynamic\r\nprogramming. John Wiley & Sons, 2010.\r\n[8] S. Chakraborty, \u201cCapturing financial markets to apply deep reinforcement\r\nlearning,\u201d 2019.\r\n[9] M. R. Vargas, C. E. M. dos Anjos, G. L. G. Bichara, and A. G. Evsukoff,\r\n\u201cDeep leaming for stock market prediction using technical indicators and\r\nfinancial news articles,\u201d in 2018 International Joint Conference on Neural\r\nNetworks (IJCNN), pp. 1\u20138, 2018.\r\n[10] M. Corazza and F. Bertoluzzo, \u201cQ-learning-based financial trading\r\nsystems with applications,\u201d Working Papers 2014:15, Department of\r\nEconomics, University of Venice \u201dCa\u2019 Foscari\u201d, 2014.\r\n[11] Z. Tan, C. Quek, and P. Y. Cheng, \u201cStock trading with cycles: A financial\r\napplication of anfis and reinforcement learning,\u201d Expert Systems with\r\nApplications, vol. 38, no. 5, pp. 4741\u20134755, 2011.\r\n[12] Y. Deng, F. Bao, Y. Kong, Z. Ren, and Q. Dai, \u201cDeep direct\r\nreinforcement learning for financial signal representation and trading,\u201d\r\nIEEE Transactions on Neural Networks and Learning Systems, vol. 28,\r\nno. 3, pp. 653\u2013664, 2017.\r\n[13] O. Alagoz, H. Hsu, A. J. Schaefer, and M. S. Roberts, \u201cMarkov decision\r\nprocesses: A tool for sequential decision making under uncertainty,\u201d\r\nMedical Decision Making, vol. 30, no. 4, p. 474\u2013483, 2009.\r\n[14] R. S. Sutton, F. Bach, and A. G. Barto, Reinforcement Learning: An\r\nIntroduction. MIT Press Ltd, 2018.\r\n[15] R. E. Bellman, Dynamic programming. Princeton University Press,\r\n2010.\r\n[16] V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou,\r\nD. Wierstra, and M. Riedmiller, \u201cPlaying atari with deep reinforcement\r\nlearning,\u201d 2013.\r\n[17] V. Mnih, K. Kavukcuoglu, D. Silver, A. Rusu, J. Veness, M. Bellemare,\r\nA. Graves, M. Riedmiller, A. Fidjeland, G. Ostrovski, S. Petersen,\r\nC. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra,\r\nS. Legg, and D. Hassabis, \u201cHuman-level control through deep\r\nreinforcement learning,\u201d Nature, vol. 518, pp. 529\u201333, 02 2015.\r\n[18] H. van Hasselt, A. Guez, and D. Silver, \u201cDeep reinforcement learning\r\nwith double q-learning,\u201d CoRR, vol. abs\/1509.06461, 2015.\r\n[19] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa,\r\nD. Silver, and D. Wierstra, \u201cContinuous control with deep reinforcement\r\nlearning,\u201d 2019.\r\n[20] S. Fujimoto, H. van Hoof, and D. Meger, \u201cAddressing function\r\napproximation error in actor-critic methods,\u201d CoRR, vol. abs\/1802.09477,\r\n2018.\r\n[21] F. Bertoluzzo and M. Corazza, \u201cTesting different reinforcement learning\r\nconfigurations for financial trading: Introduction and applications,\u201d\r\nProcedia Economics and Finance, vol. 3, pp. 68\u201377, 2012. International\r\nConference Emerging Markets Queries in Finance and Business, Petru\r\nMaior University of T\u02c6\u0131rgu-Mures, ROMANIA, October 24th - 27th, 2012.\r\n[22] L. Conegundes and A. C. M. Pereira, \u201cBeating the stock market with a\r\ndeep reinforcement learning day trading system,\u201d in 2020 International\r\nJoint Conference on Neural Networks (IJCNN), pp. 1\u20138, 2020.\r\n[23] C. Kirkpatrick and J. R. Dahlquist, \u201cTechnical analysis: The complete\r\nresource for financial market technicians,\u201d 2006. [24] J. R. Nofsinger, \u201cThe impact of public information on investors,\u201d Journal\r\nof Banking & Finance, vol. 25, no. 7, pp. 1339\u20131366, 2001.\r\n[25] Z. Xiong, X.-Y. Liu, S. Zhong, H. Yang, and A. Walid, \u201cPractical deep\r\nreinforcement learning approach for stock trading,\u201d 2018.\r\n[26] \u201cInvestopedia \u2013 slippage definition.\u201d https:\/\/www.investopedia.com\/\r\nterms\/s\/slippage.asp. [Online; accessed 02-October-2021].\r\n[27] Z. Jiang, D. Xu, and J. Liang, \u201cA deep reinforcement learning framework\r\nfor the financial portfolio management problem,\u201d 2017.\r\n[28] A. Akhmetzyanov, R. Yagfarov, S. Gafurov, M. Ostanin, and\r\nA. Klimchik, \u201cContinuous control in deep reinforcement learning with\r\ndirect policy derivation from q network,\u201d in Human Interaction, Emerging\r\nTechnologies and Future Applications II, (Cham), pp. 168\u2013174, Springer\r\nInternational Publishing, 2020.\r\n[29] T. T.-L. Chong, W.-K. Ng, and V. K.-S. Liew, \u201cRevisiting the\r\nperformance of macd and rsi oscillators,\u201d Journal of Risk and Financial\r\nManagement, vol. 7, no. 1, pp. 1\u201312, 2014.\r\n[30] J. Granville, Granville\u2019s New Key to Stock Market Profits. Papamoa\r\nPress, 2018.\r\n[31] X. Ding, Y. Zhang, T. Liu, and J. Duan, \u201cUsing structured events to\r\npredict stock price movement: An empirical investigation,\u201d in Proceedings\r\nof the 2014 Conference on Empirical Methods in Natural Language\r\nProcessing (EMNLP), (Doha, Qatar), pp. 1415\u20131425, Association for\r\nComputational Linguistics, Oct. 2014.\r\n[32] D. Araci, \u201cFinbert: Financial sentiment analysis with pre-trained\r\nlanguage models,\u201d 2019.\r\n[33] \u201cYahoo finance.\u201d https:\/\/finance.yahoo.com\/.\r\n[34] G. Manoim, \u201cexchange-calendars.\u201d https:\/\/pypi.org\/project\/\r\nexchange-calendars\/.\r\n[35] \u201cKaggle \u2013 daily financial news for 6000+ stocks.\u201d https:\/\/www.kaggle.\r\ncom\/miguelaenlle\/massive-stock-news-analysis-db-for-nlpbacktests.\r\n[Online; accessed 15-November-2021].\r\n[36] \u201cKaggle \u2013 sun, j. (2016, august). daily news for stock market\r\nprediction.\u201d https:\/\/www.kaggle.com\/aaron7sun\/stocknews. [Online;\r\naccessed 15-November-2021].\r\n[37] P. Henderson, R. Islam, P. Bachman, J. Pineau, D. Precup, and D. Meger,\r\n\u201cDeep reinforcement learning that matters,\u201d 2019.\r\n[38] W. F. Sharpe, \u201cThe sharpe ratio,\u201d The Journal of Portfolio Management,\r\nvol. 21, no. 1, pp. 49\u201358, 1994.\r\n[39] S. Kau, \u201cAlgorithmic trading using reinforcement learning augmented\r\nwith hidden markov model. working paper, stanford university.,\u201d 2017.","publisher":"World Academy of Science, Engineering and Technology","index":"Open Science Index 190, 2022"}