Performance Comparison of XGBoost and LSTM for Rupiah–USD Exchange Rate Prediction
DOI:
https://doi.org/10.57152/malcom.v6i4.2809Keywords:
Exchange Rate Prediction, LSTM, USD/IDR, Walk-Forward Validation, XGBoostAbstract
Fluctuations in the Rupiah exchange rate against the US Dollar (USD/IDR) pose challenges to economic stability, making accurate prediction important for policymakers, businesses, and investors. This study compares XGBoost and Long Short-Term Memory (LSTM) models in predicting the USD/IDR exchange rate using daily selling and buying rates from Bank Indonesia covering January 2010 to December 2025. The preprocessing stages include log return transformation, feature engineering using lag returns, rolling volatility, and moving average returns, as well as normalization using StandardScaler. Hyperparameter tuning was performed using random search, while model evaluation was conducted using walk-forward validation with periodic retraining. Model performance was measured using MAE, RMSE, SMAPE, and Directional Accuracy (DA). The results show that LSTM achieves better performance in MAE (41.41 IDR), SMAPE (0.2588%), and DA (52.74%), while XGBoost obtains a lower RMSE (56.63), indicating more stable performance in handling larger prediction errors. Overall, both models produce comparable predictive performance, with LSTM showing a slight advantage in average prediction accuracy and directional movement prediction
Downloads
References
S. Silaban, H. Aadilah, and K. Matondang, “Influence of Rupiah Exchange Rate on Indonesia’s Economic Growth: Literature Study,” Journal of Business Management and Economic Development, vol. 1, no. 02, pp. 123–131, 2023, doi: 10.59653/jbmed.v1i02.48.
Y. Wang, M. F. Ghazali, R. Ab Razak, and M. A. S. Zaidi, “Complex system and PS-LSTM prediction of cryptocurrencies, stocks, bonds, exchange rates and commodities,” Physica A: Statistical Mechanics and its Applications, vol. 679, p. 130976, 2025, doi: 10.1016/j.physa.2025.130976.
T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, vol. 13-17-Augu, pp. 785–794, 2016, doi: 10.1145/2939672.2939785.
S. F. N. Islam, A. Sholahuddin, and A. S. Abdullah, “Extreme gradient boosting (XGBoost) method in making forecasting application and analysis of USD exchange rates against rupiah,” Journal of Physics: Conference Series, vol. 1722, no. 1, 2021, doi: 10.1088/1742-6596/1722/1/012016.
M. Krichen and A. Mihoub, “Long Short-Term Memory Networks: A Comprehensive Survey,” AI (Switzerland), vol. 6, no. 9, pp. 1–21, 2025, doi: 10.3390/ai6090215.
N. T. S. Saptadi et al., Deep Learning: Teori, Algoritma, dan Aplikasi. Serang: PT Sada Kurnia Pustaka, 2025.
I. F. Amri, N. Yunanita, F. A. Lestari, and O. R. Dhani, “Rupiah exchange rate prediction against the US Dollar using a deep neural network with a multi-output sliding window approach,” MethodsX, vol. 15, p. 103692, Dec. 2025, doi: 10.1016/j.mex.2025.103692.
U. Ullah, Z. Huang, D. Rehman, S. Khan, H. Rashid, and I. Ullah, “Forecasting Foreign Exchange Rate with Machine Learning Techniques Chinese Yuan to US Dollar Using XGBoost and LSTM Model,” iRASD Journal of Economics, vol. 6, no. 3, pp. 761–775, 2024, doi: 10.52131/joe.2024.0603.0238.
S. Enkhbayar and R. ?lepaczuk, “Predictive modeling of foreign exchange trading signals using machine learning techniques,” Expert Systems with Applications, vol. 285, no. April, p. 127729, Aug. 2025, doi: 10.1016/j.eswa.2025.127729.
P. Koukaras and C. Tjortjis, “Data Preprocessing and Feature Engineering for Data Mining: Techniques, Tools, and Best Practices,” AI (Switzerland), vol. 6, no. 10, pp. 0–40, 2025, doi: 10.3390/ai6100257.
V. R. Joseph and A. Vakayil, “SPlit: An Optimal Method for Data Splitting,” Technometrics, vol. 64, no. 2, pp. 166–176, 2022, doi: 10.1080/00401706.2021.1921037.
B. Bischl et al., “Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges,” Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, vol. 13, no. 2, pp. 1–43, 2023, doi: 10.1002/widm.1484.
E. P. Wahyuddin, R. E. Caraka, R. Kurniawan, W. Caesarendra, P. U. Gio, and B. Pardamean, “Improved LSTM hyperparameters alongside sentiment walk-forward validation for time series prediction,” Journal of Open Innovation: Technology, Market, and Complexity, vol. 11, no. 1, p. 100458, 2025, doi: 10.1016/j.joitmc.2024.100458.
D. S. K. Karunasingha, “Root mean square error or mean absolute error? Use their ratio as well,” Information Sciences, vol. 585, pp. 609–629, Mar. 2022, doi: 10.1016/j.ins.2021.11.036.
H. Hewamalage, K. Ackermann, and C. Bergmeir, “Forecast evaluation for data scientists: common pitfalls and best practices,” Data Mining and Knowledge Discovery, vol. 37, no. 2, pp. 788–832, 2023, doi: 10.1007/s10618-022-00894-5.
C. R. S. Bürgi, “Assessing the accuracy of directional forecasts,” Applied Economics, vol. 57, no. 48, pp. 7909–7920, 2024, doi: 10.1080/00036846.2024.2393902.
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Satria Fahlevi, Estu Sinduningrum

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright © by Author; Published by Institut Riset dan Publikasi Indonesia (IRPI)
This Indonesian Journal of Machine Learning and Computer Science is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.










