Predicting Exchange Rates of Morocco Using an Econometric and a Stochastic Model

To predict the exchange rate EUR / MAD & USD / MAD in Morocco we used two most answered methods in the theory: the Box-Jenkins econometric model and the stochastic model of Vasicek then the comparison of the forecasted data for the month of March 2018 of the two methods with the exchange rates actually observed allowed us to retain the econometric the autoregressive integrated moving average model ARIMA (2,1,2) for EUR / MAD and (3,1,2) for USD / MAD rather than the Vasicek model.


Introduction
The exchange rate is a tool of the economic policy of any country, open to the outside world, it is considered both a means of monetary regulation and an ideal instrument of external competitiveness, it is in this sense that Morocco has opted for a more flexible exchange rate regime which presents a risk to be managed by the banks and the insurance companies following an indexation of their results on exchange rates or elements of the assets or liabilities which are denominated in currency. may manifest itself in the form of capital losses as a result of the interconnection of international markets, exacerbating the volatility of foreign exchange markets.
To help policymakers and ALM committee choose the best model for predicting USD / MAD and EUR MAD exchange rate developments we have performed an empirical study of the two best-regarded

Box-Jenkins (Econometric) Model
The use of the econometric model to predict the exchange rate has been a subject of considerable academic scrutiny over the past few decades. A study by Alam (2012) that in case of in-sample the ARMA (1,1) model, whereas both the ARMA (1,1) and AR(1) models are capable to add value significantly to the forecasting and trading BDT/USD exchange rate in the context of statistical performance measures. (Ghalayini, 2013) has construct an econometric models capable to generate consistent and rational forecasts for the dollar/euro exchange rate; (Liuwei, 2006) use different methods, such as AR, MA, and ARIMA to forecast the exchange rate of US Dollar / Euro in the month of February 2005. And a lot of other works like (Al-Hamidy, 2010;Alam, 2012;Cheung & Lai, 2008;Etuk, 2012;Ghalayini, 2013;Liuwei, 2006;Olatunji & Bello, 2015;Reddy SK, 2015;Weisang & Awazu, 2008).

Data
In order to compare the two models ( Box-Jenkins and Vasicek) for predicting the exchange rate we use two time series EUR/MAD and USD/MAD can be taken directly from Casablanca Stock Exchange url http://www.casablanca-bourse.com/bourseweb/index.aspx the period covered is from 03/01/2000 to 09/03/2018( 4742 observations)

For the Box-Jenkins model
A time series has the property that neighboring values are correlated. This tendency is called autocorrelation. It is said to be stationary if it has a constant mean, constant variance and autocorrelation that is a function of the lag separating the correlated values. The autocorrelation expressed as a function of the lag is called the autocorrelation function (ACF).
A stationary time series {Xt} is said to follow an autoregressive moving average model of orders p and q (denoted by ARMA(p,q) ) if it satisfies the following difference equation (Note 1) where   t  is a system of uncorrelated random variables with zero mean and constant variance, called a white noise process, and the α i 's and β j 's constants; and L is the backward shift operator defined by If p = 0, model (1) becomes a moving average model of order q (denoted by MA(q)). If, however, q=0 it becomes an autoregressive process of order p (AR(p)). An AR(p) model of order p may be defined as a model for which a current value of the time series Xt depends on the immediate past p values: On the other hand, an MA(q) model of order q is whereby the current value Xt is a linear combination of the immediate past q values of the white noise process: An AR(p) can be modeled by: Then the sequence of the last coefficients { ii  } is called the partial autocorrelation function of (PACF) (Note 2) of {Xt}. The ACF of an MA(q) model cuts off after lag q whereas that of an AR(p) model is a mixture of sinusoidals tailing off slowly. On the other hand, the PACF of an MA(q) model tails off slowly whereas that of an AR(p) model tails off after lag p.
AR and MA models are known to have some duality characteristics. These include: 1) A finite order of the one type is equivalent to an infinite order of the other type.
2) The ACF of the one type exhibits the same behavior as the PACF of the other type.
3) An AR model is always invertible but is stationary if (L) = 0 has zeros outside the unit circle.
4) An MA model is always stationary but is invertible if (L) = 0 has zeros outside the unit circle.
Parametric parsimony consideration in model building entails preference for the mixed ARMA fit to either the pure AR or the pure MA fit. Stationarity and invertibility conditions for model (1) or (2) are that the equations A(L) = 0 and B(L) = 0 should have roots outside the unit circle respectively.
If a time series is non-stationary, Box and Jenkins (1976) shall have unit roots d times.
Then differencing to degree d renders the series stationary. The model (3) is said to be an autoregressive integrated moving average model of orders p, d and q and denoted by ARIMA (p, d, q).

Model Estimation
The involvement of the white noise terms in an ARIMA model necessitates a nonlinear iterative process in the model estimation. An optimization criterion like the least squares, maximum likelihood or maximum entropy is used. An initial estimate is usually used and each iteration is expected to be an improvement of the previous one until the estimate converges to an optimal one. However, for pure AR  (1985)). There are attempts to propose linear methods to estimate ARMA models (See for example, Etuk (1987Etuk ( , 1998). We shall use Eviews software which employs the least squares approach to analyze the data.

Diagnostic Checking
The model that is fitted to the data should be tested for goodness-of-fit. The automatic order determination criteria AIC and SIC are themselves diagnostic checking tools. Further checking can be done by the analysis of the residuals of the model. If the model is correct, the residuals would be uncorrelated and would follow a normal distribution with mean zero and constant variance. that's explain the movement in the two curves in the opposite directions and TABLE1 shows that the covariance of the two series EUR / MAD and USD / MAD are < 0.

Figure 6. Correlogram of DEURMAD
From the Correlogram the ARIMA model (2,1,2) may be the appropriate model of DEURMAD that we will validate by adopted estimates tests  (3,1,3) may be the appropriate model of DUSDMAD series that we will validate by adopted estimates tests.