# Volatility Analysis of Exchange Rate with Correlated Errors: A Sliding Data Matrix Approach

Authors: Felix Okoe Mettle; Gabriel Kallah-Dagadu; Emmanuel Aidoo; Godwin Debrah; Dennis Arku
Journal: Journal of Applied Mathematics
 (2022)

---

## Abstract

The main objective of this study is to propose a method of analysing the volatility of a seemingly random walk time series with correlated errors without transforming the series as performed traditionally. The proposed method involves the computation of moving volatilities based on sliding and cumulative data matrices. Our method rests on the assumption that the number of subperiods for which the series is available is the same for all periods and on the assumption that the series observations in each subperiod for all the periods under consideration are a random sample from a particular distribution. The method was successfully implemented on a simulated dataset. A paired samplet-test, Wilcoxon signed rank test, repeated measures (ANOVA), and Friedman tests were used to compare the volatilities of the traditional method and the proposed method under both sliding and cumulative data matrices. It was found that the differences among the average volatilities of the traditional method and sliding and cumulative matrix methods were insignificant for the simulated series that follow the random walk theorem. The implementation of the method on exchange rates for Canada, China, South Africa, and Switzerland resulted in adjudging South Africa to have the highest fluctuating exchange rates and hence the most unstable economy.


---

## Body

## 1. Introduction

A random walk is a statistical phenomenon where a variable follows no discernible trend and moves seemingly at random. This phenomenon was originally attributed to stock market prices. According to Fama [1], in an efficient stock market, prices should follow a random walk process, where future price changes are random and consequently unpredictable. Phanrattinon et al. [2] posited that for an efficient market, investors may make investments based on short-term movements and not by applying the technical method, which is based on historical data.Random walk hypothesis research has been done on many stock markets across the world for both developed and emerging economies. These include markets in Asia [2–5], Middle East [6–8], Eastern Europe [9], Africa [10, 11], South America [11, 12], etc. The results of these researches are mixed. For example, Phanrattinon et al. [2] found that the stock index returns of China, Indonesia, Korea, and Thailand follow random walk theory while those of Australia, Hong Kong, and Singapore do not. Also, Hoque et al. [13] found the markets of Taiwan and Korea to be inefficient while those of Hong Kong, Indonesia, Malaysia, Philippines, and Singapore were found to be efficient. Though the theory of random walk was originally associated with market returns, many other time series data also exhibit the random walk characteristics.Charles and Darné [14] conclude that macroeconomic aggregates like exchange rate, gross domestic product, and gross national product data are better modelled as random walk processes rather than stationarity trends. The assumptions of random walk theory postulate that each random variable that obeys a random walk property has the same probability and is independent of every other random variable. Most time series that seem to exhibit random walk violate some or all the assumptions above; this leads to the transformation of such series by researchers.There is a great deal of literature on series transformation, Salles et al. [15] reviewed the nonstationary methods of time series transformation. Nachane and Clavel [16] also explored several methods of statistical analysis on nonstationary time series. Rahimi et al. [17] also explored a semisupervised regression algorithm that learned to transform one time series into another time series. Other researchers such as Tommaso and Helmut [18] questioned the effectiveness of series transformation. However, series transformation just like any other form of transformation leads to loss of information, bias estimates, and complex interpretation of results [19, 20].There is little or no study to the best of our knowledge that focuses on finding a way to use a seemingly random walk time series data when the error terms are serially correlated other than the conventional way of series transformation. The aim of this research is to propose a novel method for estimating the volatility of serially correlated errors without transforming the data.The rest of the paper is organised as follows: Section2 presents the methods and materials which consist of the theoretical framework. This section also provides details of theorems and corollaries upon which the proposed method is based. Specification of the proposed method and results of the implementation of the proposed method on simulated data are also presented. Section 3 presents the results of the implementation of the proposed method on empirical data. Finally, Section 4 provides discussions and conclusions emanating from the results, and recommendation for future research direction is also presented.


## 2. Materials and Methods

This section of the paper involves theoretical framework, model specification, and results of the implementation of the proposed method on simulated data.


### 2.1. Theoretical Framework

In this subsection, the theorem and some corollaries which form the basis of the methodology for monitoring volatility of a series (e.g., returns) are presented.Theorem 1.
SupposeX=X1,X2,⋯,Xm is a random vector of m components with covariance matrix Σ=σijm×m. Then, the standard error σXsum of the sum Xsum=∑i=1mXi of the components of X is given by
(1)σXsum=∑i=1mσi2+2∑i≠jσij1/2,where σii=σi2,i=1,2,⋯,m.Proof.
WriteXsum=∑i=1mXi=aTX, where a is a column vector of m components each of which is unity (one).
Then,VarXsum=VaraTX=aTΣa=∑i=1mσi2+2∑i≠jσij, acknowledging a quadratic form of the symmetric matrix Σ with respect to a.
Hence, the required resultσXsum=∑i=1mσi2+2∑i≠jσij1/2.Corollary 2.
If the components ofX are identically distributed with CovXi,Xj=υ,i≠j, and VarXi=σ2,i=1,2,⋯,m, then
(2)σXsum=mσ2+mm−1υ1/2.Proof.
The proof is trivial by substitutingσi2=σ2 for i=1,2,⋯,m and σij=υ for all i≠j in Equation (1).Corollary 3.
If the components ofX are independent but not identically distributed, then
(3)σXsum=∑i=1mσi21/2.Proof.
Again, the proof is trivial by substitutingσij=0 for all i≠j in Equation (1).Corollary 4.
If the components ofX are i.i.d. (independent and identically distributed), then
(4)σXsum=mσ.Proof.
The proof is clear by substitutingυ=0, in Equation (2).


### 2.2. Model Specification

The paper assumes that the number of subperiods (e.g., days, months, or quarters) for which the time series is observed is the same for all periods (e.g., months and years) for this proposed methodology. Furthermore, the observations of the series at a particular period for all the years under consideration are assumed to be a random sample from a particular distribution. It is also assumed that all distributions may be independent or not. Thus, by lettingXij represent the observed value of the series at period jj=1,2,⋯,g in year ii=1,2,⋯,n with g and n representing the number of periods (days/months) in a month (year) and number of months (years) under consideration, respectively, we have a data matrix M given as
(5)M=X1,X2,⋯,Xg,where for each j=1,2,⋯,g,Xj=Xnj,Xn−1j,⋯,X1jT is considered a sample from a given distribution.From matrixM, the paper suggests the construction of two kinds of subdata matrices, the moving data matrices and the cumulative data matrices. The first kind is n−l+1 moving (sliding) data matrices of length l denoted by Mk and given as
(6)Mk=Xk1,Xk2,⋯,Xkg,k=0,1,⋯,n−l,where Xkj=Xl+k,j,Xl+k−1,j,⋯,X1+k,jT,j=1,2,⋯,g.The second kind is alson−l+1 cumulative data matrices of length k denoted by Mk∗ given as
(7)Mk∗=Xk1∗,Xk2∗,⋯,Xkg∗,k=l,l+1,⋯,n,where Xkj∗=Xkj,Xk−1j,⋯,X1jT,j=1,2,⋯,g.SupposeSkk=0,1,⋯,n−l is the unbiased estimate of the covariance matrix, based on Mk of the random vector X=X1,X2,⋯,XgT, where Xjj=1,2,⋯,g have the same distribution as the population from which the series for the ith period in all the years under consideration. Then, based on the theorem, the paper proposes an l length moving volatility of the series to be defined as
(8)σk=1gaTSka1/2,k=0,1,2,⋯,n−l,where a is a column vector of order g with each component equal to one.Alternatively, ifSk∗k=l,l+1,⋯,n is the unbiased estimate of the covariance matrix based on Mk∗ of the random vector X defined previously, then the proposed cumulative volatility of the series is given by
(9)σk∗=1gaTSk∗a1/2,k=l,l+1,⋯,n,where a is as defined previously.Based on the matricesMk and Mk∗, the bootstrap confidence intervals can be constructed for σk and σk∗, respectively.The pair pointsk,σk,k=0,1,2,⋯,n−l, or k,σk∗,k=l,l+1,⋯,n, may be plotted to display the moving volatility or the cumulative volatility to appreciate a pictorial view of the data.IfXij’s are investment returns, then moving standardized rates (based on sliding and cumulative data matrices) can be computed, respectively, as follows:
(10)qk=X¯k−Rkσk,k=0,1,2,⋯,n−l,where X¯k=1/g∑j=1gXi+kj and
(11)qk∗=X¯k∗−Rkσk∗,k=l,l+1,⋯,n,where X¯k∗=1/g∑j=1gXkj with Rk being the low-risk return for years l+k and k, respectively, for Equations (10) and (11). Bootstrap confidence intervals of qk and qk∗ may also be constructed for each k under the two situations. The standardized rates so specified are the same as the Sharpe ratio under certain distributional and dependency conditions. The use of these rates were not considered in this study.Equations (8) to (11) are with reference to a time series Xt, which is governed by the model:
(12)Xt=μ+εt,t=1,2,⋯.On the other hand, if the seriesXt is governed by the model
(13)Xt=Xt−1+εt,t=1,2,⋯,then Equations (8) to (11), respectively, become
(14)σk=aTSka1/2,k=0,1,2,⋯,n−l,σk∗=aTSk∗a1/2,k=l,l+1,⋯,n,qk=gX¯k−Rkσk,k=0,1,2,⋯,n−l,qk∗=gX¯k∗−Rkσk∗,k=l,l+1,⋯,n,where all the symbols as previously defined but the data matrices M,Mk, and Mk∗ consist of the first differences of the series Xt.


### 2.3. Simulation

Let us defineσ~l+kk=0,1,2,⋯,n−l to be the standard deviation of the series Xl+k,1,Xl+k,2,⋯,X1+k,g (which in this case are the consecutive differences in a random walk) in year l+k and σ~k to be the square root of the sum of the diagonal elements of the covariance matrix Sk in Equation (8) based on the sliding matrix Mk of the consecutive differences of a random walk series. For a random walk series with independent and identically distributed errors, an insignificant paired sample t-test of the pairs g1/2σ~l+k,σ~k,k=0,1,2,⋯,n−l, will lead to the proposed method as a step in the right direction. Another advantage of the proposed method is that there is a possibility for the estimation of the covariances among the error terms in situations of dependent random errors in a random walk series. This saves the trouble of transforming a random walk series with dependent errors before analysis. Similar test results based on the pairs g1/2σ̿k∗,σ˘k∗,k=l,l+1,⋯,n, also support the same position, where σ̿k∗ denotes the standard deviation of the series Xk,1,Xk,2,⋯,Xk,g in year k and σ˘k∗ denotes the square root of the sum of the diagonal elements of the covariance matrix Sk∗ in Equation (9) based on the cumulative matrix Mk∗ of consecutive differences of a random walk series.In view of the above premise, a sample of 4800 random walk error series was simulated which resulted in a data matrix of order 240 by 20 observations, based on the assumption that the series covers 240 years (n) each of 20 periods (g) with l=13. The paired sample t-test was then carried out to investigate whether the volatilities of the random walk series for the sliding and cumulative matrices Mk and Mk∗, respectively, are the same or not. The R codes for the computations are attached as Pseudocode 1.Pseudocode 1: R codes for simulated data.
R CodesRW <- function(N, x0, mu, variance) {z<-cumsum(rnorm(n=N, mean=0,sd=sqrt(variance)))t<-1:Nx<-x0+t∗mu+zreturn(x)}P<-RW(4801,2,0,0.004)Q<-c(rep(NA,4800))for (i in 1:4800){Q[i]<- P[i+1]-P[i]}M<-matrix(c(rep(NA,4800)), nrow =240, ncol =20)for (i in 1:240) {A<-1+(20∗(i-1))B<-20∗iM[i,]<- Q[A:B]}##### For sliding data matrix ####D<-c(rep(NA,227))W<-c(rep(NA,227))for (i in 1:227) {ma<-M[(i):(12+i),]as.matrix(ma)cc<-matrix(c(rep(NA,400)),nrow =20, ncol =20)cc<-cov(ma)D[i]<-sqrt(sum(diag(cc)))vvvvvW[i]<-sqrt(20)∗sd(ma[12+i,])}t.test(D,W,paired=TRUE,conf.level=0.95)##### For cumulative data matrix, ma becomes #####ma<-M[(1):(12+i),]Table1 presents descriptive statistics and the paired sample t-test (parametric) and Wilcoxon signed rank test (nonparametric) of the traditional and proposed methods. It is observed from Table 1 that the annual volatilities based on the existing (traditional) method ranges from 0.1765 to 0.4094 with a standard deviation of 0.0419. However, the annual volatilities based on the proposed method for the sliding and cumulative data matrices range from 0.2464 to 0.3087 and 0.2748 to 0.2863, respectively, with corresponding standard deviations of 0.0128 and 0.0025, respectively. The average volatility for the three approaches is approximately 0.28 (0.28 to two decimal places). This is an indication that the volatilities based on the existing method and the proposed method under sliding and cumulative data matrices are approximately the same on average. The paired sample t-tests and the Wilcoxon signed rank tests compared the annual volatilities based on the existing and proposed method using the sliding and cumulative matrices. The two tests recorded p values greater than a significance probability of 0.05. This implies that, on average, the annual volatilities based on the existing and the proposed methods are equal and indicate that the proposed method is a step in the right direction.Table 1
Descriptive statistics and paired sample tests of the traditional and proposed methods.
MethodNMin.Max.MeanStd. Dev.Pairedt-testWilcoxon signed rank testt-testdfp valueV-Statp valueSlidingσ~k2270.24640.30870.28140.0128g1/2σ~l+k2270.17650.40940.28020.04191.10972260.2683137130.4349Cumulativeσ˘k∗2270.27480.28630.28110.0025g1/2σ̿k∗2270.17650.40940.28020.04191.24412260.2148136850.4517Source: simulated data.The study continued to investigate whether there is a significant difference among the average volatilities when the three methods are considered in a single test: repeated measures ANOVA test (parametric) and Freidman test (nonparametric). Table2 displays the results for the two tests comparing the average volatilities of the three methods of calculating the volatilities: traditional, sliding matrix, and cumulative matrix methods. Both tests produced p values greater than any significance probability (p=0.713 and p=0.734). This implies that there is no significant difference among the averages of volatilities of the three methods at any significance level. Hence, the Friedman and ANOVA tests confirmed the results obtained from the paired sample t-test and Wilcoxon test.Table 2
Friedman and ANOVA tests for the comparison of volatilities for the three methods.
MethodMin.Max.MeanStd. Dev.Friedman testRepeated measures ANOVAChi squaredfp valueF-stat(df1, df2)p valueTraditional method0.17650.40940.28020.04190.67720.713Sliding method0.24640.30870.28140.01280.147(1.13, 256.3)0.734Cumulative method0.27480.28630.28110.0025Source: authors’ simulated data.Figure1 shows the pictorial display of the distribution of the volatilities for the three computational methods, namely, traditional, sliding matrix, and cumulative matrix. It is observed that the mean volatilities are approximately the same for all the three methods. It is observed that the traditional computation method showed slightly higher volatilities than the proposed methods: sliding and cumulative matrices.Figure 1
The box plots for the volatilities obtained from the three methods.It can be inferred from the results that the estimates of volatility by the proposed method are approximately equal on average and are similar to those of the existing method (traditional), irrespective of the type of data matrix (sliding or cumulative) considered. The findings from Table1 support our position that for a series Xt, governed by the model
(15)Xt=Xt−1+εt,t=1,2,3,⋯,where the error terms εt are not independent, one can use either Equation (12) or (13) on the first difference of the data to estimate the volatility of the series without transforming the series to satisfy the conditions of random walk. However, the results of serial correlation analysis for the first difference may determine whether the covariance matrices Sk and Sk∗ of Equations (8) and (9) should be diagonal or not. Here, the data matrix M consists of the first difference of the series Xt.Secondly, a seriesXt, governed by the model
(16)Xt=µ+εt,t=1,2,3,⋯,where μ is a constant and εt is the error term, may be mutually independent or not. One may use Equation (8) or (9) for the series Xt to estimate the volatilities. However, the results of serial correlation analysis of the series Xt may also determine whether the covariance matrices Sk and Sk∗ of Equations (8) and (9) should be diagonal or not, where the data matrix M, in this case, consists of the series Xt.


## 2.1. Theoretical Framework

In this subsection, the theorem and some corollaries which form the basis of the methodology for monitoring volatility of a series (e.g., returns) are presented.Theorem 1.
SupposeX=X1,X2,⋯,Xm is a random vector of m components with covariance matrix Σ=σijm×m. Then, the standard error σXsum of the sum Xsum=∑i=1mXi of the components of X is given by
(1)σXsum=∑i=1mσi2+2∑i≠jσij1/2,where σii=σi2,i=1,2,⋯,m.Proof.
WriteXsum=∑i=1mXi=aTX, where a is a column vector of m components each of which is unity (one).
Then,VarXsum=VaraTX=aTΣa=∑i=1mσi2+2∑i≠jσij, acknowledging a quadratic form of the symmetric matrix Σ with respect to a.
Hence, the required resultσXsum=∑i=1mσi2+2∑i≠jσij1/2.Corollary 2.
If the components ofX are identically distributed with CovXi,Xj=υ,i≠j, and VarXi=σ2,i=1,2,⋯,m, then
(2)σXsum=mσ2+mm−1υ1/2.Proof.
The proof is trivial by substitutingσi2=σ2 for i=1,2,⋯,m and σij=υ for all i≠j in Equation (1).Corollary 3.
If the components ofX are independent but not identically distributed, then
(3)σXsum=∑i=1mσi21/2.Proof.
Again, the proof is trivial by substitutingσij=0 for all i≠j in Equation (1).Corollary 4.
If the components ofX are i.i.d. (independent and identically distributed), then
(4)σXsum=mσ.Proof.
The proof is clear by substitutingυ=0, in Equation (2).


## 2.2. Model Specification

The paper assumes that the number of subperiods (e.g., days, months, or quarters) for which the time series is observed is the same for all periods (e.g., months and years) for this proposed methodology. Furthermore, the observations of the series at a particular period for all the years under consideration are assumed to be a random sample from a particular distribution. It is also assumed that all distributions may be independent or not. Thus, by lettingXij represent the observed value of the series at period jj=1,2,⋯,g in year ii=1,2,⋯,n with g and n representing the number of periods (days/months) in a month (year) and number of months (years) under consideration, respectively, we have a data matrix M given as
(5)M=X1,X2,⋯,Xg,where for each j=1,2,⋯,g,Xj=Xnj,Xn−1j,⋯,X1jT is considered a sample from a given distribution.From matrixM, the paper suggests the construction of two kinds of subdata matrices, the moving data matrices and the cumulative data matrices. The first kind is n−l+1 moving (sliding) data matrices of length l denoted by Mk and given as
(6)Mk=Xk1,Xk2,⋯,Xkg,k=0,1,⋯,n−l,where Xkj=Xl+k,j,Xl+k−1,j,⋯,X1+k,jT,j=1,2,⋯,g.The second kind is alson−l+1 cumulative data matrices of length k denoted by Mk∗ given as
(7)Mk∗=Xk1∗,Xk2∗,⋯,Xkg∗,k=l,l+1,⋯,n,where Xkj∗=Xkj,Xk−1j,⋯,X1jT,j=1,2,⋯,g.SupposeSkk=0,1,⋯,n−l is the unbiased estimate of the covariance matrix, based on Mk of the random vector X=X1,X2,⋯,XgT, where Xjj=1,2,⋯,g have the same distribution as the population from which the series for the ith period in all the years under consideration. Then, based on the theorem, the paper proposes an l length moving volatility of the series to be defined as
(8)σk=1gaTSka1/2,k=0,1,2,⋯,n−l,where a is a column vector of order g with each component equal to one.Alternatively, ifSk∗k=l,l+1,⋯,n is the unbiased estimate of the covariance matrix based on Mk∗ of the random vector X defined previously, then the proposed cumulative volatility of the series is given by
(9)σk∗=1gaTSk∗a1/2,k=l,l+1,⋯,n,where a is as defined previously.Based on the matricesMk and Mk∗, the bootstrap confidence intervals can be constructed for σk and σk∗, respectively.The pair pointsk,σk,k=0,1,2,⋯,n−l, or k,σk∗,k=l,l+1,⋯,n, may be plotted to display the moving volatility or the cumulative volatility to appreciate a pictorial view of the data.IfXij’s are investment returns, then moving standardized rates (based on sliding and cumulative data matrices) can be computed, respectively, as follows:
(10)qk=X¯k−Rkσk,k=0,1,2,⋯,n−l,where X¯k=1/g∑j=1gXi+kj and
(11)qk∗=X¯k∗−Rkσk∗,k=l,l+1,⋯,n,where X¯k∗=1/g∑j=1gXkj with Rk being the low-risk return for years l+k and k, respectively, for Equations (10) and (11). Bootstrap confidence intervals of qk and qk∗ may also be constructed for each k under the two situations. The standardized rates so specified are the same as the Sharpe ratio under certain distributional and dependency conditions. The use of these rates were not considered in this study.Equations (8) to (11) are with reference to a time series Xt, which is governed by the model:
(12)Xt=μ+εt,t=1,2,⋯.On the other hand, if the seriesXt is governed by the model
(13)Xt=Xt−1+εt,t=1,2,⋯,then Equations (8) to (11), respectively, become
(14)σk=aTSka1/2,k=0,1,2,⋯,n−l,σk∗=aTSk∗a1/2,k=l,l+1,⋯,n,qk=gX¯k−Rkσk,k=0,1,2,⋯,n−l,qk∗=gX¯k∗−Rkσk∗,k=l,l+1,⋯,n,where all the symbols as previously defined but the data matrices M,Mk, and Mk∗ consist of the first differences of the series Xt.


## 2.3. Simulation

Let us defineσ~l+kk=0,1,2,⋯,n−l to be the standard deviation of the series Xl+k,1,Xl+k,2,⋯,X1+k,g (which in this case are the consecutive differences in a random walk) in year l+k and σ~k to be the square root of the sum of the diagonal elements of the covariance matrix Sk in Equation (8) based on the sliding matrix Mk of the consecutive differences of a random walk series. For a random walk series with independent and identically distributed errors, an insignificant paired sample t-test of the pairs g1/2σ~l+k,σ~k,k=0,1,2,⋯,n−l, will lead to the proposed method as a step in the right direction. Another advantage of the proposed method is that there is a possibility for the estimation of the covariances among the error terms in situations of dependent random errors in a random walk series. This saves the trouble of transforming a random walk series with dependent errors before analysis. Similar test results based on the pairs g1/2σ̿k∗,σ˘k∗,k=l,l+1,⋯,n, also support the same position, where σ̿k∗ denotes the standard deviation of the series Xk,1,Xk,2,⋯,Xk,g in year k and σ˘k∗ denotes the square root of the sum of the diagonal elements of the covariance matrix Sk∗ in Equation (9) based on the cumulative matrix Mk∗ of consecutive differences of a random walk series.In view of the above premise, a sample of 4800 random walk error series was simulated which resulted in a data matrix of order 240 by 20 observations, based on the assumption that the series covers 240 years (n) each of 20 periods (g) with l=13. The paired sample t-test was then carried out to investigate whether the volatilities of the random walk series for the sliding and cumulative matrices Mk and Mk∗, respectively, are the same or not. The R codes for the computations are attached as Pseudocode 1.Pseudocode 1: R codes for simulated data.
R CodesRW <- function(N, x0, mu, variance) {z<-cumsum(rnorm(n=N, mean=0,sd=sqrt(variance)))t<-1:Nx<-x0+t∗mu+zreturn(x)}P<-RW(4801,2,0,0.004)Q<-c(rep(NA,4800))for (i in 1:4800){Q[i]<- P[i+1]-P[i]}M<-matrix(c(rep(NA,4800)), nrow =240, ncol =20)for (i in 1:240) {A<-1+(20∗(i-1))B<-20∗iM[i,]<- Q[A:B]}##### For sliding data matrix ####D<-c(rep(NA,227))W<-c(rep(NA,227))for (i in 1:227) {ma<-M[(i):(12+i),]as.matrix(ma)cc<-matrix(c(rep(NA,400)),nrow =20, ncol =20)cc<-cov(ma)D[i]<-sqrt(sum(diag(cc)))vvvvvW[i]<-sqrt(20)∗sd(ma[12+i,])}t.test(D,W,paired=TRUE,conf.level=0.95)##### For cumulative data matrix, ma becomes #####ma<-M[(1):(12+i),]Table1 presents descriptive statistics and the paired sample t-test (parametric) and Wilcoxon signed rank test (nonparametric) of the traditional and proposed methods. It is observed from Table 1 that the annual volatilities based on the existing (traditional) method ranges from 0.1765 to 0.4094 with a standard deviation of 0.0419. However, the annual volatilities based on the proposed method for the sliding and cumulative data matrices range from 0.2464 to 0.3087 and 0.2748 to 0.2863, respectively, with corresponding standard deviations of 0.0128 and 0.0025, respectively. The average volatility for the three approaches is approximately 0.28 (0.28 to two decimal places). This is an indication that the volatilities based on the existing method and the proposed method under sliding and cumulative data matrices are approximately the same on average. The paired sample t-tests and the Wilcoxon signed rank tests compared the annual volatilities based on the existing and proposed method using the sliding and cumulative matrices. The two tests recorded p values greater than a significance probability of 0.05. This implies that, on average, the annual volatilities based on the existing and the proposed methods are equal and indicate that the proposed method is a step in the right direction.Table 1
Descriptive statistics and paired sample tests of the traditional and proposed methods.
MethodNMin.Max.MeanStd. Dev.Pairedt-testWilcoxon signed rank testt-testdfp valueV-Statp valueSlidingσ~k2270.24640.30870.28140.0128g1/2σ~l+k2270.17650.40940.28020.04191.10972260.2683137130.4349Cumulativeσ˘k∗2270.27480.28630.28110.0025g1/2σ̿k∗2270.17650.40940.28020.04191.24412260.2148136850.4517Source: simulated data.The study continued to investigate whether there is a significant difference among the average volatilities when the three methods are considered in a single test: repeated measures ANOVA test (parametric) and Freidman test (nonparametric). Table2 displays the results for the two tests comparing the average volatilities of the three methods of calculating the volatilities: traditional, sliding matrix, and cumulative matrix methods. Both tests produced p values greater than any significance probability (p=0.713 and p=0.734). This implies that there is no significant difference among the averages of volatilities of the three methods at any significance level. Hence, the Friedman and ANOVA tests confirmed the results obtained from the paired sample t-test and Wilcoxon test.Table 2
Friedman and ANOVA tests for the comparison of volatilities for the three methods.
MethodMin.Max.MeanStd. Dev.Friedman testRepeated measures ANOVAChi squaredfp valueF-stat(df1, df2)p valueTraditional method0.17650.40940.28020.04190.67720.713Sliding method0.24640.30870.28140.01280.147(1.13, 256.3)0.734Cumulative method0.27480.28630.28110.0025Source: authors’ simulated data.Figure1 shows the pictorial display of the distribution of the volatilities for the three computational methods, namely, traditional, sliding matrix, and cumulative matrix. It is observed that the mean volatilities are approximately the same for all the three methods. It is observed that the traditional computation method showed slightly higher volatilities than the proposed methods: sliding and cumulative matrices.Figure 1
The box plots for the volatilities obtained from the three methods.It can be inferred from the results that the estimates of volatility by the proposed method are approximately equal on average and are similar to those of the existing method (traditional), irrespective of the type of data matrix (sliding or cumulative) considered. The findings from Table1 support our position that for a series Xt, governed by the model
(15)Xt=Xt−1+εt,t=1,2,3,⋯,where the error terms εt are not independent, one can use either Equation (12) or (13) on the first difference of the data to estimate the volatility of the series without transforming the series to satisfy the conditions of random walk. However, the results of serial correlation analysis for the first difference may determine whether the covariance matrices Sk and Sk∗ of Equations (8) and (9) should be diagonal or not. Here, the data matrix M consists of the first difference of the series Xt.Secondly, a seriesXt, governed by the model
(16)Xt=µ+εt,t=1,2,3,⋯,where μ is a constant and εt is the error term, may be mutually independent or not. One may use Equation (8) or (9) for the series Xt to estimate the volatilities. However, the results of serial correlation analysis of the series Xt may also determine whether the covariance matrices Sk and Sk∗ of Equations (8) and (9) should be diagonal or not, where the data matrix M, in this case, consists of the series Xt.


## 3. Results from Empirical Data

To apply the proposed method to an empirical situation, data on exchange rates were obtained from the Federal Reserve Economic Data (FRED) for China, South Africa, Canada, and Switzerland. These data consist of daily exchange dollar rates of each country spanning the years 2000 to 2020. The logarithmic growth rates were computed over the period for each country. Descriptive statistics for the exchange and growth rates of each country are presented in Table3.Table 3
Descriptive statistics of exchange rates and growth rates by country.
CountryMeanMedianMaximumMinimumChinaExch. rate1.23451.24561.61280.9168Growth rate-0.00180.00003.8070-5.0716S. AfricaExch. rate7.19476.87808.28006.0402Growth rate-0.00360.00001.8161-2.0187CanadaExch. rate9.66758.282419.04005.6150Growth rate0.01860.00008.4341-9.1567SwitzerlandExch. rate1.14421.02701.82500.7296Growth rate-0.01080.00008.8907-13.0223Source: FRED, 2000-2020.It is observed from Table3 that for the period under investigation, Canada has the highest mean exchange rate of 9.67 and a median of 8.28 with rates ranging from 5.12 to 19.04. South Africa follows with an average rate of 7.19 and a median of 6.88, while the exchange rates range from 6.04 to 8.28. Furthermore, Switzerland recorded an average rate of 1.14 and a median rate of 1.0, and the rates generally range from 0.73 to 1.83. Finally, the China exchange rate recorded an average rate of 1.23 and a median rate of 1.25 while the minimum and the maximum rates are 0.92 and 1.61, respectively. These show that Canada was saddled with high exchange rates over the period and recorded a rate as high as 19.04 in at least one of the months while China recorded the least exchange rates.However, in the case of growth rates of the exchange rates, it was observed that Switzerland recorded the highest average reduction (-0.0108) in the exchange rate, followed by South Africa (-0.0036), then China (-0.0018). In addition, Canada recorded an average increase of 0.0186 in exchange rates and has the worst performance over the period despite recording a maximum reduction rate above 9 percent.The line plots were obtained for the exchange rates and the growth rates for each country to investigate the method that best described the data. Figure2 presents the pictorial view of the exchange rates over the period under study while Figure 3 presents time series plots of the growth rates.Figure 2
Time series plots of exchange rates by country. Source: FRED, 2000-2020.Figure 3
Time series plot of growth rates by country. Source: FRED, 2000-2020.It is apparent from Figure2 that the exchange rate time series plots for all the four countries seemingly exhibited the random walk property, and hence, the first differences of the series were computed. However, an augmented Dickey-Fuller test for random walk property of the series for the four countries is presented in Table 4. It is observed from Table 4 that the ADF test for all the four country series produced p values greater than any significance probability (p>0.05). Therefore, it is concluded that the series for the four countries considered obeys the random walk theory as observed pictorially in Figure 2.Table 4
ADF test for the random walk property of the series.
Countryt-statisticp valueChina-1.37360.5968Canada-1.5220.5226South Africa-0.61960.8639Switzerland-1.6530.4553Source: FRED, 2000-2020.The presence of serial correlation for each country exchange rate was tested to determine whether to use only the diagonal elements of the moving covariance matrices or not, as stated in Equation (12). However, from Figure 3, the time series plots of the growth rates depicted stationary behaviour. So, the serial correlation analysis was performed on the growth rates to investigate dependency among the errors. The results of the tests for serial correlation in the exchange rates and growth rates are presented in Table 5.Table 5
Statistical test for serial correlation.
CountryVariableTest stat.p valueChinaExch. rate4.65360.0001Growth rate4.60250.0001South AfricaExch. rate0.06680.9467Growth rate-0.39500.6929CanadaExch. rate0.62040.5350Growth rate0.78830.4305SwitzerlandExch. rate2.16490.0304Growth rate1.93320.0532Source: FRED, 2000-2020.The results of Table5 show that the tests for the presence of serial correlation in the difference of exchange rates for China and Switzerland are significant at a 5 percent significance level. This indicates a dependence among error terms because the corresponding p values are less than 0.05 (p<0.001 and p=0.0304, respectively). The growth rates for China also recorded a significant presence of serial correlation at a 5 percent significance level with a p value less than 0.001. Hence, for these three series, all the elements in the estimates of the moving covariance matrices were used in computing the moving volatilities according to Equation (12). However, the growth rates for Switzerland and the first difference in exchange rates and growth rates for South Africa and Canada recorded insignificant presences of serial correlation, hence leading to the use of only the diagonal elements of the estimated moving covariance matrices in computing the moving volatilities. Table 6 shows descriptive statistics for 240 moving volatilities (monthly moving volatilities from January 2000 to December 2020) for exchange rates and growth rates for all the countries under study. Figures 4 and 5 display the plots of the moving exchange rates and growth rate volatilities, respectively.Table 6
Descriptive statistics for moving volatilities.
CountryVariableMeanMaximumMinimumChinaExch. rate0.03610.11340.0001Growth rate0.53461.72220.0015South AfricaExch. rate0.44480.85120.1947Growth rate4.51397.65052.6889CanadaExch. rate0.02780.06000.0153Growth rate2.27025.04951.2232SwitzerlandExch. rate0.02990.06030.0119Growth rate2.61735.43871.3242Source: FRED, 2000-2020.Figure 4
Trend analysis plots of the moving volatilities in exchange rate by country. Source: FRED, 2000-2020.Figure 5
Trend analysis plots of moving volatilities of growth rate by country. Source: FRED, 2000-2020.It is revealed from Table6 that the average volatility for China over the period was 0.0361 with an average growth rate of 0.5346. Though China recorded the second-highest average volatility, it is observed to produce the smallest average growth rate among the four countries considered. South Africa recorded the highest average volatility (0.4448) and average growth rate of 4.5139 over the period of the study. Canada and Switzerland recorded approximately the same average volatility but have a slight difference in their average growth rates over the study period. The maximum volatility was recorded by South Africa (0.8512) and was followed by China (0.1134). However, the minimum volatility was recorded by China (0.0001). Furthermore, the maximum growth rate was recorded by South Africa (7.6505) and was followed by Switzerland (5.4387).The trend behaviour of the volatilities of the exchange rates for the four selected countries, China, South Africa, Switzerland, and Canada, is presented in Figure4. It is observed from Figure 4 that the volatility trend plot for South Africa was very volatile with much higher volatilities compared to the other three countries considered. It was revealed over the study period that the volatility for South Africa peaked at three different times, namely, the last quarter of 2002, the last quarter of 2009, and the last quarter of 2016. However, the other three countries show approximately the same pattern and have less volatile moving volatilities for exchange rates over the study period. China is observed to produce a little higher trend of volatility between the third quarter of 2013 and the third quarter of 2020. However, Switzerland and Canada showed approximately the same trend of volatility over the study period.The trend analysis plots of the volatility growth rates for the four countries are displayed in Figure5. The line graphs show that there are very high fluctuations over the entire study period and South Africa has higher growth rates than Switzerland, Canada, and China. It is interesting to note that South Africa, Switzerland, and Canada recorded maximum growth rates between May 2008 and September 2009. South Africa was observed to be more volatile, followed by Switzerland and then Canada in terms of growth rates over the period. China was observed to produce more stable and less growth rates over the entire period of the study. It is observed that as China’s growth rates showed a progressive increase from 2013, Switzerland and Canada showed declining growth rates from 2016 to 2020.


## 4. Discussions and Conclusions

As indicated early on, the paper sought to develop a method of analysing the volatility of a seemingly random walk time series with correlated errors without transforming the series as done traditionally. We showed how to arrange a random walk series into a data matrix based on the assumption that the number of subperiods for which the series is available is the same for all periods. Secondly, the series observations in each subperiod for all the periods under consideration is a random sample from a particular distribution. This led to the computation of moving volatilities based on sliding and cumulative data matrices. The method was successfully implemented on a simulated dataset. The paired samplet-test and the Friedman test were used to compare the volatilities of the traditional method and the proposed method under both sliding and cumulative data matrices. The traditional method was insignificantly different for the simulated series that follows the random walk theorem. The proposed method was also discussed for a seemingly stationary series.The proposed method was also used to compute moving volatilities of exchange rates and their growth rates for Canada, China, South Africa, and Switzerland. The paper used exchange rates because fluctuations in them have been found by several researchers across the world to have a significant relationship with key macroeconomic variables. According to Besnik et al. [21], exchange rate stability led to macroeconomic stability. Others have established a positive relationship between exchange rates and inflation [22–24], exchange rates, and international prices [25]. Similar relationships have been established globally including the UK [26, 27], Sweden [26], Denmark, and Canada [26]. These go to buttress the point that a less volatile (more stable) exchange rate results in a more stable economy.Based on the empirical data and the discussions in the previous paragraph, South Africa has a less stable economy as compared to the other countries since South Africa recorded highly fluctuating volatilities in exchange rates. Similar results are portrayed by the volatilities of exchange rates and growth rates with China having an edge over the rest.


## 5. Future Research

In view of this paper, recommendation is made on the application of the proposed method (including computation of the specified standardized rate) to other macroeconomic variables such as investment returns to compare stability and performance of stock markets across the world.



---

*Source: 9515915-2022-03-15.xml*