Skip to main content
Top
Published in:

11-05-2023

A Novel Stock Trading Model based on Reinforcement Learning and Technical Analysis

Authors: Zahra Pourahmadi, Dariush Fareed, Hamid Reza Mirzaei

Published in: Annals of Data Science | Issue 5/2024

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

This study investigates the potential of using reinforcement learning (RL) to establish a financial trading system (FTS), taking into account the main constraint imposed by the stock market, e.g., transaction costs. More specifically, this paper shows the inferior performance of the pure reinforcement learning model when it is applied in a multi-dimensional and noisy stock market environment. To solve this problem and to get a practical and reasonable trading strategies process, a modified RL model is proposed based on the actor-critic method where we have amended the actor by incorporating three metrics from technical analysis. The results show significant improvement compared with traditional trading strategies. The reliability of the model is verified by experimental results on financial data (S&P500 index) and a fair evaluation of the proposed method and pure RL and three benchmarks is demonstrated. Statistical analysis proves that a combination of a) technical analysis (role-based strategies) and b) RL (machine learning strategies) and c) restricting the action of the RL policy network with a few realistic conditions results in trading decisions with higher investment return rates.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literature
1.
go back to reference Necchi PG (2016) Reinforcement learning for automated trading. Math Eng di Milano Milano, Italy pp 1–20 Necchi PG (2016) Reinforcement learning for automated trading. Math Eng di Milano Milano, Italy pp 1–20
2.
go back to reference Shi Y, Tian Y, Kou G, et al (2011) Optimization based data mining: theory and applications. Springer Science & Business Media Shi Y, Tian Y, Kou G, et al (2011) Optimization based data mining: theory and applications. Springer Science & Business Media
3.
go back to reference Tien JM (2017) Internet of things, real-time decision making, and artificial intelligence. Ann Data Sci 4:149–178CrossRef Tien JM (2017) Internet of things, real-time decision making, and artificial intelligence. Ann Data Sci 4:149–178CrossRef
4.
go back to reference Shi Y (2022) Advances in big data analytics: theory, algorithms and practices. Springer Nature Shi Y (2022) Advances in big data analytics: theory, algorithms and practices. Springer Nature
5.
go back to reference Olson DL, Shi Y, Shi Y (2007) Introduction to business data mining. McGraw-Hill/Irwin New York, New York Olson DL, Shi Y, Shi Y (2007) Introduction to business data mining. McGraw-Hill/Irwin New York, New York
6.
go back to reference Bishop CM, Nasrabadi NM (2006) Pattern recognition and machine learning, 4th ed. springer, New York Bishop CM, Nasrabadi NM (2006) Pattern recognition and machine learning, 4th ed. springer, New York
9.
go back to reference Ishikawa K, Nakata K (2021) Online trading models in the Forex market considering transaction costs. arXiv Prepr. arXiv2106.03035 Ishikawa K, Nakata K (2021) Online trading models in the Forex market considering transaction costs. arXiv Prepr. arXiv2106.03035
10.
go back to reference Li Y (2017) Deep reinforcement learning: an overview. arXiv Prepr arXiv170107274 1–85. Li Y (2017) Deep reinforcement learning: an overview. arXiv Prepr arXiv170107274 1–85.
12.
go back to reference Niaki STA, Hoseinzade S (2013) Forecasting S&P 500 index using artificial neural networks and design of experiments. J Ind Eng Int 9:1–9CrossRef Niaki STA, Hoseinzade S (2013) Forecasting S&P 500 index using artificial neural networks and design of experiments. J Ind Eng Int 9:1–9CrossRef
13.
go back to reference Schwager JD (2017) A complete guide to the futures market: technical analysis, trading systems, fundamental analysis, options, spreads, and trading principles. John Wiley and Sons Schwager JD (2017) A complete guide to the futures market: technical analysis, trading systems, fundamental analysis, options, spreads, and trading principles. John Wiley and Sons
14.
go back to reference Chan E (2009) Quantitative trading: how to build your own algorithmic trading business. John Wiley and Sons Chan E (2009) Quantitative trading: how to build your own algorithmic trading business. John Wiley and Sons
15.
go back to reference Michaud RO (1989) The Markowitz optimization enigma: Is ‘optimized’optimal? Financ Anal J 45:31–42CrossRef Michaud RO (1989) The Markowitz optimization enigma: Is ‘optimized’optimal? Financ Anal J 45:31–42CrossRef
16.
go back to reference Longstaff FA, Schwartz ES (2001) Valuing American options by simulation: a simple least-squares approach. Rev Financ Stud 14:113–147CrossRef Longstaff FA, Schwartz ES (2001) Valuing American options by simulation: a simple least-squares approach. Rev Financ Stud 14:113–147CrossRef
17.
go back to reference Tsitsiklis JN, Van Roy B (2001) Regression methods for pricing complex American-style options. IEEE Trans Neural Networks 12:694–703CrossRef Tsitsiklis JN, Van Roy B (2001) Regression methods for pricing complex American-style options. IEEE Trans Neural Networks 12:694–703CrossRef
18.
go back to reference Neuneier R (1998) Enhancing Q-learning for optimal asset allocation. In: Adv. Neural Inf. Process. Syst. pp 936–942 Neuneier R (1998) Enhancing Q-learning for optimal asset allocation. In: Adv. Neural Inf. Process. Syst. pp 936–942
19.
go back to reference Heaton JB, Polson NG, Witte JH (2017) Deep learning for finance: deep portfolios. Appl Stoch Model Bus Ind 33:3–12CrossRef Heaton JB, Polson NG, Witte JH (2017) Deep learning for finance: deep portfolios. Appl Stoch Model Bus Ind 33:3–12CrossRef
20.
go back to reference Atsalakis GS, Valavanis KP (2009) Surveying stock market forecasting techniques–part II: soft computing methods. Expert Syst Appl 36:5932–5941CrossRef Atsalakis GS, Valavanis KP (2009) Surveying stock market forecasting techniques–part II: soft computing methods. Expert Syst Appl 36:5932–5941CrossRef
21.
go back to reference Martinez LC, da Hora DN, Palotti JR de M, et al (2009) From an artificial neural network to a stock market day-trading system: a case study on the bm&f bovespa. In: 2009 Int. Jt. Conf. Neural Networks. IEEE, pp 2006–2013 Martinez LC, da Hora DN, Palotti JR de M, et al (2009) From an artificial neural network to a stock market day-trading system: a case study on the bm&f bovespa. In: 2009 Int. Jt. Conf. Neural Networks. IEEE, pp 2006–2013
22.
go back to reference Ding X, Zhang Y, Liu T, Duan J (2015) Deep learning for event-driven stock prediction. Twenty-fourth Int. Jt. Conf. Artif. Intell. Ding X, Zhang Y, Liu T, Duan J (2015) Deep learning for event-driven stock prediction. Twenty-fourth Int. Jt. Conf. Artif. Intell.
23.
go back to reference Akita R, Yoshihara A, Matsubara T, Uehara K (2016) Deep learning for stock prediction using numerical and textual information. In: 2016 IEEE/ACIS 15th Int. Conf. Comput. Inf. Sci. IEEE, pp 1–6 Akita R, Yoshihara A, Matsubara T, Uehara K (2016) Deep learning for stock prediction using numerical and textual information. In: 2016 IEEE/ACIS 15th Int. Conf. Comput. Inf. Sci. IEEE, pp 1–6
24.
go back to reference Chong E, Han C, Park FC (2017) Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst Appl 83:187–205CrossRef Chong E, Han C, Park FC (2017) Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst Appl 83:187–205CrossRef
25.
go back to reference Sutton RS (1984) Temporal credit assignment in reinforcement learning. University of Massachusetts Amherst Sutton RS (1984) Temporal credit assignment in reinforcement learning. University of Massachusetts Amherst
26.
go back to reference Won J, Lee JW (2001) Stock price prediction using reinforcement learning. In: ISIE 2001. 2001 IEEE Int. Symp. Ind. Electron. Proc. (Cat. No. 01TH8570). IEEE, pp 690–695 Won J, Lee JW (2001) Stock price prediction using reinforcement learning. In: ISIE 2001. 2001 IEEE Int. Symp. Ind. Electron. Proc. (Cat. No. 01TH8570). IEEE, pp 690–695
27.
go back to reference Lei K, Zhang B, Li Y et al (2020) Time-driven feature-aware jointly deep reinforcement learning for financial signal representation and algorithmic trading. Expert Syst Appl 140:112872CrossRef Lei K, Zhang B, Li Y et al (2020) Time-driven feature-aware jointly deep reinforcement learning for financial signal representation and algorithmic trading. Expert Syst Appl 140:112872CrossRef
28.
go back to reference Moody J, Wu L, Liao Y, Saffell M (1998) Performance functions and reinforcement learning for trading systems and portfolios. J Forecast 17:441–470CrossRef Moody J, Wu L, Liao Y, Saffell M (1998) Performance functions and reinforcement learning for trading systems and portfolios. J Forecast 17:441–470CrossRef
29.
go back to reference Moody J, Saffell M (2001) Learning to trade via direct reinforcement. IEEE Trans neural Networks 12:875–889CrossRef Moody J, Saffell M (2001) Learning to trade via direct reinforcement. IEEE Trans neural Networks 12:875–889CrossRef
30.
go back to reference Gao X, Chan L (2000) An algorithm for trading and portfolio management using Q-learning and sharpe ratio maximization. In: Proc. Int. Conf. neural Inf. Process. Citeseer, pp 832–837 Gao X, Chan L (2000) An algorithm for trading and portfolio management using Q-learning and sharpe ratio maximization. In: Proc. Int. Conf. neural Inf. Process. Citeseer, pp 832–837
31.
go back to reference Pendharkar PC, Cusatis P (2018) Trading financial indices with reinforcement learning agents. Expert Syst Appl 103:1–13CrossRef Pendharkar PC, Cusatis P (2018) Trading financial indices with reinforcement learning agents. Expert Syst Appl 103:1–13CrossRef
32.
go back to reference Wang Y, Wang D, Zhang S, et al (2017) Deep Q-trading. cslt. riit. tsinghua. edu. cn Wang Y, Wang D, Zhang S, et al (2017) Deep Q-trading. cslt. riit. tsinghua. edu. cn
33.
go back to reference Deng Y, Bao F, Kong Y et al (2016) Deep direct reinforcement learning for financial signal representation and trading. IEEE Trans neural networks Learn Syst 28:653–664CrossRef Deng Y, Bao F, Kong Y et al (2016) Deep direct reinforcement learning for financial signal representation and trading. IEEE Trans neural networks Learn Syst 28:653–664CrossRef
35.
go back to reference Tan Z, Quek C, Cheng PYK (2011) Stock trading with cycles: a financial application of ANFIS and reinforcement learning. Expert Syst Appl 38:4741–4755CrossRef Tan Z, Quek C, Cheng PYK (2011) Stock trading with cycles: a financial application of ANFIS and reinforcement learning. Expert Syst Appl 38:4741–4755CrossRef
36.
go back to reference Bertoluzzo F, Corazza M (2012) Testing different reinforcement learning configurations for financial trading: introduction and applications. Procedia Econ Financ 3:68–77CrossRef Bertoluzzo F, Corazza M (2012) Testing different reinforcement learning configurations for financial trading: introduction and applications. Procedia Econ Financ 3:68–77CrossRef
37.
go back to reference Jin O, El-Saawy H (2016) Portfolio management using reinforcement learning. Stanford Univ. Jin O, El-Saawy H (2016) Portfolio management using reinforcement learning. Stanford Univ.
38.
go back to reference Ritter G (2017) Machine learning for trading. Available SSRN 3015609 Ritter G (2017) Machine learning for trading. Available SSRN 3015609
39.
go back to reference Huang CY (2018) Financial trading as a game: a deep reinforcement learning approach. arXiv Prepr. arXiv1807.02787 Huang CY (2018) Financial trading as a game: a deep reinforcement learning approach. arXiv Prepr. arXiv1807.02787
40.
go back to reference Yuan Y, Wen W, Yang J (2020) Using data augmentation based reinforcement learning for daily stock trading. Electronics 9:1384CrossRef Yuan Y, Wen W, Yang J (2020) Using data augmentation based reinforcement learning for daily stock trading. Electronics 9:1384CrossRef
41.
go back to reference Vishal M, Satija Y, Babu BS (2021) Trading agent for the indian stock market scenario using Actor-Critic based reinforcement learning. In: 2021 IEEE Int. Conf. Comput. Syst. Inf. Technol. Sustain. Solut. IEEE, pp 1–5 Vishal M, Satija Y, Babu BS (2021) Trading agent for the indian stock market scenario using Actor-Critic based reinforcement learning. In: 2021 IEEE Int. Conf. Comput. Syst. Inf. Technol. Sustain. Solut. IEEE, pp 1–5
42.
go back to reference Wilder JW (1978) New concepts in technical trading systems. Trend Research Wilder JW (1978) New concepts in technical trading systems. Trend Research
43.
go back to reference Fawcett T (2006) An introduction to ROC analysis. Pattern Recognit Lett 27:861–874CrossRef Fawcett T (2006) An introduction to ROC analysis. Pattern Recognit Lett 27:861–874CrossRef
44.
go back to reference Granville JE (1976) Granville’s new strategy of daily stock market timing for maximum profit. Prentice-Hall Granville JE (1976) Granville’s new strategy of daily stock market timing for maximum profit. Prentice-Hall
45.
go back to reference Khaidem L, Saha S, Dey SR (2016) Predicting the direction of stock market prices using random forest. 1–20. Khaidem L, Saha S, Dey SR (2016) Predicting the direction of stock market prices using random forest. 1–20.
Metadata
Title
A Novel Stock Trading Model based on Reinforcement Learning and Technical Analysis
Authors
Zahra Pourahmadi
Dariush Fareed
Hamid Reza Mirzaei
Publication date
11-05-2023
Publisher
Springer Berlin Heidelberg
Published in
Annals of Data Science / Issue 5/2024
Print ISSN: 2198-5804
Electronic ISSN: 2198-5812
DOI
https://doi.org/10.1007/s40745-023-00469-1

Premium Partner