Predicting foreign exchange rates presents a formidable challenge within financial forecasting, given its pivotal role in influencing a country's economic trajectory. To address this challenge, numerous forecasting models are employed with the aim of anticipating future exchange rate movements. This study aims to determine the efficacy of two prominent machine learning models, namely Vanilla Long Short-Term Memory Networks (LSTM) and Auto-Regressive Integrated Moving Average (ARIMA), in forecasting the exchange rate between the Malaysian Ringgit (MYR) and the United States Dollar (USD). Employing Python's robust statistical packages for time series forecasting, both Vanilla LSTM and ARIMA models undergo rigorous training on the dataset. Leveraging Python's programming capabilities enables in-depth analysis, essential for model refinement and accuracy assessment. Upon comparing the error measures of both models, it becomes evident that the Vanilla LSTM model outperforms ARIMA, exhibiting lower Mean Squared Error (MSE) and Root Mean Squared Error (RMSE) values. Specifically, the MSE and RMSE for Vanilla LSTM stand at 0.0102 and 0.1011, respectively, surpassing ARIMA's 0.0113 and 0.1062. Thus, affirming Vanilla LSTM's superiority in exchange rate forecasting. Consequently, the study concludes that Vanilla LSTM emerges as the most accurate model for exchange rate prediction, with a projected exchange rate of RM4.22 for July 2022.
Read full abstract