Perbandingan Metode Q-Learning Dan SARSA Dalam Optimasi Prediksi Tren Saham Pada Indeks Harga Saham Gabungan (IDX)
DOI:
https://doi.org/10.37859/jf.v15i3.10596
Abstract
This study evaluates the performance of Reinforcement Learning algorithms, namely Q-Learning and SARSA, in generating automated trading strategies for the Indonesian stock market. The research is motivated by the high volatility and uncertainty of stock price movements, which require adaptive decision-making methods. The dataset consists of historical stock price data from five companies listed on the Indonesia Stock Exchange (BBCA, BBRI, TLKM, UNVR, and ASII), obtained using the yfinance library and simulated through 1,000 trading episodes. Performance evaluation was conducted based on reward trends, equity curve patterns, and final performance statistics to assess learning effectiveness under different market conditions. The results indicate that Q-Learning performs better on stocks with strong price momentum due to its more aggressive exploration behavior, while SARSA provides more stable performance in highly volatile markets owing to its conservative on-policy approach. Overall, neither algorithm demonstrates absolute dominance; instead, each offers distinct advantages depending on stock characteristics and risk profiles. These findings highlight the potential of Reinforcement Learning for the development of algorithmic trading strategies in the Indonesian stock market.
Downloads
References
O. V. Zaporozhets, O. V. Okhrimenko, and O. V. Levchenko, “Digital methods of technical analysis for diagnosis of crisis phenomena in the financial market,” International Journal of Technology, vol. 13, no. 7, pp. 1527–1536, 2022, doi: 10.14716/ijtech.v13i7.6187.
X. Chen, B. Xu, Y. Li, and Y. Gao, “A stock prediction method based on deep reinforcement learning and sentiment analysis,” Applied Sciences, vol. 14, no. 19, p. 8747, 2024. [Online]. Available: https://www.mdpi.com/2076-3417/14/19/8747
R. J. Elliott and R. Mamon, “Portfolio management system in equity market neutral using reinforcement learning,” Applied Intelligence, vol. 52, pp. 1–17, 2021, doi: 10.1007/s10489-021-02262-0.
D. Antic, “Application of Q-learning in financial markets: Modelling and experimental results,” International Education and Research Journal, vol. 7, no. 9, pp. 10–14, 2021. [Online]. Available:https://ierj.in/journal/index.php/ierj/article/view/4529/5337
A. R. T. C. Mandala, I. M. A. Pura, and G. Mahardika, “Application of deep reinforcement learning for stock trading on the Indonesia Stock Exchange,” JANAPATI, vol. 12, no. 1, pp. 55–67, 2023. [Online]. Available:https://ejournal.undiksha.ac.id/index.php/janapati/article/view/83775
A. Brim and N. S. Flann, “Deep reinforcement learning stock market trading utilizing a CNN with candlestick images,” PLOS ONE, vol. 17, no. 2, 2022. [Online]. Available: https://journals.plos.org/plosone/article?id=10.1371/pone.0263181
Y. Jiang, C. Xu, X. Ji, and Y. Li, “A multi-scaling reinforcement learning trading system based on multi-scaling convolutional neural networks,” Mathematics, vol. 11, no. 11, p. 2467, 2023. [Online]. Available: https://www.mdpi.com/2227-7390/11/11/2467
M. Ghoreishi and S. Jafari, “Deep reinforcement learning for Tehran stock trading,” Journal of New Engineering Science and Technology, vol. 2, no. 3, pp. 55–66, 2022. [Online]. Available: https://journal.iistr.org/index.php/JNEST/article/view/171/125
T. Kabbani and E. Duman, “Deep reinforcement learning approach for trading automation in the stock market,” IEEE Access, vol. 10, pp. 96841–96854, 2022, doi: 10.1109/ACCESS.2022.3203697.
A. Rahman and B. Sitohang, “Reinforcement learning for bitcoin trading: A comparative study of PPO and DQN,” Jurnal Mandiri, vol. 6, no. 2, pp. 501–512, 2023. [Online]. Available: https://ejournal.isha.or.id/index.php/Mandiri/article/view/455/457
A. S. Perera, A. A. Perera, and D. Dias, “Deep reinforcement learning for trading—A critical survey,” Data, vol. 6, no. 11, p. 119, 2021. [Online]. Available: https://www.mdpi.com/2306-5729/6/11/119
M. López de Prado, Financial Machine Learning. SSRN, 2023. [Online]. Available:https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4501707
A. Kolm and G. Ritter, Foundations of Reinforcement Learning with Applications in Finance. Stanford University, 2021. [Online]. Available: https://stanford.edu/~ashlearn/RLForFinanceBook/book.pdf
Y. Wang, Y. Wu, and Z. Zhang, “Stock trading strategies based on deep reinforcement learning,” Computational Intelligence and Neuroscience, vol. 2022, pp. 1–15, 2022, doi: 10.1155/2022/4698656.
M. Liu, Z. Wang, and J. Zhang, “A deep Q-learning portfolio management framework for the cryptocurrency market,” Neural Computing and Applications, vol. 34, pp. 1–15, 2022, doi: 10.1007/s00521-020-05359-8.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Muhammad Affarel, Fikri Ikhsan Ramadhan, Nugroho Aldi Prayoga

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright Notice
An author who publishes in the Jurnal FASILKOM (teknologi inFormASi dan ILmu KOMputer) agrees to the following terms:
- Author retains the copyright and grants the journal the right of first publication of the work simultaneously licensed under the Creative Commons Attribution-ShareAlike 4.0 License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal
- Author is able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book) with the acknowledgement of its initial publication in this journal.
- Author is permitted and encouraged to post his/her work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of the published work (See The Effect of Open Access).
Read more about the Creative Commons Attribution-ShareAlike 4.0 Licence here: https://creativecommons.org/licenses/by-sa/4.0/.










_(1).png)



