Detecting regime shifts in Malaysian exchange rates

Many financial and economic time series undergo episodes where the behaviour of the series seems to change quite dramatically. Such phenomena’s are referred to as regime shifts and cannot be modelled by a single equation linear model. Therefore to overcome this problem a nonlinear time series model is typically designed to accommodate this nonlinear feature in the data. In this paper, we use a univariate 2-regime Markov switching autoregressive model (MSAR) to capture regime shifts behaviour in both the mean and the variance in Malaysia ringgit exchange rates against four other countries namely the British pound sterling, the Australian dollar, the Singapore dollar and the Japanese yen between 1990 and 2005. The MS-AR model is found to successfully capture the timing of regime shifts in the four series and this regime shifts occurred because of financial crises such as the European financial crisis in 1992 and the Asian financial crisis in 1997. Furthermore, the significant result of the likelihood ratio test (LR test) justified the used of nonlinear MS-AR model rather than linear AR model. | Exchange rates | Nonlinearity | Structural breaks | Markov switching autoregressive model |


Introduction
Financial time series always undergo episodes in which the behaviour of the series seems to change quite dramatically.Such phenomena's are referred to as regime shifts and cannot be modelled by a single equation linear model.Usually regime shifts would occur because of internal and external factors that affected a country.The internal factors are war and political instability and the external factors are economic and financial crises that happen around the world that have an effect on the economic of a country.All these factors cause changes in the properties of the financial time series and motivate the use of regime switching models.
Regime switching models are designed to capture discrete changes in the time series that generate the data.The study of regime shifts in time series begin when Quandt [1] introduces the switching regression model.Then, Goldfeld and Quandt [2] extend the switching regression model to allow the regime shifts to follow Markov chain where the regime shifts is serially dependent and they call the model Markov switching regression model.
The Markov switching model assumes the regime is an unobservable stochastic process.This means the movement between regimes or regime shifts are unrelated to the past observations of the process and enables probabilistic statements to be made about the likelihood of the series being in a particular regime in any particular time.Therefore, the regime shifts is said to happen exogenously with an assigned probability to the occurrence of different regimes and this probability is calls the transition probability.The advantage of the transition probability is that it specifies a probability which regimes occur at each point in time rather than imposing particular dates at priori.Therefore, it allows the data to tell the nature and incidence of significant shifts.The Markov switching model has gained much attention because of its flexibility.This is because the model can captures regime shifts in the mean, in the variance and also the parameter of the autoregressive process.
Exchange rates behaviour is one of the areas to which Markov switching model has been widely applied.Engle and Hamilton [4] are the first to study regime shifts behaviour in exchange rates changes using MS-AR model.In their study, they investigate quarterly changes in exchange rates and find the Markov switching model to be a good approximation to the series.Next, Engle [5] extended the work of Engle and Hamilton by exploring whether Markov switching model is a useful tool for describing the behaviour of 18 exchange rates.From his finding, he concludes that the Markov switching models are better at predicting the direction of change of the exchange rate.Then, Engle and Hakkio [6] examined the behaviour of European Monetary System (EMS) exchange rates using Markov switching model and discover that the exchange rates are characterized by long periods of stability disrupted by periods of extreme volatility.
The study continues by March [7] who examined the performance of Markov switching model in capturing the behaviour of daily exchange rates of three countries against the US dollar.He finds the data are well estimated by the Markov switching model but the out-sample forecasting are very poor because of parameter instability.In the following paper by Caporale and Spagnolo [8], they employed the Markov switching model to investigate the nonlinearity behaviour in three South East Asian countries exchange rates against the US dollar.They found that the Markov switching model with regime shifts in the mean and the variance were well suited to capture the nonlinearity in three exchange rates rather than the smooth transition autoregressive model (STAR) and the random walk specification.Recently, Bergman and Hansson [9] discovered that the Markov switching autoregressive model of order one is best to describe the exchange rates of six industrialized countries against the US dollar.
Based on the previous research, it is proven that regime shifts do exist in changes of exchange rates.This motivates us to explore whether this nonlinear feature also exist, in Malaysian exchange rates.Therefore in this paper, we use a 2-regime Markov switching autoregressive model (MS-AR) to detect regime shifts in Malaysian exchange rates changes 1 .We allow the mean and the variance to vary across different regimes where the process driving the regime is a Markov process.The difference between our papers from the other previous papers mentioned earlier is that we check the data for nonlinearity before we use the nonlinear Markov switching autoregressive model.We going to employ portmanteau and structural break tests to show that nonlinear feature exist in Malaysian exchange rates changes and this nonlinear feature is a regime switching behaviour.Furthermore we also apply the likelihood ratio test (LR test) suggested by Garcia and Perron [10] to determine whether the evidence of switching in the regime is statistically significant.
Our paper is organized as follows.Section 2 outlines the 2-regime Markov switching autoregressive model.Section 3 presents the empirical results and discussion on the results.Section 4 contains summary and conclusion.
---1 As discussed by Taylor [11], financial time series can be characterized by two common behaviours that is either the prices move up or down.Therefore, in this paper we use a 2-regimes model to capture periods where the changes of exchange rates appreciate or depreciate.

The Markov Switching Autoregressive Model
In this section we consider a univariate autoregressive process, AR which is subject to regime shifts.We extend the conventional Hamilton's model with a focus on one time regime shifts in the mean by allowing the mean and the variance to shift simultaneously across the regime.The variable under investigation is the monthly exchange rates changes.Therefore, a Markov switching autoregressive model of two regimes with an AR process of order p is given as follow: where t s and 1 t s − are the unobserved regime variables that take the values of 1 or 2 and the transition between regimes is governed by a first order Markov process as follows: )  The Markov process is assumed to be ergodic and irreducible so that absorbing regime will not exist.Equation (2.2) is called the transition probability and it is specified as a constant coefficient that is independent of time t (time-invariant).This means the probability of switch between regimes do not depend on how long the process is in a given regime.
The first step in estimating the MS-AR model is to find the joint probability density function for t y , t s i = and ) Then to obtain the estimated parameters, the log-likelihood function of Equation (2.3) is maximized with respect to ( ) , , , , , p p θ µ µ σ σ = ; ( ) ( ) Before we evaluate Equation (2.4) we need to define the joint probability term ( ) As a result of the Markov chain property, we can denote ( ) ( ) Thus we can write ( ) ( ) ( ) From Equation (2.5), we need to estimate the time dependent regime probabilities, ( ) them with the transition probabilities, ( ) as in Equation (2.2) to solve Equation (2.5).
However, before we calculate ( ) we need to define a steady state probabilities to be used in the estimation later.The steady state probabilities are the regime probability in the first period, ( ) . Given the transition probabilities in Equation (2.2), the steady state probabilities are obtained as ( ) Then the probabilities ( ) , | .
are obtained using the following two steps algorithm 1.Given the time dependent regime probabilities ( ) Once we have the joint probability, ( ) we can calculate the likelihood as in Equation (2.4).
The maximum likelihood estimate for θ is then obtained iteratively by maximizing the likelihood function through updating the likelihood function at each iteration using the two steps algorithm we describe above.This two steps algorithm called the filtering algorithm with infers about the probability of being in either of the two regimes through time t ( ) K .An initial probability is needed to start the filtering algorithm.Therefore, the steady state probabilities are used as initial probabilities and can be expressed as in Equation (2.6) and (2.7).Other alternative are simply to use 0.5 as the initial probability value or to estimate the initial probability itself by the method of maximum likelihood.
From Equation (2.2), the transition probabilities also provide us with expected duration that is the expected length the system is going to stay in a certain regime.Let D define the duration of regime j.Then, the expected duration of the regime j is given by ( ) (2.10) Once we have estimated the model using the filtering algorithm, we also can make inference on the regime, t s using all the information from the sample as suggested by Kim [18].This gives us ( ) which are called the smoothing probabilities.The calculation of the smoothing probabilities are based on the two steps algorithm using Equation (2.5), (2.8) and (2.9) but it uses backward recursion method (from The filtering and smoothing probabilities help us decide which regimes t y belong to at each point of time.Generally, in most applications filtering probabilities and smoothing probabilities would lead to very a similar conclusion. Finally, the conventional procedure for estimating the model parameters is to maximize the log-likelihood function and then to use these estimated parameters to obtain the filtering and smoothing inference for the unobserved regime variable t s .However this method becomes disadvantageous as the number of parameters to be estimated increases.Generally in such cases, the Expectation Maximization (EM) algorithm is used.This technique starts with the initial estimates of the unobserved regime variable, t s and iteratively produces a new joint distribution that increases the probability of the observed data.These two steps are referred to as expectation Mohd Tahir Ismail and Zaidi Isa / Journal of Fundamental Sciences 3 (2007) 211-224 and maximization steps.The EM algorithm has many desirable properties as stated in Hamilton [13,14,15] and Kim and Nelson [16].

Application to Malaysian Exchange Rates
This section starts by giving a description of the data and testing for nonlinearity.Then we justify the use of 2regime Markov switching autoregressive model using the LR test and estimate the MS-AR model.Finally, we collect a series of the filtering and smoothing probabilities to identify regime shifts in the changes series.

Data
The raw data for this study are monthly exchange rates of Malaysian ringgit against four other currencies namely the British pound sterling (MBP), the Australian dollar (MAD), the Japanese yen (MJY) and the Singapore dollar (MSD) from January 1990 to December 2005 for a total of 192 observations.All the exchange rates series are from www.x-rates.comand analysed in changes, which is the first difference of natural logarithms multiplied by 100 to be expressed in percentage terms 2 .We use the monthly changes series because we assume that regime shifts can be observed more clearly across time if low frequency data is used.Figure 1 shows the behaviour of the changes of exchange rates series over the study period.From the figure, we can see that most of the time all the series are stable except around 1997 where higher negative changes had occur 3 .International Monetary Fund (IMF). 3 As the Malaysian ringgit against the US dollar has been fixed since 1998, we can not use the series in our modelling because the analysis is done in changes.

Nonlinearity Testing
We use three portmanteau tests and three structural breaks tests to capture nonlinearity in the four changes series.The three portmanteau tests are the McLeod-Li test, the RESET test and the BDS test.The McLeod-Li test was proposed by McLeod and Li [17] to test for ARCH effects.The objective of this test is to determine whether there is a significant autocorrelation in the squared residuals from a linear equation 4 .The Regression Error Specification Test or RESET test suggested by Ramsey [18] is a specification test for linear least squares regression analysis.The BDS test is derived and discussed by Brock et al. [19] to test the null hypothesis of independently and identically distributed (iid) in the data.In a small sample or series with unusual distribution, the distribution of the BDS statistic departs from asymptotic normal distribution.As a result, a bootstrapped pvalue is calculated.
While the three structural breaks tests are the CUSUM of squares test, the Andrew-Ploberger test and the Bai-Perron test.The CUSUM of squares test was developed by Brown, Durbin and Evan [20] based on a plot of cumulative sum of the squared one-step-ahead forecast error resulting from recursive estimation between two critical lines.The movement outside the critical line is suggestive of parameter or variance instability.The Andrew-Ploberger test and the Bai-Perron tests were introduced by Andrew and Ploberger [21] and Bai and Perron [22], respectively.The former test is used to find evidence of single structural break in the data and the latter test is used to search for multiple structural breaks in the data.These two tests estimate the timing of the structural break or the break date using least squares method.We test for multiple breaks because if we discover one structural break, we want to know whether there is another break in the data.
Based on Table 1, the BDS, McLeod-Li test and RESET test suggested that a linear model may be inadequate in capturing the stochastic properties of the changes series.This is because one or all the three portmanteau tests showed significant results (the p-values are small) for each of the changes series.This suggests that in testing for nonlinearity it is unwise to rely solely on a single test.While in Figure 2, it seems that some of the cumulative sums of the squared values move out from the 5% significant line which reveals instability in all the changes series.The Andrew-Ploberger test also found a single break date in all the changes series.While, a couple of break dates are obtained using the Bai-Perron test.Therefore, from all the results we can conclude that statistically there is evidence of departures from linear behaviour and structural change in all the changes series.Next, we are going to model the four changes series using Markov switching autoregressive model.
--- 4 The numbers of the squared residuals have to be determined before the McLeod and Li test can be conducted.Usually 20 of the squared residuals are used in the test.

Model Estimation
We estimate each of the exchange rates changes using a two regimes univariate Markov switching autoregressive (MS-AR) model to detect the presence of regime switching behaviour.However the number of lags for the AR process has to be determined before the model is estimated.Therefore using the Akaike Information Criteria (AIC) and the Schwartz Bayesian Criteria (SBC), we find that the MS-AR model of order two (MS-AR( 2)) manage to describe the exchange rates changes of Malaysian ringgit against the British pound (MBP) and the Australian dollar (MAD), while the MS-AR model of order one (MS-AR(1)) a suitable for the exchanges rates changes of Malaysian ringgit against the Japanese yen (MJY) and the Singapore dollar (MSD) 5 .The estimation results for each of the exchange rates changes are given in Table 2. Before we further discuss the estimation model, using the likelihood ratio test or LR test suggested [10], we determine whether regime shifts happen in Malaysia exchange rates changes.We test the null hypothesis of no switching in Malaysia exchange rates changes represented by an AR model against an alternative specification (MS-AR model) which involve switching in Malaysia exchange rates changes.The LR test statistic is computed as 2 ln ln the critical value is based on Davies [8] p-value as suggested by Garcia and Perron (1996).The results in Table 2 imply very strong rejection of the null hypothesis of no switching at 1% or 5% critical values.This is because the Davies p-value showed significant results.Therefore, it is clear that there is a strong evidence of regime shifts in Malaysia exchange rates changes and justified the used of nonlinear MS-AR model.The estimated parameters for the MS-AR model using maximum likelihood estimation via EM-algorithm are presented in Table 3.As noteed on Table 3, the estimation model did not capture the long swings in the exchange rates as suggested by Engle and Hamilton [4]  6 .This is because the two identified regimes have means with positive signs.As a result, it is hard to make an economic interpretation using the means.Therefore, the economic interpretation is done using the variances.It seems that the variance of regime 1, ( ) = which suggest that regime 1 is more volatile than regime 2. This ---5 Refer to Akaike [24] and Schwartz [25] for the calculation of AIC and SBC. 6The long swings behaviour characterized the means to be in opposite signs and large value of 11 p and 22 p .
indicates that regime 1 ( ) for each of the exchange rates changes captures the behaviour of the exchange rates in a turbulence phase while regime 2 ( ) describes the exchange rates in a tranquil phase.Besides that, the positive signs of the monthly expected changes signal the percentage of monthly increment in each of exchange rates either in regime 1 or regime 2. It can be seen that the expected percentage monthly increment is higher in regime 1, ( ) µ = (around 0.9% to 4.5%), than in regime 2, ( ) µ = (around 0.1% to 0.3%) which specify that the exchange rates of Malaysian ringgit against one unit of the four other currencies will be higher during the turbulence period than the tranquil period.p for all the changes series.From Table 3, the value of 11 p is around 0.6604 and 0.8960 and the value of 22 p is around 0.9656 and 0.9896 with the expected duration of staying in regime 1, ( ) months and the expected duration of staying in regime 2, ( ) , is between 29 to 96 months 7 .This result implies that all the changes series stay much longer in regime 2 than regime 1.This shows that only an extremely event can switch the series from regime 2, ( ) or from a tranquil period to a turbulence period.
---Another advantage of using the Markov switching autoregressive model is that it provides the conditional regime probabilities which is the probabilities of being in regime 1, ( ) probabilities are very useful in helping to understand more about the economic interpretation that was made earlier using the estimated parameters.Thus, to further assist with the interpretation of the two regimes, Figure 3 and Figure 4 shows the smoothed probability plots for the two regimes MS-AR model fitted to the four monthly changes series of Malaysian exchange rates.It appears that some form of correlation relationship exist between the smoothed probabilities of regime 1 and regime 2. This is because when the probability of regime 1 is close to one the probability of regime 2 is close to zero and it also happens vice versa.This finding indicate that the MS-AR model perform well in getting the direction of change in a series either the series is in regime 1 or in regime 2.
It can be seen from Figure 3 that the smoothed probability plots of regime 1 is near unity around 1997 for all the changes series.This is in line with the economic crisis that happen during that period namely the East Asian financial crisis which causes the Malaysian currencies to depreciate. 8Whereas, the smoothed probability plots of regime 2 in Figure 4 is near one just after the smoothed probability plots of regime 1 is near zero which suggest that regime 2 is in the recovery phase going to tranquil phase of the exchange rates.Therefore the suggestion of regime 1 as the state where the Malaysian exchange rates is in the turbulence phase and regime 2 as the state where the exchange rates is in the tranquil phase by using the estimated parameters is further justified by the smoothed probability plots of regime 1 and regime 2. The duration of every period in regime 1 and regime 2 for all the changes series are given in Table 3 below.rates happen for six months from September 1992 until February 1993.From Kim and Haque [26] and Peria [27], we find that financial crisis happen in Britain and other European countries during this time because of speculative attack on their currencies.The pound sterling had been floating on the market and caused the value to rise before returning to stable state.This situation also affected the exchange rates of Malaysian ringgit against the British pound (MBP) where the exchange rates had increased.

Conclusions
In this paper we adopt a univariate Markov switching autoregressive (MS-AR) model with regime shifts in both the mean and the variance to detect regime shifts behaviour in monthly changes exchange rates series of Malaysian ringgit against four other currencies from 1990 until 2005.The three portmanteau tests we used in this paper suggested that a nonlinear model is more appropriate as compared to linear models for all series being analysed but did not give information regarding the nature of the nonlinearity.Visual inspections against the four changes series plots show the existence of regime shifts behaviour.Therefore to justify this visual finding we conducted three structure break tests where we found evidence of instability in all the changes series.Using the LR test, we found that MS-AR model seems to be not only appropriate but rather superior to conventional linear AR model.From the smoothed probability plots of regime 1, we found that regime shifts happened in the changes series because of the financial crisis in 1997.Finally we concluded that major economic events happened around the world have some effects on the behaviour of Malaysian exchange rates.

Figure 1
Figure 1 Monthly Changes Series ---2 As stated on the website all the exchange rates values are collected from Federal Reserve Bank of New York and/or Figure 3 Smoothed Probabilities of Regime 1 ( ) 1 t s =

Table 2
The Likelihood ratio test

Table 3
Estimated MS-AR(1) model for monthly changes series

Table 3
Duration of Regime 1 and Regime 2