A Comparative Analysis of Temporal Fusion Transformer and Long Short-Term Memory for the Forecasting of the Indonesia Composite Stock Price Index (IDX Composite)

Main Article Content


Abstract

Forecasting the Indonesia Composite Stock Price Index (IHSG) is challenging because of nonlinear price movements and changing market conditions. This study compared the forecasting performance of the Temporal Fusion Transformer (TFT) and Long Short-Term Memory (LSTM) models using daily observations from 4 January 2000 to 30 December 2025. Both models used the IHSG and five external variables as inputs, including the S&P 500, global gold prices, West Texas Intermediate crude oil prices, the USD/IDR exchange rate, and the CBOE Volatility Index. The models used a 252-session input window to forecast the next seven trading sessions. Data were partitioned chronologically into training (70%), validation (15%), and test (15%) sets. Forecast accuracy and bias were assessed on 6,601 matched date–horizon pairs, supplemented by analyses of variable importance and temporal attention. TFT achieved a mean absolute error of 580.63, a root mean squared error of 712.65, and a mean absolute percentage error of 7.82%, compared with 962.28, 1,055.30, and 13.16%, respectively, for LSTM. Both models underestimated the index on average. TFT’s nominal 80% prediction intervals achieved only 8.44% empirical coverage, with an average width of 409.50 index points and no quantile crossings. TFT produced more accurate point forecasts than the implemented LSTM baseline. Its low empirical coverage indicates that the prediction intervals require calibration.

Keywords:
Download Full-Text PDF Direct PDF file • 12708.pdf

Share Article:

Citation Metrics:

Scopus

Downloads

Download data is not yet available.

Citation Metrics & Similar Scopus Articles

Citation data unavailable from the configured source
Check Secondary Documents in Scopus
Open this article in Scopus, then check the Secondary documents tab. Use Manual Citation Fallback only for counts you have verified manually.
Open in Scopus
Similar Scopus Articles
Scopus
  1. Vishnevskaya N.A. (2028)
    Analytical Review of the Methods of Studying Open Pit Slope Stability Under the Conditions of Mining Operations Digitalization
    Kompleksnoe Ispolzovanie Mineralnogo Syra, 344(1), 99-108
  2. Kunaev V.A. (2028)
    Blast Furnace Slag as an Alternative to Natural Mineral Materials in Pavement Engineering: A Review
    Kompleksnoe Ispolzovanie Mineralnogo Syra, 346(3), 108-130
  3. Perezhogin V.Y. (2028)
    Image-Based FEM Modeling of the Stress State in Hypereutectic High-Chromium Cast Irons
    Kompleksnoe Ispolzovanie Mineralnogo Syra, 346(3), 131-141

Article Details

How to Cite
Deni, D. R., Amalita, N., Kurniawati, Y., & Martha, Z. (2026). A Comparative Analysis of Temporal Fusion Transformer and Long Short-Term Memory for the Forecasting of the Indonesia Composite Stock Price Index (IDX Composite). Journal of Multidisciplinary Science: MIKAILALSYS, 4(3), 10150-10173. https://doi.org/10.58578/mikailalsys.v4i3.12708

References

Akmal, M. A., Trimono, & Pratama, A. R. (2026). Implementation of temporal fusion transformer (TFT) for short-term sales prediction of Telkomsel data packages in East Java. Jurnal Teknologi Informatika dan Komputer, 12(1), 399–413. https://doi.org/10.37012/jtik.v12i1.3268

Andriyani, R., & Pimada, L. (2025). The influence of global risks on the composite index. Journal of Development Economic and Social Studies, 4(4), 1111–1124.

Bengio, Y., Courville, A., & Vincent, P. (2013). Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 1798–1828.

Bergstra, J., & Bengio, Y. (2012). Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13, 281–305. https://jmlr.org/papers/v13/bergstra12a.html

Bursa Efek Indonesia. (2010). Buku Panduan Indeks Harga Saham Bursa Efek Indonesia.

Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. The Journal of Finance, 25(2), 383–417. https://doi.org/10.1111/j.1540-6261.1970.tb00518.x

Fauziyah, E., Ispriyanti, D., & Tarno. (2021). Pemodelan dan Peramalan Indeks Harga Saham Gabungan (IHSG) Menggunakan ARIMAX-TARCH. Jurnal Gaussian, 10(4), 595–604. https://ejournal3.undip.ac.id/index.php/gaussian/article/view/33102

Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press. https://mitpress.mit.edu/9780262035613/deep-learning/

Hartanto, S., & Gunawan, A. A. S. (2024). Temporal fusion transformers for enhanced multivariate time series forecasting of Indonesian stock prices. International Journal of Advanced Computer Science and Applications, 15(7), 140–148. https://thesai.org/Publications/ViewPaper?Code=ijacsa&Issue=7&SerialNo=13&Volume=15

Hidayat, R., & Sudjono. (2022). The effect of world gold price, world oil price, USD/IDR exchange rate, and inflation on the joint stock price index (JCI) on the Indonesia Stock Exchange (IDX). Scholars Bulletin, 8(1), 33–41. https://saudijournals.com/articles/6203/

Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.

Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688.

Lim, B., Arık, S. Ö., Loeff, N., & Pfister, T. (2021). Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting, 37(4), 1748–1764.

Nilasari, Eko Saputro, R., & Karyono, G. (2026). Perbandingan Model LSTM dan Temporal Fusion Transformer untuk Prediksi Harga Emas. Building of Informatics, Technology and Science (BITS), 7(4), 2811–2820. https://ejurnal.seminar-id.com/index.php/bits/article/view/8204

Nurhasan, & Ghufron. (2026). Perbandingan Metode Temporal Fusion Transformer (TFT) dan Long Short-Term Memory (LSTM) dalam Prediksi Harga Saham Indonesia Berbasis Data Teknikal dan Fundamental. Applied Information Technology and Computer Science (AICOMS), 5(1), 118–125. https://aicoms.jurnal.politap.ac.id/index.php/aicoms/article/view/2234

Patriya, E., Latif, A., & Handayani. (2023). Peramalan Harga Saham Penutupan Indeks Harga Saham Gabungan (IHSG) Menggunakan Algoritma Long Short Term Memory (LSTM). Jurnal Ilmiah Ekonomi Bisnis, 28(2), 304–314. https://ejournal.gunadarma.ac.id/archive/index.php/ekbis/article/view/7964

Rasyid, A. F., R., D. A., & Ediraras, D. T. (2021). Deep learning methods in predicting Indonesia composite stock price index (IHSG). International Journal of Computer and Information Technology, 10(5), 209–217. https://doi.org/10.24203/ijcit.v10i5.153

Tashman, L. J. (2000). Out-of-sample tests of forecasting accuracy: An analysis and review. International Journal of Forecasting, 16(4), 437–450.

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30, 5998–6008. https://proceedings.neurips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html

Zeng, A., Chen, M., Zhang, L., & Xu, Q. (2023). Are transformers effective for time series forecasting? Proceedings of the AAAI Conference on Artificial Intelligence, 37(9), 11121–11128.