Sharia Stock Investment Decision Making Using the Deep Recurrent Q-Network Model

Sharia Stock Investment Decision Making Using the Deep Recurrent Q-Network Model

Authors

  • Jasmein Al-baar Putri Rus'an Department of Informatics, UIN Sunan Gunung Djati Bandung
  • Muhammad Zidan Department of Informatics, UIN Sunan Gunung Djati Bandung
  • Muhammad Arkan Raihan Department of Informatics, UIN Sunan Gunung Djati Bandung
  • Marleni Sukarya Department of Informatics, UIN Sunan Gunung Djati Bandung
  • Sendi Ahmad Rafiudin Department of Informatics, UIN Sunan Gunung Djati Bandung

DOI:

https://doi.org/10.15575/kjrt.v3i1.1706

Keywords:

Deep Reinforcement Learning, DRQN, Islamic Finance, Islamic Stocks, Reward Function, Trading

Abstract

This study aims to design and evaluate a Deep Recurrent Q-Network (DRQN) agent for automated trading decision-making on Islamic stocks, training it with daily historical price data from the Indonesian Islamic Stock Index (ISSI) and integrating a Long Short-Term Memory (LSTM) layer. Although the agent successfully learns a profitable strategy during the training phase, on unseen test data, it exhibits passive behavior by only choosing the 'hold' action, resulting in zero profit—a phenomenon known as policy stagnation. This finding indicates that the used reward function implicitly encourages excessive risk aversion. The study concludes that the success of the DRQN architecture relies heavily on sophisticated reward engineering, underscoring the need for future research on dynamic and adaptive reward mechanisms to develop robust and generalizable trading agents in the complex Islamic finance domain.

References

[1] T. Faturohman and T. Nugraha, “Islamic Stock Portfolio Optimization Using Deep Reinforcement Learning,” Journal of Islamic Monetary Economics and Finance, vol. 8, no. 2, pp. 181–200, May 2022, doi: 10.21098/jimf.v8i2.1430.

[2] T. Théate and D. Ernst, “An application of deep reinforcement learning to algorithmic trading,” Expert Syst Appl, vol. 173, p. 114632, Jul. 2021, doi: 10.1016/j.eswa.2021.114632.

[3] C. Y. Huang, “Financial Trading as a Game: A Deep Reinforcement Learning Approach,” Jul. 2018.

[4] B. Sohet, Y. Hayel, O. Beaude, and A. Jeandin, “Learning Pure Nash Equilibrium in Smart Charging Games,” Nov. 2021, doi: 10.1109/CDC42340.2020.9304486.

[5] Z. Ding, Y. Huang, H. Yuan, and H. Dong, “Introduction to Reinforcement Learning,” in Deep Reinforcement Learning, Singapore: Springer Singapore, 2020, pp. 47–123. doi: 10.1007/978-981-15-4095-0_2.

[6] J. L. Tan, B. A. Taha, N. A. Aziz, M. H. H. Mokhtar, M. Mukhlisin, and N. Arsad, “A Review of Reinforcement Learning Evolution: Taxonomy, Challenges and Emerging Solutions,” International Journal of Advanced Computer Science and Applications, vol. 16, no. 1, 2025, doi: 10.14569/IJACSA.2025.0160149.

[7] Y. Bai, Y. Gao, R. Wan, S. Zhang, and R. Song, “A Review of Reinforcement Learning in Financial Applications,” Nov. 2024.

[8] D. I. León Nieto, “Reinforcement learning for finance: A review,” ODEON, no. 24, pp. 7–24, Nov. 2023, doi: 10.18601/17941113.n24.02.

[9] A. Mohammadshafie, A. Mirzaeinia, H. Jumakhan, and A. Mirzaeinia, “Deep Reinforcement Learning Strategies in Finance: Insights into Asset Holding, Trading Behavior, and Purchase Diversity,” Jun. 2024.

[10] E. Mienye, N. Jere, G. Obaido, I. D. Mienye, and K. Aruleba, “Deep Learning in Finance: A Survey of Applications and Techniques,” AI, vol. 5, no. 4, pp. 2066–2091, Oct. 2024, doi: 10.3390/ai5040101.

[11] P. Yu, J. S. Lee, I. Kulyatin, Z. Shi, and S. Dasgupta, “Model-based Deep Reinforcement Learning for Dynamic Portfolio Optimization,” Jan. 2019.

[12] X. Jiang, “Comparison of Deep Reinforcement Learning Algorithms for Trading Strategy,” 2024, pp. 4–14. doi: 10.2991/978-94-6463-370-2_2.

[13] D. Saepudin and K. Rauf, “Application of Deep Reinforcement Learning for Stock Trading on The Indonesia Stock Exchange,” Jurnal Nasional Pendidikan Teknik Informatika (JANAPATI), vol. 14, no. 1, pp. 144–157, Mar. 2025, doi: 10.23887/janapati.v14i1.83775.

[14] M. Kong and J. So, “Empirical Analysis of Automated Stock Trading Using Deep Reinforcement Learning,” Applied Sciences, vol. 13, no. 1, p. 633, Jan. 2023, doi: 10.3390/app13010633.

[15] H. Yang, X. Y. Liu, S. Zhong, and A. Walid, “Deep reinforcement learning for automated stock trading: An ensemble strategy,” in ICAIF 2020 - 1st ACM International Conference on AI in Finance, Association for Computing Machinery, Inc, Oct. 2020. doi: 10.1145/3383455.3422540.

[16] S. Ouf, M. El Hawary, A. Aboutabl, and S. Adel, “A Deep Learning-Based LSTM for Stock Price Prediction Using Twitter Sentiment Analysis,” International Journal of Advanced Computer Science and Applications, vol. 15, no. 12, 2024, doi: 10.14569/IJACSA.2024.0151223.

[17] A. Sarkar and G. Vadivu, “An Advanced Ensemble Deep Learning Framework for Stock Price Prediction Using VAE, Transformer, and LSTM Model,” Mar. 2025.

[18] X. Chen, Q. Wang, L. Yuxin, C. Hu, C. Wang, and Q. Yan, “Stock Price Forecast Based on Dueling Deep Recurrent Q-network,” in 2023 IEEE 6th International Conference on Pattern Recognition and Artificial Intelligence (PRAI), IEEE, Aug. 2023, pp. 1091–1096. doi: 10.1109/PRAI59366.2023.10332127.

[19] F. Sarlakifar, M. M. Asl, S. R. Khaledi, and A. Salimi-Badr, “A Deep Reinforcement Learning Approach to Automated Stock Trading, using xLSTM Networks,” Mar. 2025.

[20] M. S. Iqbal, F. A. M. S. B. Sukamto, S. N. B. Norizan, S. Mahmood, A. Fatima, and F. Hashmi, “AI in Islamic finance: Global trends, ethical implications, and bibliometric insights,” Review of Islamic Social Finance and Entrepreneurship, pp. 70–85, Mar. 2025, doi: 10.20885/RISFE.vol4.iss1.art6.

[21] Rajesh Dey, “Applications of Machine Learning in Islamic Finance,” Journal of Information Systems Engineering and Management, vol. 10, no. 26s, pp. 794–804, Mar. 2025, doi: 10.52783/jisem.v10i26s.4286.

[22] E. R. Kismawadi, M. Irfan, and I. Harahap, “Integrating Artificial Intelligence in Islamic Financial Management: Opportunities and Challenges in Maintaining Shariah Compliance,” in Indigenous Empowerment through Human-Machine Interactions, Emerald Publishing Limited, 2025, pp. 273–288. doi: 10.1108/978-1-83608-068-820251016.

[23] M. M. Uula and S. F. M. Kassim, “Machine Learning in Islamic Finance,” Islamic Economics Methodology, vol. 3, no. 2, Feb. 2025, doi: 10.58968/iem.v3i2.595.

[24] B. Charoenwong, “Shariah-Compliant Investing in the Machine Age: Equity Classifications with Machine Learning,” SSRN Electronic Journal, 2023, doi: 10.2139/ssrn.4611253.

[25] I. B. Adeyemi and Ö. F. Tekdoğan, “Understanding the Screening Criteria for Shariah-Compliant Stocks,” Adam Akademi Sosyal Bilimler Dergisi, vol. 14, no. 2, pp. 371–395, Dec. 2024, doi: 10.31679/adamakademi.1415744.

[26] H. Shalhoob, “The role of AI in enhancing shariah compliance: Efficiency and transparency in Islamic finance,” Journal of Infrastructure, Policy and Development, vol. 9, no. 1, p. 11239, Jan. 2025, doi: 10.24294/jipd11239.

[27] H. Shalhoob, “The role of AI in enhancing shariah compliance: Efficiency and transparency in Islamic finance,” Journal of Infrastructure, Policy and Development, vol. 9, no. 1, p. 11239, Jan. 2025, doi: 10.24294/jipd11239.

[28] H. Shalhoob and I. Babiker, “Exploration of AI in Ensuring Sharia Compliance in IF Institutions: Focus on Accounting Practices,” Open Journal of Business and Management, vol. 13, no. 02, pp. 1435–1448, 2025, doi: 10.4236/ojbm.2025.132075.

[29] “Global Islamic Fintech Report,” 2024.

[30] M. S. Iqbal, F. A. M. S. B. Sukamto, S. N. B. Norizan, S. Mahmood, A. Fatima, and F. Hashmi, “AI in Islamic finance: Global trends, ethical implications, and bibliometric insights,” Review of Islamic Social Finance and Entrepreneurship, pp. 70–85, Mar. 2025, doi: 10.20885/RISFE.vol4.iss1.art6.

[31] Y. Bai, Y. Gao, R. Wan, S. Zhang, and R. Song, “A Review of Reinforcement Learning in Financial Applications,” Nov. 2024.

[32] Y. Huang, C. Zhou, L. Zhang, and X. Lu, “A Self-Rewarding Mechanism in Deep Reinforcement Learning for Trading Strategy Optimization,” Mathematics, vol. 12, no. 24, p. 4020, Dec. 2024, doi: 10.3390/math12244020.

Downloads

Published

2025-07-17

Issue

Section

Articles
Loading...