The Indonesian rupiah exchange rate is a key determinant of Indonesia's economic conditions and is vulnerable to global geopolitical dynamics, yet geopolitical risk is still rarely incorporated explicitly into exchange rate forecasting models. This study compares the accuracy of XGBoost and Long Short-Term Memory optimized with Particle Swarm Optimization (LSTM-PSO) in forecasting IDR/USD and IDR/CNY, using the Geopolitical Risk Daily (GPRD) index as an external predictor. The dataset comprises daily IDR/USD, IDR/CNY, and GPRD observations from February 2022 to February 2026. The workflow includes data collection, cleaning, and integration, feature engineering, normalization, chronological data splitting, and model evaluation using RMSE, MAE, MAPE, and R². Under the tested scenario, LSTM-PSO yielded lower errors than XGBoost for both currency pairs, with a MAPE below 1% and an R² above 0.89, whereas XGBoost produced a negative R². These findings indicate the potential of LSTM-PSO as an exchange rate forecasting model that incorporates geopolitical risk information, and may serve as a consideration for banks, investors, and international businesses in monitoring exchange rate movements.
Copyrights © 2027