MACHINE LEARNING UNTUK PREDIKSI HARGA SAHAM DENGAN VALIDASI STRATEGI TRADING MENGGUNAKAN BACKTESTING PADA SEKTOR PERBANKAN DI BURSA EFEK INDONESIA

Authors

  • Haikal Nurkalam Program Studi Teknik Informatika, Universitas Pamulang
  • Maulana Muhamad Sulaiman Program Studi Teknik Informatika, Universitas Pamulang

DOI:

https://doi.org/10.51878/cendekia.v6i2.9171

Keywords:

prediksi harga saham, Random Forest, backtesting, indikator teknikal, saham perbankan, machine learning

Abstract

Stock investment in the Indonesian banking sector faces challenges in predicting volatile price movements, especially for novice investors with limited literacy and experience. This research aims to build a banking stock price prediction system using the Random Forest algorithm with trading strategy validation through automatic backtesting. The system was developed using 22 technical indicators (Moving Average, RSI, MACD, Bollinger Bands, and price action) to predict stock prices of Indonesia's five largest banks (BBCA, BBRI, BMRI, BBNI, BBTN) across multiple prediction horizons (1, 2, 3, 5, 10, and 30 days). Evaluation was conducted on 30 combinations (5 stocks × 6 horizons) using MAPE, MAE, RMSE, and R² score metrics. Results show the model achieves excellent accuracy with an average MAPE of 2.05% for short-term predictions (H+1) and 5.27% for medium-term predictions (H+5), categorized as "Excellent". The model-based trading strategy outperforms Buy & Hold with an average outperformance of +19.32%, where BBCA shows the best performance with ROI of +22.6% and Sharpe Ratio of 2.20. Feature importance analysis reveals the dominance of price action (41.56%) and moving averages (35.73%), consistent with banking stock characteristics that follow medium-term trend patterns. The web-based system with intuitive visualization and automatic backtesting proves effective as a decision support tool to help novice investors make more managed investment decisions and improve capital market literacy.

ABSTRAK
Investasi saham sektor perbankan di Indonesia menghadapi tantangan dalam memprediksi pergerakan harga yang volatil, terutama bagi investor pemula dengan keterbatasan literasi dan pengalaman. Penelitian ini bertujuan membangun sistem prediksi harga saham perbankan menggunakan algoritma Random Forest dengan validasi strategi trading melalui backtesting otomatis. Sistem dikembangkan menggunakan 22 indikator teknikal (Moving Average, RSI, MACD, Bollinger Bands, dan price action) untuk memprediksi harga saham lima bank terbesar Indonesia (BBCA, BBRI, BMRI, BBNI, BBTN) pada berbagai horizon prediksi (1, 2, 3, 5, 10, dan 30 hari). Evaluasi dilakukan pada 30 kombinasi (5 saham × 6 horizons) menggunakan metrik MAPE, MAE, RMSE, dan R² score. Hasil penelitian menunjukkan model mencapai akurasi sangat baik dengan MAPE rata-rata 2.05% untuk prediksi jangka pendek (H+1) dan 5.27% untuk prediksi jangka menengah (H+5), tergolong kategori "Excellent". Strategi trading berbasis model mengungguli Buy & Hold dengan rata-rata outperformance +19.32%, dimana BBCA menunjukkan performa terbaik dengan ROI +22.6% dan Sharpe Ratio 2.20. Analisis feature importance mengungkap dominasi price action (41.56%) dan moving averages (35.73%), sesuai karakteristik saham perbankan yang bergerak mengikuti pola tren jangka menengah. Sistem berbasis web interface dengan visualisasi intuitif dan backtesting otomatis terbukti efektif sebagai decision support tool untuk membantu investor pemula mengambil keputusan investasi yang lebih terkelola dan meningkatkan literasi pasar modal.

 

Downloads

Download data is not yet available.

References

Agal, S., Raulji, K., Odedra, N. D., Agal, S., Raulji, K., & Odedra, N. D. (2025). A machine learning approach to risk based asset allocation in portfolio optimization. Scientific Reports, 15(1). https://doi.org/10.1038/s41598-025-26337-x

Deep, A., Monico, C., Shirvani, A., Rachev, S. T., & Fabozzi, F. J. (2024). Assessing the impact of technical indicators on machine learning models for stock price prediction. arXiv. https://doi.org/10.48550/arxiv.2412.15448

Deepika, N., & Nirupamabhat, M. (2020). An optimized machine learning model for stock trend anticipation. Ingénierie Des Systèmes d’Information, 25(6), 783–791. https://doi.org/10.18280/isi.250608

Dwiandiyanta, B. Y., Hartanto, R., & Ferdiana, R. (2025). Harnessing deep learning and technical indicators for enhanced stock predictions of blue-chip stocks on the Indonesia Stock Exchange (IDX). Engineering, Technology & Applied Science Research, 15(1), 20348–20355. https://doi.org/10.48084/etasr.9850

Fathori. (2023). Peran pasar modal dalam pembangunan ekonomi: Studi kasus tentang kontribusi pasar saham terhadap pertumbuhan ekonomi di negara berkembang. Currency: Jurnal Ekonomi Dan Perbankan Syariah.

Fatouros, G., Metaxas, K., Soldatos, J., & Kyriazis, D. (2024). Can large language models beat Wall Street? Unveiling the potential of AI in stock selection. arXiv. https://doi.org/10.48550/arxiv.2401.03737

Gu, F., Jiang, Z., García?Fernández, Á. F., & Stefanidis, A. (2025). MTS: A deep reinforcement learning portfolio management framework with time-awareness and short-selling. arXiv. https://doi.org/10.48550/arxiv.2503.04143

Innayah, E. P., Ekowati, V. M., Supriyanto, A. S., Masyhuri, M., & Johari, F. (2022). Electronic word-of-mouth (e-WOM) in social media as a predictor of investment intention in capital market. Jurnal Aplikasi Manajemen, 20(4). https://doi.org/10.21776/ub.jam.2022.020.04.01

Kusuma, N. P. N. (2024). Prediksi harga saham blue chip pada indeks IDX30 menggunakan algoritma recurrent neural network. Jurnal Ekonomi Bisnis.

Li, Y., & Wang, F. (2023). Quantitative stock selection based on artificial intelligence. In Advances in Economics, Business and Management Research (p. 262). Atlantis Press. https://doi.org/10.2991/978-94-6463-298-9_29

Maulana, A. R. (2023). Analisis CAPM dalam pengembalian keputusan investasi perbankan (Studi kasus PT. Bank Rakyat Indonesia Tbk). JAAKFE UNTAN (Jurnal Audit Dan Akuntansi Fakultas Ekonomi Universitas Tanjungpura). https://doi.org/10.26418/jaakfe.v12i2.67101

Mohamad, A. H. H., Ab-Rahim, R., & Kadri, N. (2025). Future trend of artificial intelligence and stock market: A comprehensive bibliometric analysis. International Journal of Economics and Financial Issues, 15(5), 306–315. https://doi.org/10.32479/ijefi.19272

Nurwulandari, A. (2020). Analysis of the relationship of risk and return using the Capital Asset Pricing Model (CAPM) method at Kompas 100 for the 2015-2019 period. International Journal of Science and Society.

Ong, J. M. J., & Herremans, D. (2022). Constructing time-series momentum portfolios with deep multi-task learning. SSRN. https://doi.org/10.2139/ssrn.4288770

Patil, G. G. (2023). Prediction and portfolio optimization in quantitative trading using machine learning techniques. International Journal for Research in Applied Science and Engineering Technology, 11(6), 1544–1550. https://doi.org/10.22214/ijraset.2023.53921

Pratama, A. I., Akbar, R. A., & Huang, J.-P. (2023). Cluster analysis of Jakarta Islamic Index (JII) stocks based on risk adjusted return. Jurnal Akutansi, Ekonomi Dan Manajemen Bisnis.

Purnama, A. A., Lukito, Y., & Haryono, N. A. (2025). Analisis kinerja support vector machine dan moving averages convergence divergence untuk saham-saham perbankan indonesia. Jurnal Komtika (Komputasi Dan Informatika), 9(1), 87–96. https://doi.org/10.31603/komtika.v9i1.13459

Putra, R. F., & Sumarno, S. (2022). Application of capital market investment planning expert system using website-based forward chaining method. Procedia of Engineering and Life Science, 3. https://doi.org/10.21070/pels.v3i0.1318

Putri, F. A., Numan, Aslam, A. P., Ramli, A., & Anwar. (2025). Penggunaan capital asset pricing model (CAPM) untuk menilai kelayakan investasi pada saham indeks IDX30 di bursa efek indonesia (BEI) tahun 2019-2023. Jurnal Manajemen Dan Bisnis Ekonomi, 3(2). https://doi.org/10.54066/jmbe-itb.v3i2.3025

Resyita, C. P., & Khoiriyah, R. (2023). Pengaruh digitalisasi, literasi keuangan, dan persepsi risiko terhadap keputusan investasi. Journal of Economics and Business Research (JUEBIR), 2(2), 204–215. https://doi.org/10.22515/juebir.v2i2.8152

Reyhan, M., Ahmad, D. R., Ramadhan, N. A., Nugroho, R. H., & Kusumasari, I. R. (2024). Penggunaan data analisis dan big data dalam strategi pengambilan keputusan keuangan. Jurnal Akuntansi Manajemen Dan Perencanaan Kebijakan, 2(2), 9–18. https://doi.org/10.47134/jampk.v2i2.540

Sihombing, P., Triadji, I., & Busnetty, I. (2025). Performance analysis of value and growth investing in the Indonesia Stock Exchange. Media Riset Akuntansi, Auditing & Informasi, 25(2). https://doi.org/10.25105/mraai.v25i2.19539

Waluyo, D. E., Kinasih, H. W., Paramita, C., Pergiwati, D., Nohan, R., & Rafrastara, F. A. (2024). Komparasi dan implementasi algoritma regresi machine learning untuk prediksi indeks harga saham gabungan. Jurnal Informatika Jurnal Pengembangan IT, 9(1), 12–19. https://doi.org/10.30591/jpit.v9i1.6105

Wang, J., Xu, J., Cheng, Q., & Kumar, R. (2024). Research on finance credit risk quantification model based on machine learning algorithm. Academic Journal of Science and Technology, 10(1), 290–295. https://doi.org/10.54097/5yzwty57

Weng, Y., Wu, J., Kelly, T., & Johnson, W. (2024). Comprehensive overview of artificial intelligence applications in modern industries. arXiv. https://doi.org/10.48550/arxiv.2409.13059

Xiong, Z. (2025). Ensemble RL through classifier models: Enhancing risk-return trade-offs in trading strategies. arXiv. https://doi.org/10.48550/arxiv.2502.17518

Yang, D., & Zhang, Y. (2023). China’s stock market trend prediction model based on adversarial learning. Applied Mathematics and Nonlinear Sciences, 8(2), 3289–3300. https://doi.org/10.2478/amns.2023.2.01130

Downloads

Published

2026-02-15

How to Cite

Nurkalam, H. ., & Sulaiman, M. M. . (2026). MACHINE LEARNING UNTUK PREDIKSI HARGA SAHAM DENGAN VALIDASI STRATEGI TRADING MENGGUNAKAN BACKTESTING PADA SEKTOR PERBANKAN DI BURSA EFEK INDONESIA. CENDEKIA: Jurnal Ilmu Pengetahuan , 6(2), 886-895. https://doi.org/10.51878/cendekia.v6i2.9171

Issue

Section

Articles