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 sample -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.

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 [25], Middle East [68], 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: Section 2 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. Suppose is a random vector of components with covariance matrix Then, the standard error of the sum of the components of is given by where

Proof. Write , where is a column vector of components each of which is unity (one).
Then, , acknowledging a quadratic form of the symmetric matrix with respect to .
Hence, the required result .

Corollary 2. If the components of are identically distributed with , and , then

Proof. The proof is trivial by substituting for and for all in Equation (1).

Corollary 3. If the components of are independent but not identically distributed, then

Proof. Again, the proof is trivial by substituting for all in Equation (1).

Corollary 4. If the components of are i.i.d. (independent and identically distributed), then

Proof. The proof is clear by substituting , 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 letting represent the observed value of the series at period in year with and representing the number of periods (days/months) in a month (year) and number of months (years) under consideration, respectively, we have a data matrix given as where for each is considered a sample from a given distribution.

From matrix the paper suggests the construction of two kinds of subdata matrices, the moving data matrices and the cumulative data matrices. The first kind is moving (sliding) data matrices of length denoted by and given as where .

The second kind is also cumulative data matrices of length denoted by given as where .

Suppose is the unbiased estimate of the covariance matrix, based on of the random vector , where have the same distribution as the population from which the series for the period in all the years under consideration. Then, based on the theorem, the paper proposes an length moving volatility of the series to be defined as where is a column vector of order with each component equal to one.

Alternatively, if is the unbiased estimate of the covariance matrix based on of the random vector defined previously, then the proposed cumulative volatility of the series is given by where is as defined previously.

Based on the matrices and , the bootstrap confidence intervals can be constructed for and , respectively.

The pair points , or , may be plotted to display the moving volatility or the cumulative volatility to appreciate a pictorial view of the data.

If ’s are investment returns, then moving standardized rates (based on sliding and cumulative data matrices) can be computed, respectively, as follows: where and where with being the low-risk return for years and , respectively, for Equations (10) and (11). Bootstrap confidence intervals of and may also be constructed for each 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 , which is governed by the model:

On the other hand, if the series is governed by the model

then Equations (8) to (11), respectively, become where all the symbols as previously defined but the data matrices , and consist of the first differences of the series .

2.3. Simulation

Let us define to be the standard deviation of the series (which in this case are the consecutive differences in a random walk) in year and to be the square root of the sum of the diagonal elements of the covariance matrix in Equation (8) based on the sliding matrix of the consecutive differences of a random walk series. For a random walk series with independent and identically distributed errors, an insignificant paired sample -test of the pairs , 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 also support the same position, where denotes the standard deviation of the series in year and denotes the square root of the sum of the diagonal elements of the covariance matrix in Equation (9) based on the cumulative matrix 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 () each of 20 periods () with . The paired sample -test was then carried out to investigate whether the volatilities of the random walk series for the sliding and cumulative matrices and , respectively, are the same or not. The R codes for the computations are attached as Pseudocode 1.

R Codes
RW <- function(N, x0, mu, variance) {
   z<-cumsum(rnorm(n=N, mean=0,
sd=sqrt(variance)))
   t<-1:N
   x<-x0+tmu+z
   return(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<-20i
   M[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),]

Table 1 presents descriptive statistics and the paired sample -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 -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 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.

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). Table 2 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 values greater than any significance probability ( and ). 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 -test and Wilcoxon test.

Figure 1 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.

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 Table 1 support our position that for a series , governed by the model where the error terms 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 and of Equations (8) and (9) should be diagonal or not. Here, the data matrix consists of the first difference of the series .

Secondly, a series , governed by the model where is a constant and is the error term, may be mutually independent or not. One may use Equation (8) or (9) for the series to estimate the volatilities. However, the results of serial correlation analysis of the series may also determine whether the covariance matrices and of Equations (8) and (9) should be diagonal or not, where the data matrix , in this case, consists of the series .

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 Table 3.

It is observed from Table 3 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. Figure 2 presents the pictorial view of the exchange rates over the period under study while Figure 3 presents time series plots of the growth rates.

It is apparent from Figure 2 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 values greater than any significance probability (). Therefore, it is concluded that the series for the four countries considered obeys the random walk theory as observed pictorially in Figure 2.

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.

The results of Table 5 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 values are less than 0.05 ( and , respectively). The growth rates for China also recorded a significant presence of serial correlation at a 5 percent significance level with a 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.

It is revealed from Table 6 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 Figure 4. 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 Figure 5. 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 sample -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 [2224], 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.

Data Availability

The exchange rate data used to support the findings of this study have been deposited in the Federal Reserve Economic Data (FRED) repository (https://fred.stlouisfed.org/searchresults?st=exchange+rates).

Conflicts of Interest

The authors declare that there is no conflict of interests regarding the publication of this manuscript.