EXCHANGE RATE FORECAST – MACHINE LEARNING

Abstract

Exchange rate analysis and the forecast is widely studied and researched in the current rapidly emerging era. These results facilitate better decision-making in many sectors where money is involved. This thesis follows the complete cycle of analyzing, forecasting, and visualizing the data using the Data Science Process. The exchange rate from GBP to EUR from the historical data available on ofx.com. Data from 2010 to 2020 is analyzed and forecasted from 2020 to 2022.  Data prediction used various forecasting methods, both statistical and machine learning methods(Holt-Winters and ARIMA). This study also compares all the mentioned forecasting methods’ accuracy and determines the most appropriate method. From the results, this thesis concludes that there cannot be any right or wrong method to forecast data, but it all depends on the type of forecast requirement and type of dataset considered. In this research, the ARIMA forecast method is more appropriate, with an accuracy of 96.73%. Accuracy may further be improved with other hybrid models using Artificial Neural Networks etc.

Introduction

The economic growth of the country is a very critical and essential aspect. Economic growth plays a significant role in making decisions towards the financial markets, trade, money flows, interest rates, inflation, and currency exchange rates. Exchange rates facilitate international and intercontinental trading, and this globalization encourages trading giving abundant opportunities to keep interest rates and inflation at low values. Technological growth, human capital, and physical capital goods define the country’s economic growth. It is a measure of goods and services provided by the government. Value of goods and services differ for every type/variety location of produce too. Hence the economic growth is not measured in terms of goods or services but by US Dollars. Then and there comes the currency exchange rates into undeniable considerations.

The currency exchange rates have a predominant contribution in international trading markets. A country with a higher and stable economy has higher export rates and cheaper import rates. Thereby it is quite important to find the right gap and time to invest and generate higher profits. Many factors like the country’s inflation, interest rates, public debt, and robust economic functioning influence exchange rates.  In concise, it is clear of possibilities for an investor from weaker economic country to invest in overseas equities and enhance their returns. Analyzing exchange rates and understanding the trends, seasonality, and patterns in the exchange currency rate will enable financial decision-makers to invest wisely or make a wise decision.

Data Science Process

Data science provides efficient steps to follow so that the data can be easily analyzed and visualized. The process focuses on five major steps outlined below. This research follows the mentioned steps to prepare the data, identify an appropriate model, and visualize the predicted exchange rates.

Forecasting Process

Every forecast follows a seven-step process to be successful. The whole process is about starting the forecast project, designing, and implement it. The steps are outlined below.

  1. Purpose: Identify the purpose of the forecast
  2. Target: Determine the target element to be forecasted
  3. Type: Choose the time horizon = short, medium or long-range forecast
  4. Model: Analyze an appropriate forecast model for the chosen data
  5. Validate: Train and test the model for available data for accuracy
  6. Forecast: Forecast the target with an accurate model
  7. Visualize: forecast the result and analyze the results

Forecast Methods and Results

In this research, statistical methods and machine learning models (Holt-Winters and ARIMA Model) will be used to forecast the exchange rate. Machine learning techniques are convenient to identify a better suitable model for the dataset. First, split the dataset into a training sample and testing sample in 80:20 ratios. Since the data is gathered from 2010 Jan to Nov 2020, it is sampled as below. The accuracy is measured by MAPE /Mean Absolute Percentage Error and RMSE/Root Mean Square Error.

Training Data – Date Vs Rate from Jan 2010 to Dec 2018

Testing Data – Date Vs Rate from Jan 2019 to Nov 2020

Accuracy – measured with mean and mean square error.

Naïve, Mean and Drift Approach

Naïve, mean, and drift methods are simple statistical methods that depend only on the past value of the data and do not require any other factors or information to evaluate.

Test Results – Mean, Naive, Drift
Forecast – Mean, Naive, and Drift

 

Holt-winters

Forecasting the univariate time-series using the Holt-Winters object using R programming results is below 80% training and 20% testing.

Test Results – Holt-Winters

 

The current research uses the additive Holt-winters method to forecast because the additive method is preferred if seasonal variations are nearly constant and multiplicative when seasonal variations are proportional to the changes in series.

Test Results – Holt-Winters ( Seasonal )

 

Forecast – Holt-Winters

Understanding ARIMA

Auto-Regressive Integrated Moving Average (ARIMA) method is widely used for time series forecast analysis. ARIMA focuses on autocorrelation,  while other approaches focus on seasonality and the data trend. ARIMA model is applied when the time series is stationary, but from the Augmented Dickey-Fuller test result, the exchange rate dataset is non-stationary. Series can be made stationary by differentiating. To understand this model better, explicit knowledge on ACF (Autocorrelation Function) and PACF (Partial Autocorrelation Function) is essential.  The forecast process is explained in the next section, and this thesis follows the below process to forecast the exchange rate from 2020 to 2022.

Seasonality ( P, D, Q)

ARIMA calculation requires three parameters p, d, and q. ARIMA (p, d, q), p is the autocorrelation order, d order of differentiation, and q is the moving average order. In this thesis, the values of p, d, and q are taken with basic assumptions from ACF, PACF, and L Jung-Box test. As the series also has a seasonal component, P, D and Q are predicted first based on the AIC value. The lower the AIC value more appropriate the P, D, and Q are.

ARIMA (p, d, q)(P, D, Q)

Differentiating the series by order 1 (it is ideal for keeping d = 0 since the series is non-stationary, d cannot be 0), and the order of mean is assumed to be 1. After the L Jung-Box test and plots, the value of p is analyzed, and further assumptions of p, d, and q are made.

Therefore, the ARIMA forecast will be done at different points, with d = 1 and seasonal point (0,1,0) to analyze the AIC value. For all points of the ARIMA forecast, the most appropriate and accurate point can be determined by AIC ( Akaike Information Criteria ) value. Forecast with the lowest AC value is considered the most accurate model.

AIC is lowest at the ARIMA (1,1,1)(0,1,0)[12] , and using auto ARIMA function, the predicted values of p,d and q are  (2, 1, 2) and AIC value is higher -811.99. However, automation in identifying the points is not trustable all the time. Moreover, on occasions, higher AIC values have lower MAE and lower RMSE values. To eliminate this confusion, the Accuracy test is run on both points to check the magnitude of the error.

Conclusion

Forecast Model After forecasting the exchange rate data from GBP to EUR from 2018 to 2020, the accuracies of statistical methods and machine learning methods are as below.

From all these observations, the ARIMA model at (1, 1,1) (0,1,0) has the least values for all the errors MAPE 3.26 and the highest accuracy of 96.73%. Forecasting the exchange rate from GBP to EUR from 2020 to 2022 (24 months).

 

Skip to content
%d bloggers like this: