0% found this document useful (0 votes)
68 views

2014 Time - Series - Approach - To - Forex - Rate - Analy PDF

Uploaded by

Ali Aziz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

2014 Time - Series - Approach - To - Forex - Rate - Analy PDF

Uploaded by

Ali Aziz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

International Journal of Statistics and Applications 2014, 4(1): 76-84

DOI: 10.5923/j.statistics.20140401.08

Time Series Approach to Forex Rate Analysis between the


Nigeria Naira and the U.S. Dollar
Etebong P. Clement

Department of Mathematics and Statistics, University of Uyo, P.M.B.1017 Uyo, Nigeria

Abstract The study aims at fitting a statistical time series model to the Forex rate data between the Nigeria naira and the
U.S. dollar. The plots of the sample acf and pacf of the original series indicated that the series was not stationary.
Transformation of the series was made by differencing to obtain stationarity. Following the distribution of the acf and pacf of
the differenced series, an ARIMA (0, 1, 1) model was identified, the parameters of the model were estimated and
diagnostically checked to prove its statistical significant and adequacy at both 0.05 and 0.01  –levels of significance under
the Ljung-Box goodness of fit test. The Normalized Bayesian Information Criterion (BIC) was explored to confirm the
adequacy of the model. Again, among a class of significantly adequate set of ARIMA (p,d,q) models of the same data set, the
ARIMA (0,1,1) model was found as the most suitable model with least BIC value of –2.366, MAPE of 2.424, RMSE of 0.301
and R-square of 0.749. Estimation by Ljung-Box test with Q (18) = 9.746, 16 d.f and p-value of 0.880 showed no
autocorrelation between residuals at different lag times. Finally, a forecast for a lead time ( ) of 12 was made.

Keywords ARIMA, Bayesian Information Criterion (BIC), Box-Jenkins Approach, Ljung-Box Statistic, Time Series
Analysis

been one of the most important factors for the economic


1. Introduction growth in the economies of most developed nations while an
inappropriate (high volatility) exchange rate has been a
Foreign exchange market is a market where foreign major obstacle to the economic growth of many African or
currency problems are resolved in international trade. The less developed nations like Nigeria.
market changes local currencies for foreign ones used in The measurements of the exchange rate of these
buying goods and services from other countries of the world currencies over a period of time constitute a time series.
[1]. Hence, it is a stochastic process. A stochastic process is a
It is generally believed that the degree of financial collection of random variables that are indexed by an index
transactions in and out of a country depends on a number of set where the collection in itself is a family of random
factors prevailing in that country. Since the advent of money, variables [5], and a time series is a type of stochastic process
the world has always experienced the movement of money where observations are taken sequentially in time.
from one country to another due to economic, cultural, social, In this work, time series analysis of data on the Nigeria
political and other reasons. The Central Bank in every naira exchange rate per U. S dollar under the Interbank
country usually keeps a record of such money transactions Foreign Exchange Market (IFEM), will be made. Time series
through various financial intermediaries. Every country has analysis is the application of statistics to a time series data.
its own money, which can only be accepted for use within its The [1] approach to time series analysis, forecasting and
territory. Hence, the establishment of foreign money became control has been potentially useful in many types of situation
necessary. Foreign money is the money of other countries of which involve the building of models for discrete time series
the world which serves as money in the foreign exchange and dynamic system. The model will be aimed at
market [1]. determining whether the economic condition of Nigeria has
Exchange rate also known as the foreign exchange rate or effect(s) on the naira exchange rate.
Forex rate between two currencies specifies how much one
currency is worth in terms of the other. It is the value of a
foreign nation’s currency. An appropriate exchange rate has 2. Methodology
* Corresponding author: 2.1. Method of Analysis
[email protected] (Etebong P. Clement)
The following methods will be adopted for this work:
Published online at http://journal.sapub.org/statistics
Copyright © 2014 Scientific & Academic Publishing. All Rights Reserved (i) We will transform the series (if necessary) to attain
International Journal of Statistics and Applications 2014, 4(1): 76-84 77

stationarity ()
 = () (3)
(ii) The iterative method of model building as described
by [1] will be used. This includes: 2.3. Model Identification
(a) Identification of the models Identification methods are rough procedures applied to a
(b) Estimation of model parameters set of data to indicate the kind of representational model
(c) Diagnostic checking of the adequacy of the fitted which is worthy of further investigation. The specific aim is
model. to obtain some idea of the values of p, d, and q needed in the
(iii) The future values of the naira exchange rate data general linear ARIMA model and to obtain initial guesses for
using the best fitted model obtained will be forecasted. The the parameters. The tentative model so obtained provides a
Box-Jenkins approach will be adopted for the prediction. starting point for the application of the more formal and
(iv) All computations will be done using commercially efficient estimation.
available computer package for statistical analysis. We will Graphical plots of series against time are always an
most often use the STATISTICA package effective preliminary investigative method to ascertain the
nature of the series in terms of stationarity and seasonality.
2.2. The Autoregressive Integrated Moving Average The foremost step in the process of modeling is to check
(ARIMA) Process for the stationarity of the time series data. This is done by
The general form of the model which we will use to observing the graph of the data or autocorrelation and the
describe time series, is the autoregressive integrated moving partial autocorrelation functions [7]. Another way of
average ((ARIMA (p, d, q)) process checking for stationarity is to fit the first order AR model to
the raw data and test whether the coefficients  is less than
()∇  = 0 + () (1) one.
where The task is to identify an appropriate sub-class of model
() = 1 − 1  − 2 2 − ⋯ −   from the general ARIMA family.
() = 1 − 1  − 2 2 − ⋯ −   ()∇  = () (4)
In what follows: which may be used to represent a given time series.
(1) () will be called the autoregressive operator, it is Our approach will be:
assumed to be stationary, that is, the roots of () = 0 lie (i) To difference  as many times as is needed to produce
outside the unit circle. stationarity.
(2) () = ()(1 − ) = ()∇ will be called the
() = () (5)
generalized autoregressive operator, it is nonstationary with
d of the roots of () = 0 equal to unity. where
(3) () will be called the moving average operator, it is  = (1 − )  = ∇  (6)
assumed to be invertible, that is, the roots of () = 0 lie
(ii) To identify the resulting ARIMA process.
outside the unit circle.
(4) When  = 0, the model (1) represents a process. The Our principal tools for putting (i) and (ii) into effect will
requirements of stationarity and invertibility apply be the autocorrelation and the partial autocorrelation
independently, and in general, the operators () and functions.
() will not be of the same order. Non-stationary stochastic process is indicated by the
(5) When the constant term 0 is omitted, the model (1) is failure of the estimated autocorrelation functions to die out
capable of representing series which have stochastic trends, rapidly, to achieve stationarity; a certain degree of
as typified for example, by random changes in the level and differencing (d) is required. The degree of differencing (d),
slope of the series. In general, however, we may wish to necessary to achieve stationarity is attained when the
include, a deterministic function of time f (t) in the model. In autocorrelation functions of
particular, automatic allowance for a deterministic
 = ∇  (7)
polynomial trend, of degree d, can be made by permitting 0
to be nonzero. For example, when d = 1, we may use the die out fairly quickly.
model with 0 ≠ 0 to estimate a possible deterministic The autocorrelation function of an AR (p) process tails off,
linear trend in the presence of nonstationary noise. while its partial autocorrelation function has a cut off after
(6) To allow 0 being nonzero is equivalent to permitting lag p. Conversely, the acf of a MA (q) process has a cut off
0 after lag q, while its partial autocorrelation function tails off.
( ) = (∇  ) =  = 1−  (2) However, if both the acf and pacf tail off, a mixed ARMA
1 − 2 − … − p
(p,q) process is suggested. The acf of a mixed ARMA (p,q)
to be nonzero, an alternative way of expressing this more process is a mixture of exponentials and damped sine waves
general model (1), is in the form of a stationarity invertible after the  −  lags. Conversely, the pacf of a mixed ARMA
ARMA process in (p,q) process is dominated by a mixture of exponentials and

 =  −  . damped sine waves after the first  −  lags.
That is,
78 Etebong P. Clement: Time Series Approach to Forex Rate Analysis between the Nigeria Naira and the U.S. Dollar

2.4. Model Estimation 1 : Residual is not white noise


If the sample value of  exceeds the critical value of a  2
After a tentative model has been identified, the next stage
distribution with s degrees of freedom, then at least one value
of model building is the estimation of the parameters of the
of  is statistically different from zero at the specified
identified model. An obvious estimating procedure in model
significance level.
fitting situations is, the familiar least-squares approach,
[9] provide the Normalized Bayesian Information
where one chooses the particular set of coefficients making
Criterion. The Normalized-BIC is an asymptotic result
the sum of squared errors (the e’s) as small as possible.
derived under the assumptions that the data distribution is in
Preliminary estimates of the parameters are obtained from
the exponential family.
the values of appropriate autocorrelation of the differenced
Let : The observed data; : The number of data points
series. These can be used as starting values in the search for
in , the numbers of observations, or equivalently the sample
appropriate least square estimates. In practice not all size; : The numbers of free parameters to be estimated. If
parameter in the models are significant. The ratios the estimated model is a linear regression,  is the number of

1.96×  > 1 (8) regressors, including the intercept;
(|): The probability of the observed data given the
may suggest trying a model in which some of the parameters number of parameters; or, the likelihood of the parameters
are set to zero [4]. Then, we need to re-estimate the model given the dataset;
after each parameter is set to zero. : The maximized value of the likelihood functions for the
The application of least squares to models of the form in estimated model.
(1): ()∇  = 0 + () shall be used to obtain The formula for the Normalized-BIC is:
estimates for the parameters of the identified model.
−2. ln (|) ≈  = −2. ln  + . () (11)
2.5. Model Diagnostic Check with the assumption that the model errors or disturbances are
After a tentative model has been identified, the next stage independent and identically distributed according to normal
of model building is the estimation of the parameters of the distribution and that the boundary condition that the
identified model. After the parameters have been estimated, derivative of the log likelihood with respect to the true
the fitted model will be subjected to diagnostic check and variance is zero, this becomes (up to an additive constant,
tests of goodness of fit. which depends only on  and not on the model ;[8].
The diagnostic check is a procedure that is used to check  =  . (2 ) + . () (12)
residuals. The residual should fulfil the models assumption
where 2 is the error variance. The error variance in this
of being independent and normally distributed. If these case is defined as:
assumptions are not fulfilled, then another model is chosen
2 =  ∑=1( −  )2
1
for the series. (13)
The following test statistic will be used for testing the
One may point out from probability theory that 2 is a
independency of the residuals. Also, statistical inferences of
biased estimator for the true variance,  2 . Let �2 denote
the parameters and the goodness of fit of estimated statistical
unbiased form of approximating the error variance. It is
models will be made.
defined as:
[2] provide an overall test on the autocorrelations of the
�2 = −1 ∑=1( −  )2
1
estimated residuals. The procedure is to compare (14)
=  ∑
=1  ( )
2
(9) Additionally, under the assumption of normality the
(where  =  −  is the number of weights used to fit the following version may be more tractable
model) with tabulated values of the chi-squared statistic for  =  2 + . () (15)
 −  −  degrees of freedom, the hypothesis of white
noise behaviour in the residual being rejected at high values Note that there is a constant added that follows from
of . The test relies for its validity on m being moderately transition from log-likelihood to  2 ; however, in using the
large (generally, at least equal to 20). [6] statistic tests BIC to determine the “best” model the constant becomes
whether a group of autocorrelations of a time series are less trivial.
than zero, the test statistic is given as: Given any two estimated models, the model with the lower
2
value of BIC is the one to be preferred. The BIC is an
 = ( + 2) ∑=1 −

(10) increasing function of 2 and an increasing function of .
That is, unexplained variations in the dependent variable and
where
the number of explanatory variables increase the value of
: Number of observations
BIC. Hence, lower BIC implies either fewer explanatory
: Length of coefficients to test autocorrelation variables, better fit, or both. The BIC generally penalizes free
 : Autocorrelation coefficient (for lag ) parameters more strongly than does the Akaike Information
The hypothesis of Ljung - Box test are: Criterion, though it depends on the size of  and relative
0 : Residual is white noise magnitude of  and .
International Journal of Statistics and Applications 2014, 4(1): 76-84 79

It is important to keep in mind that the Normalized-BIC failure of the sample autocorrelations of the original series
can be used to compare estimated models only when the (given in figure 2) to die out quickly at high lags (lags 16),
numerical values of the dependent variable are identical for suggesting that transformation is required to produce
all estimates being compared. The models being compared stationarity. Consequently, the difference method of
need not be nested, unlike the case when models are being transformation was chosen and the first difference ( = 1)
compared using an  or likelihood ratio test. of the series was made. The plot of the differenced series is
given in figure 4. Both the autocorrelation and partial
autocorrelation functions of the differenced series die out
3. Analysis of Data quickly at high lags indicating that further differencing is not
Having discussed some basic concepts and theoretical required. Also, they have not exhibited any seasonal pattern.
foundation of time series that will enable us analyze the data. Using figure 5 and figure 6, the differenced series will be
We now present a step by step analysis of our dataset of the denoted by { } for t = 1,2,…,119, where t = ∇Xt = Xt –
Nigeria naira per U.S. dollar. Xt-1 .The autocorrelation coefficients of t appear to have a
cut off after lag one and this suggests the presence of a
3.1. Data Collection and Source moving average term in the model, hence, we take q = 1 . The
partial autocorrelation function confirms as it appears to be
The data were collected from the publications of the tailing off. Hence, using equation (4), the model being
Nigeria Deposit Insurance Company (NDIC). It covers the entertained is an IMA model of order (0, 1, 1) given by
monthly naira exchange rate per U. S. dollar from January
∇ = ()
1995 to December 2004. The source of data as published by
the NDIC includes the Central Bank of Nigeria (CBN) ∇ = (1 − 1 )
 = (1 − 1 ) (16)
3.2. Model Identification
The plots of the autocorrelation and partial autocorrelation
The plot of the original series is given in figure 1 and it functions of the residuals from the tentatively identified
exhibits a nonstationary behaviour indicated by its constant model are given in figure 7.
growth. This nonstationary behaviour is confirmed by the

Figure 1. Plot of the original series of IFEM


80 Etebong P. Clement: Time Series Approach to Forex Rate Analysis between the Nigeria Naira and the U.S. Dollar

Figure 2. Autocorrelation function of original series of IFEM

Figure 3. Partial autocorrelation function of original series of IFEM


International Journal of Statistics and Applications 2014, 4(1): 76-84 81

Figure 4. Plot of the first difference of the series of IFEM

Figure 5. Autocorrelation function of the differenced series of IFEM


82 Etebong P. Clement: Time Series Approach to Forex Rate Analysis between the Nigeria Naira and the U.S. Dollar

Figure 6. Partial autocorrelation function of the differenced series of IFEM

Figure 7. acf and pacf of IFEM (0,1,1) Residuals


International Journal of Statistics and Applications 2014, 4(1): 76-84 83

3.3. Estimation of Model Parameters by exploring the Normalized Bayesian Information Criterion
Having tentatively identified what appears to be a suitable (BIC). In a class of statistically significant ARIMA (p,d,q)
model for the foreign market naira exchange rate data, the models fitted to the series, the ARIMA (0,1,1) model had the
next step is to obtain the least squares estimates of the least BIC value of 2.834.
parameters of the models. Table 2. Model Statistics
We used the STATISTICA package to fit the models to
Model Fit Statistics Ljung-Box Q (18)
our data set and we obtained the following estimates.
That is, the moving average coefficient 1 was estimated No. of
R2 RMSE MAPE BIC statistics D.F Sig.
outliers
to be 0.731, with a standard error of 0.084 and a t-ratio of
5.465. 0.963 3.961 2.387 2.834 15.174 17 0.583 0

Table 1. Model Parameters 3.5. Forecasting with the Model


Estimates S.E t-radio Sig. Forecasting based on the fitted model was computed up to
lead time of 12, and the one-step forecasting and the 95%
Coefficients MA Lag1 0.731 0.084 5.465 0.000
Difference 1 - - - confidence limits are displayed in table 3.
Table 3. One-step forecast of the ARIMA (0,1,1) Model

3.4. Model Diagnostic Checking Lead time Forecast 95% Lower Limit 95% Upper Limit
1. 133.92 126.08 141.77
The model having been identified and the parameters
2. 134.41 125.76 143.07
estimated, diagnostic checks are then applied to the fitted
models to test for their adequacy. 3. 134.90 125.50 144.30
The residuals from the fitted models were obtained by 4. 135.39 125.31 145.47
rewriting the models in terms of their residuals and using it 5. 135.87 125.15 146.60
recursively with initial estimate of et and t obtained by 6. 136.36 125.03 147.69
back-forecasting. The most important diagnostic check 7. 136.85 124.94 148.76
consists of examining the autocorrelation function of the 8. 137.34 124.88 149.79
residuals which are given in figures 7. It can be seen that 9. 137.82 124.82 150.81
most of the coefficients are within the significance bounds of 10. 138.31 124.82 151.80
plus or minus two standard error (±2/√ 119 = 0.183)
11. 138.80 124.82 152.77
Rather than consider the autocorrelation function of the
12. 139.29 124.84 153.73
residuals individually as in above, an indication is often
needed of whether, say, the first 20 autocorrelations of the
residuals taken as a whole, indicate inadequacy of the model.
For this model, Q = 14.70. The 10% and 5% points for 2 4. Summary
with 19 degrees of freedomare 27.20 and 30.14 respectively. The sample acf and pacf of the original series (series D)
Therefore since the test statistics Q is not unduly large and were computed using the SPSS 17 Expert modeler and their
the evidence does not contradict the hypothesis of white graphs were plotted. These were used in identifying the
noise behaviour in the residuals, the model is adequate. appropriate model. The series exhibited non-stationary
Five criteria: The Normalized Bayesian information behaviour, following the inability of the sample acf of the
criterion (BIC), the R-square, Root Mean Square Error series to die our rapidly even at high lags. The series was
(RMSE), the Mean Absolute Percentage Error (MAPE) and transformed by differencing once, and stationarity was
the Ljung-Box Q statistic were used to test for the adequacy attained. The plot of the differenced series indicated that the
and statistical appropriateness of the model. series is evenly distributed around the mean.
First, the Ljung – Box (Q) Statistic test was performed Following the distribution of the acf and pacf of the
using SPSS 17 Expert Modeler (see table 2), the Ljung – Box differenced series, an ARIMA (0,1,1) model given by
Statistic of the model is not significantly different from zero, ∇ = 0.731−1 +  was identified. The parameters of
with a value of 15.174 for 17 d.f and associated p-value of the fitted model were estimated. The model was then
0.583, thus failing to reject the null hypothesis of white noise. subjected to statistical diagnostic check using the Ljung-Box
This indicates that the model has adequately captured the test statistic and the Normalized Bayesian Information
correlation in the time series. Criterion (BIC). Analysis proved that the model is
Again, the model is adequate in the sense that the plots of statistically significant, appropriate and adequate.
the residual acf and pacf in figure 7 show a random variation, The fitted model was used to forecast values of the IFEM
thus, from the origin zero (0), the points below and above are naira exchange data for a lead time ( ) of 12. The forecast is
all uneven, hence the model fitted is adequate. The adequacy a good representation of the original data which neither
and significant appropriateness of the model was confirmed decreases nor increases.
84 Etebong P. Clement: Time Series Approach to Forex Rate Analysis between the Nigeria Naira and the U.S. Dollar

5. Conclusions REFERENCES
The sample acf and pacf of the original series ( IFEM [1] Anyaele, J. U. 1990, Comprehensive Economics. A. Johnson
series) were computed and their graphs were plotted. These (publishing) Enterprises, Lagos, Nigeria.
were used in identifying the appropriate model. The series [2] Box, G. E. P., and Jenkins, G. M. 1976, Time Series Analysis;
exhibited non-stationary behaviour, following the inability Forecastingand Control, Holden-Day Inc. U.S.A.
of the sample acf of the series to die our rapidly even at high
[3] Box, G. E. P and Pierce, D. A. 1970, Distribution of Residuals
lags. The series was transformed by differencing once, and Autocorrelations in Autoregressive Integrated Moving
stationarity was attained. The plot of the differenced series Average Time Series Models. Journal of American Statistical
indicated that the series is evenly distributed around the Association 65, 1059-1526.
mean.
[4] Enders, W. 2003, Applied Econometrics Time Series, John
Following the distribution of the acf and pacf of the Wiley & Sons, U.S.A.
differenced series, an ARIMA (0,1,1) model given by  =
(1 − 0.731) ( ∇ = 0.731−1 +  ) was identified. [5] Karlin, S. and Taylor, H. 1975, A First Course in Stochastic
The parameters of the fitted model were estimated. The Process, University Press, London.
model was then subjected to statistical diagnostic check [6] Ljung, G., and Box, G. E. P. 1978, On a Measure of lack of fit
using the Box-Pierce test statistic, Ljung-Box test statistic in Time Series Models. Biometrika 65,553-564.
and the Normalized Bayesian Information Criterion (BIC).
Analysis proved that the model is statistically significant, [7] Makridakis, S., Wheelwright, S. C. and Hyndman, R. J. 1998,
Forecasting Methods and Applications, John Wiley, New
appropriate and adequate. York.
The fitted model was used to forecast values of the Nigeria
naira exchange rate per U.S. dollar for a lead time ( ) of 12. [8] Priestley, M. B. 1981, Spectral Analysis and Time Series.
Academic Press. London.
The forecast is a good representation of the original data.
[9] Schwarz, G. E. 1978, Estimating the dimension of a Model.
Annals of Statistics. 6(2), 461-464.

You might also like