Work

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

Year: 2026
Type: article
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.
Language: English
Open Access status: diamond
OpenAlex ID: W7238846440
FWCI:
Cites: 16
Cited by:
Related to: