Comparison Of Temporal Fusion Transformer (TFT) And Long Short-Term Memory (LSTM) Methods In Indonesian Stock Price Prediction Based On Technical And Fundamental Data

Authors

  • Nurhasan Nurhasan Universitas Islam Sultan Agung
  • Ghufron Ghufron Universitas Islam Sultan Agung

DOI:

https://doi.org/10.58466/jmhe8c20

Keywords:

Temporal Fusion Transformer, Long Short-Term Memory, Stock Price Prediction, Technical Analysis, Fundamental Analysis, LQ45

Abstract

The Indonesian capital market exhibits a high level of volatility, requiring stock price prediction models that are accurate and adaptive. Conventional forecasting models have limitations in capturing nonlinear patterns and multivariate relationships within stock time series data. This study compares the performance of Long Short-Term Memory (LSTM) and Temporal Fusion Transformer (TFT) models in predicting stock prices of LQ45 index companies, namely BBRI, TLKM, and ADRO, with a 7-day forecasting horizon. Both models were trained using 12 combined technical and fundamental features with a data split ratio of 70:15:15. Model evaluation was conducted using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). The results indicate that the TFT model achieved better performance on BBRI with a MAPE of 0.74% and TLKM with a MAPE of 0.91%, while also demonstrating faster training convergence compared to LSTM. In contrast, the LSTM model outperformed TFT on ADRO with a MAPE of 2.71%, which exhibited a relatively consistent trend pattern. Overall, TFT proved to be more effective for stocks with complex multivariate dynamics, whereas LSTM remained competitive for stocks with more stable trend patterns. The selection of prediction models should therefore consider the volatility characteristics and movement patterns of each stock issuer

References

[1] G. L. Gil, P. Duhamel-Sebline, and A. McCarren, “An Evaluation of Deep Learning Models for Stock Market Trend Prediction,” Aug. 2024, [Online]. Available: http://arxiv.org/abs/2408.12408

[2] J. Park and M. Shin, “An Approach for Variable Selection and Prediction Model for Estimating the Risk-Based Capital (RBC) Based on Machine Learning Algorithms,” Risks, vol. 10, no. 1, Jan. 2022, doi: 10.3390/risks10010013.

[3] W. Budiharto, “Data science approach to stock prices forecasting in Indonesia during Covid-19 using Long Short-Term Memory (LSTM),” J. Big Data, vol. 8, no. 1, Dec. 2021, doi: 10.1186/s40537-021-00430-0.

[4] A. Arfan and dan Lussiana ETP, “Prediksi Harga Saham Di Indonesia Menggunakan Algoritma Long Short-Term Memory,” Universitas Gunadarma Jl. Margonda Raya No, vol. 3, no. 1, 2019, [Online]. Available: https://www.ofx.com

[5] Sepp Hochreiter and Jurgen Schmidhuber, “long short term memori”.

[6] Y. Touzani and K. Douzi, “An LSTM and GRU based trading strategy adapted to the Moroccan market,” J. Big Data, vol. 8, no. 1, Dec. 2021, doi: 10.1186/s40537-021-00512-z.

[7] C. Genta, K. Simatupang, W. Swastika, and T. R. Suganda, “PERANCANGAN APLIKASI BERBASIS WEB UNTUK PREDIKSI HARGA SAHAM DENGAN METODE LSTM,” 2022.

[8] D. I. Puteri, “Implementasi Long Short Term Memory (LSTM) dan Bidirectional Long Short Term Memory (BiLSTM) Dalam Prediksi Harga Saham Syariah,” Euler : Jurnal Ilmiah Matematika, Sains dan Teknologi, vol. 11, no. 1, pp. 35–43, May 2023, doi: 10.34312/euler.v11i1.19791.

[9] H. Widiputra, A. Mailangkay, and E. Gautama, “Prediksi Indeks BEI dengan Ensemble Convolutional Neural Network dan Long Short-Term Memory,” Jurnal RESTI, vol. 5, no. 3, pp. 456–465, Jun. 2021, doi: 10.29207/resti.v5i3.3111.

[10] J. Frank and F. Erlangen-Nürnberg, “Forecasting Realized Volatility in Turbulent Times using Temporal Fusion Transformers,” 2023, [Online]. Available: https://www.iwf.rw.fau.de/discussion-papers/

[11] J. Yang, P. Li, Y. Cui, X. Han, and M. Zhou, “Multi-Sensor Temporal Fusion Transformer for Stock Performance Prediction: An Adaptive Sharpe Ratio Approach,” Sensors, vol. 25, no. 3, Feb. 2025, doi: 10.3390/s25030976.

[12] M. C. Lee, “Temporal Fusion Transformer-Based Trading Strategy for Multi-Crypto Assets Using On-Chain and Technical Indicators,” Systems, vol. 13, no. 6, Jun. 2025, doi: 10.3390/systems13060474.

[13] A. Peik, M. Ali Zare Chahooki, A. Milani Fard, and M. Agha Sarram, “The 38th Canadian Conference on Artificial Intelligence Enhancing Cryptocurrency Price Prediction by Applying Temporal Fusion Transformers on Subseries,” 2025. [Online]. Available: https://github.com/arashitc2/tft-on-subseries-for-cryptocurrency-forecasting

[14] S. Hartanto, A. Agung, and S. Gunawan, “Temporal Fusion Transformers for Enhanced Multivariate Time Series Forecasting of Indonesian Stock Prices,” IJACSA) International Journal of Advanced Computer Science and Applications, vol. 15, no. 7, p. 2024, 2024, [Online]. Available: www.ijacsa.thesai.org

[15] A. Hanafiah, W. Monika, M. Sham Mohamad, and A. Alamsyah, “Assessing Lag-Llama in Probabilistic Time Series Forecasting for the Indonesian Stock Market Arbi Haza Nasution,” 2025. [Online]. Available: https://github.com/

Downloads

Published

2026-06-05

How to Cite

Comparison Of Temporal Fusion Transformer (TFT) And Long Short-Term Memory (LSTM) Methods In Indonesian Stock Price Prediction Based On Technical And Fundamental Data. (2026). Applied Information Technology and Computer Science (AICOMS), 5(1), 118-125. https://doi.org/10.58466/jmhe8c20

Similar Articles

21-30 of 31

You may also start an advanced similarity search for this article.