Perbandingan XGBoost dan LSTM untuk Prediksi Rentang Harga Penutupan Saham BBRI, ANTM dan ASII
DOI:
https://doi.org/10.69693/ijim.v4i3.2030Keywords:
XGBoost, LSTM, Harga Saham, Regresi Kuantil, Kondisi PasarAbstract
Prediksi harga saham harian umumnya menghasilkan satu nilai titik sehingga tidak menggambarkan ketidakpastian pergerakan harga, padahal pelaku pasar membutuhkan gambaran rentang untuk mengelola risiko. Penelitian ini bertujuan membandingkan kinerja XGBoost dan Long Short-Term Memory (LSTM) dalam memprediksi titik tengah serta rentang harga penutupan harian saham BBRI, ASII, dan ANTM. Data historis 2020 sampai 2025 dibentuk menjadi empat belas fitur relatif, lalu dibagi secara kronologis menjadi data training, validation, dan testing agar informasi masa depan tidak bocor ke dalam proses pelatihan. Ketiga kuantil, yaitu kuantil bawah, tengah, dan atas, dipelajari secara terpisah melalui pendekatan regresi kuantil. Evaluasi dilakukan dengan akar galat kuadrat rata-rata, galat persentase absolut rata-rata, koefisien determinasi, ketepatan arah, cakupan rentang, lebar rentang rata-rata, interval score, waktu komputasi, dan ukuran model. Ketahanan model juga diuji pada kondisi bullish, bearish, dan sideways, kemudian diverifikasi melalui forward test 121 hari perdagangan tahun 2026 tanpa pelatihan ulang. Pada historical test, XGBoost memberikan RMSE terendah untuk seluruh saham dan unggul pada tujuh dari sembilan kombinasi kondisi pasar. Pada forward test, XGBoost tetap unggul untuk BBRI dan ASII, sedangkan LSTM sedikit lebih baik untuk ANTM serta menghasilkan coverage lebih tinggi pada ketiga saham. Hasil ini menunjukkan bahwa XGBoost lebih konsisten untuk prediksi titik, sementara LSTM lebih baik dalam mencakup harga aktual pada rentang prediksi forward.
Downloads
References
Aiyegbeni, G. & Li, Y. 2024. A Comparative Analysis of LSTM, ARIMA, XGBoost Algorithms in Predicting Stock Price Direction. Engineering and Technology Journal. Vol. 9, No. 8, hlm. 4978-4986. https://doi.org/10.47191/etj/v9i08.50
Akiba, T., Sano, S., Yanase, T., Ohta, T. & Koyama, M. 2019. Optuna: A Next-Generation Hyperparameter Optimization Framework. Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. hlm. 2623-2631. https://doi.org/10.1145/3292500.3330701
Chen, T. & Guestrin, C. 2016. XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. hlm. 785-794. https://doi.org/10.1145/2939672.2939785
Chicco, D., Warrens, M. J. & Jurman, G. 2021. The Coefficient of Determination R-Squared is More Informative than SMAPE, MAE, MAPE, MSE and RMSE in Regression Analysis Evaluation. PeerJ Computer Science. Vol. 7, art. e623. https://doi.org/10.7717/peerj-cs.623
Gneiting, T. & Raftery, A. E. 2007. Strictly Proper Scoring Rules, Prediction, and Estimation. Journal of the American Statistical Association. Vol. 102, No. 477, hlm. 359-378. https://doi.org/10.1198/016214506000001437
Hochreiter, S. & Schmidhuber, J. 1997. Long Short-Term Memory. Neural Computation. Vol. 9, No. 8, hlm. 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735
Karunasingha, D. S. K. 2022. Root Mean Square Error or Mean Absolute Error? Use Their Ratio as Well. Information Sciences. Vol. 585, hlm. 609-629. https://doi.org/10.1016/j.ins.2021.11.036
Koenker, R. & Bassett, G. 1978. Regression Quantiles. Econometrica. Vol. 46, No. 1, hlm. 33-50. https://doi.org/10.2307/1913643
Kumbure, M. M., Lohrmann, C., Luukka, P. & Porras, J. 2022. Machine Learning Techniques and Data for Stock Market Forecasting: A Literature Review. Expert Systems with Applications. Vol. 197, art. 116659. https://doi.org/10.1016/j.eswa.2022.116659
Li, Z. 2023. Comparison of XGBoost and LSTM Models for Stock Price Prediction. Advances in Economics, Management and Political Sciences. Vol. 61, hlm. 147-155. https://doi.org/10.54254/2754-1169/61/20231181
Lin, Y. H., Liu, S. C., Yang, H. J. & Wu, H. R. 2021. Stock Trend Prediction Using Candlestick Charting and Ensemble Machine Learning Techniques with a Novelty Feature Engineering Scheme. IEEE Access. Vol. 9, hlm. 101433-101446. https://doi.org/10.1109/ACCESS.2021.3096825
Liu, F., Umair, M. & Gao, J. 2023. Assessing Oil Price Volatility Co-Movement with Stock Market Volatility Through Quantile Regression Approach. Resources Policy. Vol. 81, art. 103375. https://doi.org/10.1016/j.resourpol.2023.103375
Makridakis, S., Spiliotis, E. & Assimakopoulos, V. 2022. M5 Accuracy Competition: Results, Findings, and Conclusions. International Journal of Forecasting. Vol. 38, No. 4, hlm. 1346-1364. https://doi.org/10.1016/j.ijforecast.2021.11.013
Mostafavi, S. M. & Hooman, A. R. 2025. Key Technical Indicators for Stock Market Prediction. Machine Learning with Applications. Vol. 20, art. 100631. https://doi.org/10.1016/j.mlwa.2025.100631
Oksak, Y., Buyukkor, Y. & Saritas, T. 2025. Wavelet-Enhanced Multimodel Framework for Stock Market Forecasting: A Comprehensive Analysis Across Market Regimes. Borsa Istanbul Review. art. 100771. https://doi.org/10.1016/j.bir.2025.100771
Oukhouya, H., Kadiri, H., El Himdi, K. & Guerbaz, R. 2024. Forecasting International Stock Market Trends: XGBoost, LSTM, LSTM-XGBoost, and Backtesting XGBoost Models. Statistics, Optimization and Information Computing. Vol. 12, No. 1, hlm. 200-209. https://doi.org/10.19139/soic-2310-5070-1822
Pratama, B. & Banowosari, L. Y. 2024. Perbandingan Metode Extreme Gradient Boosting (XGBoost) dengan Long Short-Term Memory (LSTM) untuk Prediksi Saham PT Bank Mandiri Tbk. (BMRI). Journal of Economic, Business and Accounting. Vol. 7, No. 3, hlm. 5631-5636. https://doi.org/10.31539/costing.v7i3.9473
Raudys, A. & Goldstein, E. 2022. Forecasting Detrended Volatility Risk and Financial Price Series Using LSTM Neural Networks and XGBoost Regressor. Journal of Risk and Financial Management. Vol. 15, No. 12, art. 602. https://doi.org/10.3390/jrfm15120602
Sathiyapriya, K., Vankadara, S., Babu, K. S. & Muralidharan, M. 2023. Performance Comparison of LSTM and XGBoost for Ether Price Prediction from Spam-Filtered Tweets. Proceedings of the International Conference on Intelligent Systems for Communication, IoT and Security. hlm. 650-655. https://doi.org/10.1109/ICISCoIS56541.2023.10100425
Selayanti, N., Putri, D. A., Trimono & Idhom, M. 2025. Prediksi Harga Penutupan Saham BBRI dengan Model Hybrid LSTM-XGBoost. Informatika: Jurnal Teknik Informatika dan Multimedia. Vol. 5, No. 1, hlm. 52-64. https://doi.org/10.51903/informatika.v5i1.1011
Xu, J., He, J., Gu, J., Wu, H., Wang, L., Zhu, Y., Wang, T., He, X. & Zhou, Z. 2022. Financial Time Series Prediction Based on XGBoost and Generative Adversarial Networks. International Journal of Circuits, Systems and Signal Processing. Vol. 16, hlm. 637-645. https://doi.org/10.46300/9106.2022.16.79
Yun, K. K., Yoon, S. W. & Won, D. 2021. Prediction of Stock Price Direction Using a Hybrid GA-XGBoost Algorithm with a Three-Stage Feature Engineering Process. Expert Systems with Applications. Vol. 186, art. 115716. https://doi.org/10.1016/j.eswa.2021.115716
Zeng, X., Cai, J., Liang, C. & Yuan, C. 2023. Prediction of Stock Price Movement Using an Improved NSGA-II-RF Algorithm with a Three-Stage Feature Engineering Process. PLOS ONE. Vol. 18, No. 6, art. e0287754. https://doi.org/10.1371/journal.pone.0287754
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Indonesian Journal of Innovation Multidisipliner Research

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


















