Perbandingan Random Forest dan XGBoost dengan indikator teknikal untuk prediksi harga saham Bank Mandiri
DOI:
https://doi.org/10.24246/aiti.v23i3.434-448Keywords:
stock price prediction, XGBoost, Random Forest, technical indicators, machine learningAbstract
The volatility of PT Bank Mandiri (Persero) Tbk stock prices during 2020–2025, influenced by the COVID-19 pandemic and monetary policy dynamics, presents challenges for investors in making optimal investment decisions. This study aims to compare the performance of Random Forest and XGBoost in predicting Bank Mandiri stock prices using technical indicators. The study used 1,152 daily observations after preprocessing and incorporated 10 technical indicators: Simple Moving Average, Exponential Moving Average, Relative Strength Index, Moving Average Convergence/Divergence, Bollinger Bands, Stochastic Oscillator, Average True Range, On-Balance Volume, Rate of Change, and Momentum. The dataset was divided into 80% training (921 observations) and 20% testing (231 observations) using a time-series split. Model performance was evaluated using MAPE, RMSE, MAE, and R². The results show that XGBoost outperformed Random Forest, achieving an RMSE of 161.97 and a MAPE of 2.42%, compared with 182.61 and 2.65%, respectively. XGBoost also demonstrated 38.79% faster computational performance. Feature importance analysis identified the daily low price (61.75%), the closing price (19.55%), and the 5-day SMA (3.68%) as the most influential features. These findings indicate that XGBoost provides more accurate and efficient stock price prediction for volatile Indonesian banking stock data.
Downloads
Metrics
References
K. Noviana and I. Nurmasari, “Pengaruh Return on Equity dan Current Ratio terhadap Harga Saham PT Bank Mandiri (Persero) Tbk Periode 2013-2022,” Cakrawala: Jurnal Ekonomi, Manajemen dan Bisnis, vol. 1, no. 1, pp. 79–87, 2024, [Online]. Available: https://jurnalamanah.com/index.php/cakrawala/index
W. Y. Rusyida and V. Y. Pratama, “Prediksi Harga Saham Garuda Indonesia di Tengah Pandemi Covid-19 Menggunakan Metode ARIMA,” Square : Journal of Mathematics and Mathematics Education, vol. 2, no. 1, p. 73, Apr. 2020, doi: 10.21580/square.2020.2.1.5626.
C. Ermawati and A. W. Sidiq, “PENGARUH KUALITAS PRODUK, KUALITAS PELAYANAN DAN KEPERCAYAAN TERHADAP MINAT MENABUNG NASABAH PT BANK MANDIRI (PERSERO) TBK KCP KENDAL BOJA,” Solusi, vol. 19, no. 3, pp. 211–219, 2021.
G. Arther Sandag, “Prediksi Rating Aplikasi App Store Menggunakan Algoritma Random Forest Application Rating Prediction on App Store using Random Forest Algorithm,” Cogito Smart Journal |, vol. 6, no. 2, 2020, [Online]. Available: https://www.kaggle.com/
S. Devella and F. Novia Rahmawati, “Implementasi Random Forest Untuk Klasifikasi Motif Songket Palembang Berdasarkan SIFT,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 7, no. 2, 2020, [Online]. Available: http://jurnal.mdp.ac.id
R. G. Firdaus, “Analisis Teknikal Saham Menggunakan Indikator RSI dan Bollinger Bands pada Saham Konstruksi,” Jurnal Pasar Modal dan Bisnis, vol. 3, no. 1, pp. 15–26, Feb. 2021, doi: 10.37194/jpmb.v3i1.60.
V. R. Yulianti and Y. Bara Kusuma, “Analisis Teknikal Saham BBCA Menggunakan Indikator MACD dan RSI Dalam Mengambil Keputusan Investasi,” Economics And Business Management Journal ( EBMJ ) Juni, vol. 3, no. 2, 2024.
K. Mahendra, N. Satyahadewi, and H. Perdana, “ANALISIS TEKNIKAL SAHAM MENGGUNAKAN INDIKATOR MOVING AVERAGE CONVERGENCE DIVERGENCE (MACD),” Bimaster: Buletin Ilmiah Matematika, Statistika dan Terapannya, vol. 11, no. 1, pp. 85-92, 2022.
E. Fitri and D. Riana, “ANALISA PERBANDINGAN MODEL PREDICTION DALAM PREDIKSI HARGA SAHAM MENGGUNAKAN METODE LINEAR REGRESSION, RANDOM FOREST REGRESSION DAN MULTILAYER PERCEPTRON,” METHOMIKA Jurnal Manajemen Informatika dan Komputerisasi Akuntansi, vol. 6, no. 1, pp. 69–78, Apr. 2022, doi: 10.46880/jmika.Vol6No1.pp69-78.
A. Rasyid, A. B. Muharam, and A. Solichin, “PREDIKSI HARGA SAHAM SYARIAH INDONESIA BERDASARKAN ANALISIS FUNDAMENTAL, TEKNIKAL DAN BANDARMOLOGY MENGGUNAKAN METODE RANDOM FOREST,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 10, no. 2, pp. 1663–1677, May 2025, doi: 10.29100/jipi.v10i2.7855.
D. Cahya and P. Buani, “Deteksi Dini Penyakit Diabetes dengan Menggunakan Algoritma Random Forest,” Jurnal Sains dan Manajemen, vol. 12, no. 1, 2024.
R. A. Aufa, E. Altiarika, A. Pramudyantoro, Y. B. Pratama, and Z. Wahyuzi, “Pengenalan Pola Kasus Potensi Banjir Di Pangkalpinang Dengan Algoritma Random Forest Dan Xgboost Menggunakan Google Earth Engine,” Journal of Information Technology and Society (JITS), vol. 3, no. 1, pp. 1–6, 2025, [Online]. Available: https://jits.unmuhbabel.ac.id/
F. I. Sari, E. L. Gunawan, C. A. Adhigiadany, A. Lisanthoni, S. Data, and J. Timur, “Model Prediksi Kepadatan Lalu Lintas: Perbandingan Antara Algoritma Random Forest dan XGBoost,” Seminar Nasional Sains Data, vol. 2023.
W. Karuniasari and R. Prathivi, “Komparasi Algoritma Random Forest dan XGBoost dalam Prediksi Premi Asuransi Kesehatan,” Transformatika, vol. 23, no. 1, pp. 118–125, 2025, doi: 10.26623/transformatika.v23i1.11914.
A. Fauzi, N. Maulidah, R. Supriyadi, H. Nalatissifa, and S. Diantika, “Prediksi Harga Properti Di Indonesia Menggunakan Algoritma Random Forest,” RIGGS: Journal of Artificial Intelligence and Digital Business, vol. 4, no. 1, pp. 43–49, Apr. 2025, doi: 10.31004/riggs.v4i1.367.
W. R. U. Fadilah, D. Agfiannisa, and Y. Azhar, “Analisis Prediksi Harga Saham PT. Telekomunikasi Indonesia Menggunakan Metode Support Vector Machine,” Fountain of Informatics Journal, vol. 5, no. 2, p. 45, Sep. 2020, doi: 10.21111/fij.v5i2.4449.
B. Jange, “Prediksi Harga Saham Bank BCA Menggunakan Prophet,” Journal of Trends Economics and Accounting Research, vol. 2, no. 1, pp. 1-5, 2021.
I. Fathoni Amri, N. Dyah Syaharani, M. A. Khikman, A. Cahyaningrum Watur, S. N. Wahid, and M. Al Haris, “2 Program Studi S1 Statistika,” Emerging Statistics and Data Science Journal, vol. 2, no. 3.
A. Fairuzie, A. Siagian, and Y. Stefhani, “ANALISIS PENGARUH EARNING PER SHARE, HARGA EMAS DUNIA, INFLASI TERHADAP HARGA SAHAM PERUSAHAAN SEKTOR PERTAMBANGAN DI BURSA EFEK INDONESIA PADA MASA PANDEMI COVID-19”, Jurnal Manajemen USNI, vol. 6, no. 2, pp. 37-52, 2022, doi: 10.54964/manajemen/37.
R. Harahap, M. Irpan, M. Azzuhri Dinata, and L. Efrizoni, “PERBANDINGAN ALGORITMA RANDOM FOREST DAN XGBOOST UNTUK KLASIFIKASI PENYAKIT PARU-PARU BERDASARKAN DATA DEMOGRAFI PASIEN,” Betrik, vol. 15, no. 2, pp. 130-141, 2024.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 AITI

This work is licensed under a Creative Commons Attribution 4.0 International License.

All articles published in AITI: Jurnal Teknologi Informasi is licensed under a Creative Commons Attribution 4.0 International License.













