Forecasting the IDX Composite Index Through the End of 2026 Using the XGBoost Algorithm

Authors

  • Dede Prabowo Wiguna Mandiri Bina Prestasi University Author
  • Sakaria Efrata Ginting Mandiri Bina Prestasi University Author
  • Izba Zaheer Muslim Youth (MY) University Author
  • Abeysekara S. S. K. Nāgānanda International Institute for Buddhist Studies Author

Keywords:

Classification Accuracy, Financial Forecasting, IDX Composite Index, Machine Learning, XGBoost.

Abstract

This study examined the ability of Extreme Gradient Boosting (XGBoost) to predict the direction of the IDX Composite Index (IHSG) across 20-, 40-, and 60-trading-day horizons associated with October–December 2026. Daily IHSG observations and supporting financial indicators, including energy prices, the USD/IDR exchange rate, major United States equity indices, and the VIX, were obtained from Yahoo Finance for December 17, 2010, through October 5, 2026, covering 3,828 trading days. Predictor variables were constructed using 1-, 5-, and 20-day return ratios, and binary targets distinguished upward from downward index movements. XGBoost classifiers were implemented in Python using Google Colaboratory, with chronological training and testing partitions of 80% and 20%. Testing accuracies were 55.25%, 52.23%, and 50.13% across the respective horizons. All three forecasts indicated UP/BULLISH movements, with estimated probabilities of 52.86%, 65.47%, and 60.11%. Confusion matrices revealed frequent false-positive bullish classifications and limited detection of declining markets. Relative to retrospective majority-class baselines, performance was marginally better at 20 days, weaker at 40 days, and equivalent at 60 days. Forecast probabilities should not be interpreted as expected percentage changes in IHSG. These findings indicate conditional upward signals but insufficient classification reliability to establish an impending market recovery or support independent investment decisions.

 

Downloads

Download data is not yet available.

References

Al Ishaqi, A. M. (2026, July 1). Daftar 10 saham penopang dan penekan IHSG semester I/2026. Bisnis.com. https://market.bisnis.com/read/20260701/7/1984660/daftar-10-saham-penopang-dan-penekan-ihsg-semester-i2026/2

Anam, S., Shamsuddin, M. R., Kustiawan, E., Mahanani, D. M., & Yusuf, F. I. (2026). Grey wolf-optimized XGBoost regressor for stock index prediction with financial features. BAREKENG: Jurnal Ilmu Matematika dan Terapan, 20(3), 2131–2150. https://doi.org/10.30598/barekengvol20iss3pp2131-2150

Bao, W., Cao, Y., Yang, Y., Che, H., Huang, J., & Wen, S. (2025). Data-driven stock forecasting models based on neural networks: A review. Information Fusion, 113, 102616. https://doi.org/10.1016/j.inffus.2024.102616

Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 785–794). Association for Computing Machinery. https://doi.org/10.1145/2939672.2939785

Daqiqil, I. (2021). Machine learning: Teori, studi kasus, dan implementasi menggunakan Python. UR Press.

Deng, S., Huang, X., Zhu, Y., Su, Z., Fu, Z., & Shimada, T. (2023). Stock index direction forecasting using an explainable eXtreme Gradient Boosting and investor sentiments. The North American Journal of Economics and Finance, 64, 101848. https://doi.org/10.1016/j.najef.2022.101848

Deni, D. R., & Amalita, N. (2026). Application of temporal fusion transformer for multivariate forecasting of Indonesian composite stock price index. Journal of Multidisciplinary Science: MIKAILALSYS, 4(3), 6481–6508. https://doi.org/10.58578/mikailalsys.v4i3.12032

Dezhkam, A., & Manzuri, M. T. (2023). Forecasting stock market for an efficient portfolio by combining XGBoost and Hilbert–Huang transform. Engineering Applications of Artificial Intelligence, 118, 105626. https://doi.org/10.1016/j.engappai.2022.105626

Din, R. U., Ahmed, S., Khan, S. H., Albanyan, A., Hoxha, J., & Alkhamees, B. (2025). A novel decision ensemble framework: Attention-customized BiLSTM and XGBoost for speculative stock price forecasting. PLOS ONE, 20(4), e0320089. https://doi.org/10.1371/journal.pone.0320089

Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654–669. https://doi.org/10.1016/j.ejor.2017.11.054

Gao, J. (2025). Application of XGBoost in the A-shares stock market forecasting. In Proceedings of the 2024 5th International Conference on Big Data Economy and Information Management (pp. 503–511). Association for Computing Machinery. https://doi.org/10.1145/3724154.3724237

Google. (n.d.). Google Colaboratory notebook [Notebook]. https://colab.research.google.com/drive/1ETWilEnIu_vE5cx_S8AGZ8NV8tWQ7P_U

Gu, S., Kelly, B., & Xiu, D. (2020). Empirical asset pricing via machine learning. The Review of Financial Studies, 33(5), 2223–2273. https://doi.org/10.1093/rfs/hhaa009

Han, Y., Kim, J., & Enke, D. (2023). A machine learning trading system for the stock market based on N-period Min-Max labeling using XGBoost. Expert Systems with Applications, 211, 118581. https://doi.org/10.1016/j.eswa.2022.118581

IDXChannel. (2026, July 7). IHSG koreksi 34,74 persen sepanjang semester I-2026, OJK ungkap penyebabnya. RCTI+. https://www.rctiplus.com/news/detail/idxchannel/5422806/ihsg-koreksi-34-74-persen-sepanjang-semester-i-2026--ojk-ungkap-penyebabnya

Indra, Supian, S., Sukono, Riaman, Saputra, M. P. A., Azahra, A. S., & Pirdaus, D. I. (2025). Stock return prediction on the LQ45 market index in the Indonesia Stock Exchange using a machine learning algorithm based on technical indicators. Journal of Risk and Financial Management, 18(12), 714. https://doi.org/10.3390/jrfm18120714

Kho, D. C., Purnomo, H. D., & Hendry, H. (2025). Performance analysis of gradient boosting models variants in predicting the direction of stock closing prices on the Indonesia Stock Exchange. BAREKENG: Jurnal Ilmu Matematika dan Terapan, 19(2), 1393–1408. https://doi.org/10.30598/barekengvol19iss2pp1393-1408

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, 197, 116659. https://doi.org/10.1016/j.eswa.2022.116659

Lidyana, V. (2026). IHSG babak belur di akhir semester I 2026, OJK ungkap penyebabnya. IDN Times. https://www.idntimes.com/business/economy/ihsg-babak-belur-di-akhir-semester-i-2026-ojk-ungkap-penyebabnya-00-3m8tp-ztyn6y

Liu, J. (2024). Predicting Chinese stock market using XGBoost multi-objective optimization with optimal weighting. PeerJ Computer Science, 10, e1931. https://doi.org/10.7717/peerj-cs.1931

Mardianto, M. F. F., Valida, H., Putri, F. F., Fauzi, D. M., & Pusporani, E. (2026). Prediction of the Indonesia Composite Index (ICI) using the ARCH GARCH approach and the Fourier series. BAREKENG: Journal of Mathematics and Its Applications, 20(1), 271–286. https://doi.org/10.30598/barekengvol20iss1pp0271-0286

Mohapatra, S., Mukherjee, R., Roy, A., Sengupta, A., & Puniyani, A. (2022). Can ensemble machine learning methods predict stock returns for Indian banks using technical indicators? Journal of Risk and Financial Management, 15(8), 350. https://doi.org/10.3390/jrfm15080350

Nensi, A. I. E., Al Maida, M., Notodiputro, K. A., Angraini, Y., & Mualifah, L. N. A. (2025). Performance analysis of ARIMA, LSTM, and hybrid ARIMA-LSTM in forecasting the composite stock price index. CAUCHY: Jurnal Matematika Murni dan Aplikasi, 10(2), 588–604. https://doi.org/10.18860/cauchy.v10i2.33379

Nti, I. K., Adekoya, A. F., & Weyori, B. A. (2020). A systematic review of fundamental and technical analysis of stock market predictions. Artificial Intelligence Review, 53(4), 3007–3057. https://doi.org/10.1007/s10462-019-09754-z

Oukhouya, H., Kadiri, H., El Himdi, K., & Guerbaz, R. (2023). Forecasting international stock market trends: XGBoost, LSTM, LSTM-XGBoost, and backtesting XGBoost models. Statistics, Optimization & Information Computing, 12(1), 200–209. https://doi.org/10.19139/soic-2310-5070-1822

Pebrianti, D., Kurniawan, H., Bayuaji, L., & Rusdah, R. (2024). XGBoost hyper-parameter tuning using particle swarm optimization for stock price forecasting. Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, 9(4), 1179–1195. https://doi.org/10.26555/jiteki.v9i4.27712

Sonkavde, G., Dharrao, D. S., Bongale, A. M., Deokate, S. T., Doreswamy, D., & Bhat, S. K. (2023). Forecasting stock market prices using machine learning and deep learning models: A systematic review, performance analysis and discussion of implications. International Journal of Financial Studies, 11(3), 94. https://doi.org/10.3390/ijfs11030094

Sürek, R. E., & Lau, W.-Y. (2025). A refined methodological approach: Long-term stock market forecasting with XGBoost. Journal of Intelligent Systems, 34(1), 823–846. https://doi.org/10.1515/jisys-2025-0027

Tony, Ratchagit, M., & Hiryanto, L. (2025). Forecasting Indonesian banking stock prices using Prophet, XGBoost, and ridge regression: A comparative analysis. Jurnal Teknik Informatika, 6(4), 2890–2901. https://doi.org/10.52436/1.jutif.2025.6.4.4973

Ulyah, S. M., Susanti, R., Andreas, C., Rahmayanti, I. A., Rifada, M., Fitriyani, N. L., & Ana, E. (2024). A multivariate regression with time series error in forecasting Jakarta Composite Index and stock prices of banking industry in Indonesia by considering COVID-19 effect. International Journal of Technology, 15(6), 1839–1850. https://doi.org/10.14716/ijtech.v15i6.5469

Vuong, P. H., Dat, T. T., Mai, T. K., Uyen, P. H., & The Bao, P. (2022). Stock-price forecasting based on XGBoost and LSTM. Computer Systems Science and Engineering, 40(1), 237–246. https://doi.org/10.32604/csse.2022.017685

Whaley, R. E. (2000). The investor fear gauge. The Journal of Portfolio Management, 26(3), 12–17. https://doi.org/10.3905/jpm.2000.319728

Yahoo Finance. (2026). Historical market data: IHSG, S&P 500, NASDAQ, Nikkei, Hang Seng, STI, VIX, UST 10Y, USD/IDR, DXY, Brent, WTI, gold, and coal [Data set]. Retrieved October 5, 2026, from https://finance.yahoo.com

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, 186, 115716. https://doi.org/10.1016/j.eswa.2021.115716

Downloads

Published

2026-10-20

How to Cite

Forecasting the IDX Composite Index Through the End of 2026 Using the XGBoost Algorithm. (2026). Technema: Journal of Intelligent Engineering and Computing, 1(3), 78-90. https://sovereignresearch.org/technema/article/view/373