Building of Informatics, Technology and Science
Vol 7 No 4 (2026): March 2026

Perbandingan Model LSTM dan Temporal Fusion Transformer untuk Prediksi Harga Emas

Nilasari Nilasari (Universitas Amikom Purwokerto, Purwokerto)
Rujianto Eko Saputro (Universitas Amikom Purwokerto, Purwokerto)
Giat Karyono (Universitas Amikom Purwokerto, Purwokerto)



Article Info

Publish Date
31 Mar 2026

Abstract

This study compares the performance of Long Short-Term Memory (LSTM) and Temporal Fusion Transformer (TFT) in forecasting daily gold prices using multivariate data. The dataset was obtained from Kaggle (2005–2024) and includes ten key economic variables, such as stock indices, the US Dollar Index, crude oil prices, silver prices, and 10-year Treasury yields. The research stages consisted of data preprocessing through missing value interpolation, Z-score-based outlier clipping, normalization with MinMaxScaler on the training set, and data transformation tailored to each model architecture. Model performance was evaluated using four regression metrics: Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), R², and Mean Absolute Percentage Error (MAPE). Results indicate that TFT outperforms LSTM across all metrics, achieving RMSE of 19.35, MAE of 14.51, R² of 0.9906, and MAPE of 0.74%. The Diebold–Mariano (DM) test yielded a p-value of 0.02, confirming that the performance difference between the two models is statistically significant. These findings highlight the importance of the attention mechanism and variable selection network in TFT for enhancing multivariate predictive accuracy. However, this study is limited by the exclusion of non-economic external variables such as market sentiment and geopolitical factors. Future research should incorporate additional variables and explore hybrid approaches to achieve more robust gold price forecasting.

Copyrights © 2026






Journal Info

Abbrev

bits

Publisher

Subject

Computer Science & IT

Description

Building of Informatics, Technology and Science (BITS) is an open access media in publishing scientific articles that contain the results of research in information technology and computers. Paper that enters this journal will be checked for plagiarism and peer-rewiew first to maintain its quality. ...