Abstract

Irrespective of whether the test for homogeneity is significant or not, most researchers assume time-homogeneity in analysing Markov chains due to scanty literature on the analysis of time-inhomogeneous Markov chains. Based on the assumption that, for each point in time in the future, a stochastic process will be subjected to a randomly selected transition matrix from an ergodic set of transition matrices the process was subjected to in the recent past, a methodology was proposed for analysing the long-run behaviours of time-inhomogeneous Markov chains. The proposed model was implemented to historical data consisting of the exchange rate of cedi-dollar, cedi-pound, and cedi-euro spanning over 6 years (January 2012 to December 2017). The results show that under certain “closeness” conditions, the long-run behaviours of the time-inhomogeneous case are almost identical to those of the time-homogeneous case. The paper asserted that even if the Markov chain exhibit time-inhomogeneity, analysing the Markov chain under the assumption of time-homogeneity is a step in the right direction under certain “closeness” conditions; otherwise, the proposed method is recommended. It was also found that investing in dollars yields better returns than the other currencies in Ghana.

1. Introduction

The exchange rate, which measures the price of one currency in terms of some others, is one of the most important topics in international finance and policymaking. The exchange rate has been a mechanism for regulating trade and capital flows by many developing economies. Direct and indirect shifts in the exchange rate can affect all sorts of assets’ prices [1, 2]. Exchange rates have a great significance for a country’s economy, particularly its foreign trade; hence, the ability to predict its future value, how volatile the rates would be, and its stability in the face of changing economic variables is necessary. Models of exchange rate reflect the relative prices of one country about households, the technology of firms, and institutional agreements besides taxes and tariffs between two countries. Recent papers on exchange rate prediction and forecasting are done using nonlinear models such as machine learning [35] and random walk [6, 7]. For instance, Ranjit et al. [4] use machine learning techniques such as artificial neural network (ANN) and recurrent neural network (RNN) to develop a prediction model between Nepalese rupees against three major currencies euro, pound sterling, and US dollar. Ca’Zorzi and Rubaszek [6] examined the regularities in foreign exchange markets in advanced countries with flexible regimes using panel data techniques and nonlinear models. Wang et al. [7] used a nonlinear smooth transition regression (STR) approach to model and forecasted the exchange rate. They found out that the STR models offered evidence of nonlinearity in the variables used.

Due to challenges of volatility and randomness, which bedevil most statistical time series models, some researchers have resorted to nontraditional time series models, including Markov chains ([813]; etc.) and support vector regression-based models [1416]. For example, Zhang and Hong [14] forecast electric load using electric load forecasting by complete ensemble empirical mode decomposition adaptive noise and support vector regression with quantum-based dragonfly algorithm. Zhang and Hong [15] applied variational mode decomposition and chaotic grey wolf optimiser with support vector regression for forecasting electric loads (time series data). Zhang et al. [16] proposed a model called the EMD-SVRCKH model, which combines support vector regression (SVR), empirical mode decomposition (EMD), the krill herd (KH) algorithm, and a chaotic mapping function used to forecast time series data.

This paper considers the analysis of exchange rate as time inhomogeneous Markov chain with finite states since analysing exchange rates as Markov chain is rare in the literature. A Markov chain model is a stochastic model with the property that future states are determined only by the current state [17]. If the states of the chain are countably finite, then it is called a Markov chain with finite states; however, if the state is countably infinite, then it is called a Markov chain with infinite states. When a Markov chain is subject to a different stochastic matrix at each step (time), it is termed as inhomogeneous, but if it is subject to the same stochastic matrix all the time, then it is termed as time-homogeneous. The application of Markov chains is found in diverse fields such as finance and health.

The Markovian property which makes life easier is the assumption of time-homogeneity. Many studies done on Markov chains assumed time-homogeneity without testing ([10, 11, 1821]; etc.), which is hardly the case in real-life situations even though, under certain conditions, the results may be very close to those of the time-inhomogeneous model. This is arguably so because there is scanty literature on the methodology for the analysis of time-inhomogeneous chains. However, some researchers [22] have considered a periodic point of view that the Markov chain will follow a periodic path which is also not random in some sense. This study proposed a method where the Markov chain is assumed to be time-inhomogeneous and follows some random sample path that is more realistic in real-life situations. The proposed method was used to analyse exchange rates in Ghana as Markov chains with finite states.

The rest of the paper is organised as follows. The following section is Materials and Methods, including Theoretical Framework, Model Specification, and Analysis Strategy. We then have Results and Discussions leading to conclusions of the study.

2. Material and Methods

As alluded to, this section entails a theoretical framework that reviews the relevant definitions and theorems (with proofs where necessary) upon which the methodology is based, followed by the model specification, which discusses the estimation of parameters of the models to be used from the available data and, lastly, the analysis strategy which gives a detailed description of the data used and application of the method to address the study’s objectives.

2.1. Theoretical Framework

The various definitions and theories that are relevant in this study are discussed in this section.

Definition 1. A stochastic process is a set of random variables where is called the parameter space of the process and the range of values assumed by is called the state space of the process. Each of the spaces and can be continuous or discrete. Hence, one can talk about four types of stochastic processes depending on the type of spaces. This paper considers the processes with discrete state spaces, with and denoting processes with continuous and discrete parameter space, respectively.

2.1.1. Probability Distribution

Suppose that . Then, the function, is called the conditional distribution function of a stochastic process .

For a process with discrete parameter space , we have where is the state space and is the parameter space. The probabilities in (1) and (2) are called transition probabilities.

Definition 2. The stochastic process and are said to be time-homogeneous if, respectively, Thus, the probability in each case depends on the time difference and not on the points in time. If they do not, the processes are not time-homogeneous.

Definition 3. The stochastic process and are said to exhibit Markov dependence if, respectively, for and and all .
Stochastic processes with discrete state space satisfying (4) and (5) are called Markov process or Markov chains.
We now define the most powerful equations in the analysis of Markov chains known as the Chapman-Kolmogorov equations.

2.1.2. The Chapman-Kolmogorov Equations

For a Markov process with continuous parameter space where .

For a Markov process with discrete parameter space where .

2.1.3. One-Step Dependence Assumption

For a Markov chain with discrete parameter space, the probability of state at time given at time is

The time-homogeneity (stationary) assumption implies we can write

If (9) does not hold, we have a nonhomogeneous first-order Markov chain; otherwise, we have a time-homogeneous first-order Markov chain. In the latter case, if , then assuming finite state space , it can be shown by the total probability rule that with being the initial time.

In the matrix form, (10) can be written as where and is a square matrix of order .

Repeating the application of (11) gives where is the matrix raised to the power . The matrix satisfies the following postulates. (a)(b)

A square matrix which satisfies these two postulates is said to be a stochastic matrix or a transition probability matrix or simply a transition matrix.

If the Markov chain is nonhomogeneous, equation (11) becomes where and .

Repeating the application of (13) gives

Theorem 4. If are stochastic matrices of the same order, then the products of length and are also stochastic matrices.

Proof. The proof can easily be obtained by mathematical induction.

Corollary 5. If then is a stochastic matrix.

Definition 6. A set of stochastic matrices of the same order is said to be ergodic in the manner of Hajnal [23, 24] or primitive according to Cohen [25] if equation (15) exists, and is a stable stochastic matrix (i.e., has identical rows).

2.1.4. n-Step Transition Probability

For a Markov chain with state space , irrespective of being time-homogeneous or not, the probability of getting from state to state .

Theorem 7. If a Markov chain is not time-homogeneous and subject to the transition matrix at time , then n-step probabilities are the elements of the product matrix .

Proof. By using the Chapman-Kolmogorov equations and acknowledging the Markovian property, the proof can be established by mathematical induction.

Corollary 8. If a Markov chain is time-homogeneous such that the transition matrix at time is , then the n-step transition probabilities are elements of the matrix (i.e., raised to power ).

Proof. The proof is obvious by noting that if .

Theorem 9. Let be the transition matrix to which an m-state time-inhomogeneous Markov chain is subject at time . If are members of an ergodic set, then the following limit exists, where is stable with common row with and and hence (a), where (b)There exist constants and such thatwhere is the element of . (c)The convergence in property (b) is known as “weak” geometric ergodicity.

Proof. The proof is trivial by acknowledging Definition 6.

Theorem 10. Let be the transition probability matrix of an ergodic m-state time-homogeneous Markov chain. Then, the limit, exists, where is stable with common rows
with and and hence (a) where (b)There exists constant and such that(c)The convergence in property (b) is known as “strong” geometric ergodicity.

Proof. See Bhat and Miller [26] for the proof.

Definition 11. Let be a Markov chain with state space . The probability of first passage transition and the expected value of first passage time are defined, respectively, as

If , then is the recurrence time distribution of state and is the mean recurrence time of state .

We now turn our attention to definitions of some closeness quantities which will play significant roles in the simulation study. The values of these measures will be used to assess the relationship between the limiting (or long-run) behaviours of time-homogeneous and time-inhomogeneous chains based on the same data set.

Definition 12. For a finite ergodic set of stochastic matrix each of order , define a measure of closeness and an index of closeness as follows.
Let be the Euclidian distance between the elements of the matrices and given as where . The measure of closeness of the set is given as Next, let be the geometric mean of the ratio of corresponding elements of the matrices and given as where are as previously defined. The closeness index is the geometric mean of given as

Definition 13. For two probability vectors and , define a measure of closeness and index of closeness , respectively, as follows:

The smaller the values of and , the closer the transition matrices and the vectors are, respectively. Also, the values of and close to unity imply closeness of the elements being compared.

2.1.5. Two-State Markov Chains

We now turn our attention to discussing Markov chains with only two states. This is because for easy analysis, chains with more than two states can be converted to a chain with two states by considering the state of one’s interest as the first state and all other states lumped together as the other state. All subsequent discussions also apply to chains with more than two states.

We continue by first stating without proofs, some theorems concerning two-state time-homogeneous Markov chains according to Bhat and Miller [26]. These will be followed by statements of some corresponding theorems for the time-inhomogeneous case with proofs.

Theorem 14. For a two-state time-homogeneous Markov chain with state space and transition matrix we have (a) and (b)(c)(d) and (e)(f)(g)

As indicated earlier, the proofs can be found in Bhat and Miller [26]. Options (e) to (g) establish the relationship between the limiting probabilities of the states and the mean recurrence times of the corresponding states.

Theorem 15. For a two-state time-inhomogeneous Markov chain subject to the transition matrix at time given by where is a member of an ergodic set, we have (a) and (b)(c)(d) and

Proof [case (a)]. Clearly .
Now for , we have by definitions using the Markov property.
By continuous use of the Markov property and the definition of conditional probability, we have Hence result.

Cases (b) to (d) can similarly be proved. This paper uses simulation studies to see whether the limiting relationships in cases (e) to (g) under Theorem 14 also exist for time-inhomogeneous chains under certain conditions.

2.1.6. Mean Recurrent Times and Limiting Distribution for Two-State Chains

With reference to definitions of the transition matrices in Theorems 10 and 14, the mean recurrence time of the time-homogeneous Markov chains is given, respectively, by where the first-time transition probabilities are given in Theorem 14.

The limiting distribution of the time-homogeneous Markov chains is given by

Those of the time-homogeneous chains are not straightforward, and estimates of them will be obtained based on Definition 11.

2.2. Model Specification

For situations in which the test for homogeneity of a Markov chain is significant, this paper proposes the following method of analysis.

Assume the stochastic matrix to which a time-inhomogeneous Markov chain is subjected at future time is selected randomly (repetition allowed) from an ergodic set , where may be finite or infinite. Then, without loss of generality, the limiting distribution of the chain for the sample path can be denoted by ; assuming a chain of states is the row of the stable matrix given by

, where is the number of sample paths considered.

The paper proposes an estimate of the limiting distribution of a nonhomogeneous Markov chain to be the average where .

Clearly is a probability vector because it is easy to show that for all and .

The n-step probabilities are also estimated by the average of the corresponding probabilities for all sample paths. Thus

The estimates of the mean recurrence times are proposed to be where is the mean recurrence time from state to for the sample path.

The limiting average at the left-hand side of options (e) to (g) of Theorem 14 are estimated as follows:

Next are definition of quantities that will be used to assess whether time-inhomogeneous chains may have similar limiting behaviours as in options (e) to (g) of Theorem 14.

Definition 16. For a weak ergodic Markov chain, define a measure of closeness and index of closeness , respectively, as follows.

Let where are the mean recurrent times, then

The smaller the value of or the closer the value of is to unity, the similar the tendency of the limiting behaviour of the time-inhomogeneous chain will be to those of the time-homogeneous chain in options (e) to (g) of Theorem 14.

To estimate the ergodic set , suppose a high frequency time series is available, where is the length of the time series in time period and is the number of time periods. Then, in the manner of Mettle et al. [11], we define as a measure of the change in the series at time in period . Let be defined as follows: where is a real number greater than or equal to zero. Without loss of generality, suppose are times in period for which and are times in period for which such that each of and has at least one value beyond it in period .

Assuming a two-state Markov chain, define the indicator function and as follows.

The transition frequencies are then given by

The estimates of the transition probabilities in element in the ergodic set are then given as

If the chain is assumed to be time-homogeneous, the estimates of the elements of the transition matrix are given as follows.

2.3. Analysis Strategy

The data used for the study were sourced from the Bank of Ghana. They consist of daily closing rates of three exchange rates, cedi-dollar, cedi-euro, and cedi-pound, spanning over six years (January 2012 to December 2017).

One-step transition frequencies were obtained for each exchange rate based on equations (41) and (42) for each of the six years under consideration. Six transition matrices were then computed using equations (43) and (44) (one for each year), which formed an ergodic set for each exchange rate. Pulling information from all the six years, one transition matrix was estimated based on equation (44) which were used under the assumption of time-homogeneity. Table 1 presents the transition frequencies as well as the transition probabilities by currency and year. The test for time-homogeneity for each exchange rate was carried out using the one-step transition frequencies (see Bhat and Miller [26], for the test of time-homogeneity).

Two states were considered in all cases, where state 0 represents no increase in exchange rate and sate 1 represents increase in exchange rate. Using thirty sample paths, estimates for limiting transition probabilities, n-step probabilities, mean recurrence times, and limiting averages of transition probabilities based on equations (32), (34), (35), and (36), respectively, were computed under time-inhomogeneity for all the three exchange rates. The corresponding estimates were also computed under time-homogeneity for the three exchange rates.

Measures of closeness using equations (22) were computed to see how close the matrices in the ergodic sets are. Measures of closeness using equation (25), were also computed to see how close the limiting distributions of time-homogeneous and time-inhomogeneous chains are. Using equation (38), measures of closeness were computed to determine the limiting behaviours of the time-inhomogeneous chain under options (e) to (g) of Theorem 14. Graphical representation of n-step transition probabilities from state 1 to 1 was obtained for each of the exchange rates under the time-homogeneous and time-inhomogeneous chains to determine the best currency to invest in. The analysis ended with the Wilcoxon signed ranks test to compare the n-step transition probabilities from state 1 to 1 for each of the rates. The R software was used for laborious computations during the analysis, while simple programs were written in Microsoft Excel for the easier ones. See the Pseudocode 1 for the R-codes used.

Transition frequency and limiting closeness index transitional probabilities.
d5<-c(NA,NA,NA,NA,NA)
X<-datad4<-c(NA,NA,NA,NA)
N<-nrow(N)-1 d3<-c(NA,NA,NA)
Y<-c(rep(NA,N)) d2<-c(NA,NA)
D<-c(rep(NA,N)) euclidean<- function(a, b) sqrt(sum((a- )^2))
for (i in 1:N) {euclidean(SM[1,],SM[2,])
Y[i]<-X[i+1]-X[i] for (j in 2:6) {
}                        a=j-1
for (i in 1:1592) {d5[a]<-euclidean(SM[1,],SM[j,])
if (Y[i] <=0) D[i]<-0 else D[i]<-1}
}for (j in 3:6) {
A<-c(rep(NA,1592)) a=j-2
B<-c(rep(NA,1592))                d4[a]<- euclidean(SM[2,],SM[j,])
for (i in 1:N) {                   }
A[i]<-D[i]                  for (j in 4:6) {
B[i]<-D[i+1]                  a=j-3
M<-table(A,B)                 d3[a]<- euclidean(SM[3,],SM[j,])
}                        }
SM<-matrix(M, nrow =6,ncol=4)         for (j in 5:6) {
SMa=j-4
Q<-matrix(data, nrow=30, ncol=2) d2[a]<- euclidean(SM[4,],SM[j,])
for (j in 1:30) {}
A<-SM[sample(3, siz =1, replace = FALSE), ]d<- euclidean(SM[5,],SM[6,])
AA<-matrix(A, nrow =2,ncol=2) v<-c(d5,d4,d3,d2,d)
P<-matrix(c(NA,NA,NA,NA),nrow =2,ncol=2) exp(mean(log(v)))
for (i in 1:29) {
Y<-c(0,0,0,0)
Y<-SM[sample(3, size = 1, replace = FALSE), ]
YY<-matrix(Y,nrow =2,ncol=2)
for (j in 3:6) {
AA<-P
}
Q[j,]<-AA[1,]
{
Col.Means(Q)
## SM is a data matrix with ith row elements
  being ith year transition probabilities arranged
in the order , and .
closeness index
Similar procedure for index with second line after each “for” line replaced correspondingly by d5[a]<-mean(SM[1,]/SM[j,]), for example, for the first “for” line.

3. Results and Discussions

This section discussed the descriptive statistics of the exchange rates, the observed one-step transition frequencies and the corresponding transition probabilities, test of time-homogeneity, estimates of limiting averages of transition probabilities, mean recurrence times, measures and indices of closeness by the exchange rate and correlation between the closeness of the matrices in the ergodic sets, and the other measures of closeness.

3.1. Descriptive Statistics

The mean, standard deviation, minimum, and maximum of the three exchange rates are presented in Table 2. The exchange rates for the dollar, the pound, and the euro spanned, respectively, over the ranges 1.58 to 4.6, 2.43 to 6.83, and 0.28 to 6.31 over the six years. The pound recorded the largest mean rate (4.6432), followed by the euro (3.8054) and then the dollar (3.1939) over the period. The dollar rates over the period are less volatile compared with the rest.

3.2. One-Step Transition Frequencies and Estimates of Transition Probabilities

The observed one-step transition frequencies and estimates of corresponding probabilities for each year and for each exchange rate together with the overall estimates are presented in Table 1. The dollar recorded the highest probabilities of transition from increase to increase in each of the six years as can be seen in Figure 1.

3.3. Test of Time-Homogeneity

Test for time-homogeneity was carried out for the chain for each exchange rate. The resulting values of the test statistic and corresponding values for the US dollar, the British pound, and the euro are, respectively 32.389 (), 6.410 (), and 5.832 (), which signify time-inhomogeneity for all chains. Despite these results, the paper went ahead to carry out the analysis as if the chains were time-homogeneous and compared the results with those of the proposed method for time-inhomogeneity.

3.4. Estimate of Limiting Average of Transition Probabilities, Mean Recurrent Times, Measures, and Indices of Closeness by Currency

Table 3 represents the estimates of limiting averages of transition probabilities, mean recurrent times, measures, and indices of closeness for all the three exchange rates by type of homogeneity.

The corresponding estimates for the time-homogeneous and time-inhomogeneous chains are almost the same when rounded to two decimal places for each exchange rate.

It can also be observed that the corresponding mean recurrence times for the two types of homogeneity are close for each exchange rate. In general, on average, it took a long time for each of the rates to decrease after increasing with the dollar recording the longest time. The results also show that the mean recurrence times from increase to increase for all the rates are comparably smaller, with the dollar recording the least time. Thus, after increasing, it takes the dollar a longer time to decrease and a shorter time to increase again compared to the others. Hence, it can be asserted that investing in dollars will yield good returns than the other currencies in Ghana. This result confirmed with Addae et al. [27] that the dollar exhibits less risk exposure than the pound sterling in Ghana. Hence, investing in the dollar is the best. In addition, according to Mensah and Adam [28], investors in international financial markets prefer to trade in the currency, where there is a more reliable estimate for predicting the future rate of the currency for portfolio optimisation and diversification of which dollar exchange rate revealed more accuracy, therefore adding to the fact that investing in the dollar in Ghana will yield good returns. Furthermore, Faudot and Ponsot [29] position that in international trade invoicing and international debt issuance, the US dollar tops the hierarchy of currencies, and its foundations are made up of the currencies of the developing countries.

In the case of the measures of closeness, the euro recorded the smallest values for closeness of ergodic matrices and limiting relations in options (e) to (g) of Theorem 14 between the two types of homogeneity. However, the pound recorded the smallest value for the measure of closeness of the limiting distributions of the two types of homogeneity. The observed values of the closeness indices portray the same interpretations.

3.5. Correlation between the Measures of Closeness

The correlation between the measure of closeness of the matrices in the ergodic sets on one hand, the limiting distribution of time-homogeneous and time-inhomogeneous , and limiting behaviours of time-inhomogeneous chain under options (e) to (g) under Theorem 14 on the other were computed. The results show that there is a strong positive relationship between the measure of closeness of the matrices in the ergodic sets and the closeness of the limiting distribution of time-homogeneous and time-inhomogeneous and the measure of closeness of limiting behaviour of the time-inhomogeneous chain under options (e) to (g) of Theorem 14. This implies that the closer the matrices, the closer the limiting distribution of time-homogeneous case to that of the time-inhomogeneous case. It can be inferred from these results that the value of the measure of closeness among the transition matrices in the ergodic set can determine whether the assumption of time-homogeneity will provide reliable results irrespective of whether the time-homogeneity test is significant or not.

3.6. n-Step Transitional Probabilities of Markov Chains

Figure 2 shows the plots of n-step transitional probabilities () from state one to one (increase to increase). Plot “a” represents the n-step probabilities of the chains of the currencies based on the assumption of time-homogeneity and “b” represents those of the time-inhomogeneous chains of currencies. Clearly, in both cases (homogenous and inhomogeneous), the n-step transitional probabilities decrease as the number of steps increases, in general, with the pounds having the lowest probabilities. In general, the two plots “a” and “b” behave similarly with the dollar recording the highest transitional probabilities followed by the euro and then the pound.

The n-step transition probabilities of time-homogenous and time-inhomogeneous chains by currency are displayed in Figure 3 to identify if there is a significant difference between the n-step transition probabilities from increase to increase of the time-homogenous and the time-inhomogeneous chains for each currency. It is obvious that the corresponding n-step transitional probabilities are close for some steps while they are not close at other steps. The Wilcoxon signed ranks tests were carried out to check the closeness of the corresponding n-step transitional probabilities. With respect to the dollar, there was a significant difference between the corresponding n-step transitional probabilities for the two types of homogeneity. The resulting values are indicated in Figure 3. Apart from the dollar which recorded a significant difference, the rest did not. This can be attributed to the fact that the dollar recorded the largest measure of closeness of the transition matrices in the ergodic set. Hence, the paper asserts that assuming time-homogeneity without testing is a step in the right direction so long as .

4. Conclusions

The authors successfully developed a methodology for analysing the limiting behaviours of Markov chains that exhibits time-inhomogeneity. It was confirmed by the results that the limiting behaviour of time-homogenous chain is similar to those of the time-inhomogeneous chain under some closeness conditions. The smaller the measure of closeness () of the matrices in the ergodic set of a chain, the closer the limiting behaviour of time-inhomogeneous chains will be to their homogeneous counterparts. The paper recommends that it is a step in the right direction to analyse a Markov chain as a time-homogeneous one even if the test for homogeneity is significant, so long as condition holds; otherwise, the proposed method is recommended. These results are similar to those obtained by Mettle [30] under demographic ergodicity.

The dollar reigned supreme among the currencies considered. Its rates take the longest time to decrease or remain unchanged after increasing and the shortest time to increase after increasing. It also has the highest n-step probabilities of transition from increase to increase with largest limiting probabilities (0.6232 and 0.6403) for the time-homogeneous and time-inhomogeneous cases, respectively. Hence, investing in dollars will yield more returns than in the other currencies. The study, again per the findings, concludes that the cedi-dollar exchange rates can be analysed by the proposed method, while the exchange rate for the other currencies can be analysed as time-homogeneous Markov chains. Future research should consider analysing exchange rates as Markov chain with infinite states under time-inhomogeneity.

Data Availability

The excel data used to support the findings of this study are included within the supplementary information file named “Ghana Exchange rate Data.docx”.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Supplementary Materials

They consist of daily closing rates of three exchange rates, cedi-dollar, cedi-euro, and cedi-pound, spanning over six years (January 2012 to December 2017). (Supplementary Materials)