Modeling Stock Market Returns of BRICS with a Markov-Switching Dynamic Regression Model

This article adopted a Markov-switching dynamic regression (MS-DR) model to estimate appropriate models for BRICS countries. The preliminary analysis was done using data from 01/1997 to 01/2017 and to study the movement of 5 stock market returns series. The study further determined if stock market returns exhibit nonlinear relationship or not. The purpose of the study is to measure the switch in returns between two regimes for the five stock market returns, and, secondly, to measure the duration of each regime for all the stock market returns under examination. The results proved the MS-DR model to be useful, with the best fit, to evaluate the characteristics of BRICS countries.


Introduction
Nonlinear models are often used for various purpose and one of their primary purpose is to forecast financial and economic data. Predictive models are usually judged based on their forecast ability (Clements, Franses & Swanson, 2004). Nonlinear models are often used due to their ability for revealing certain attributes in financial and economic data. Some of these features are time-changing variance, asymmetric cycles, highermoment structures, thresholds and breaks and cannot be modelled by linear processes. Many financial and economic data are associated with events such as financial crises, war or change in government monetary policy exhibit dramatic jumps in their behavior (Yarmohammadi et al., 2012). When this behaviour arises in time series data, a powerful tool needed to explain the sudden changes in the business cycle or economy (Clements et al., 2004). Markov regime-switching is one of the statistical tools suitable for data with the said features. A number of studies applied Markov regime-switching models in both financial and economic data analysis. For instance Turner et al. (1990), Cecchetti et al. (1990) and Schaller and van Norden (1997) used Markov Switching Models (MSM) to explain the behaviour of the stock market return while Gray (1996), Hamilton (1988) and Ang and Bekaert (2002) used Markov switching model to explain the characteristics of interest rates. Subagyo and Sugiarto (2016) in their study employed switching Markova regression to estimate better model that can fit GDP of Indonesia. Wasim and Band (2011) contributed to the literature by applying MS-AR measure the existence of bull and bear in the Indian stock market. Amiri (2012) demonstrated the ability of nonlinear models by comparing MS-AR and linear model forecasting performance. Blazsek and Downarowicz (2008) in their work compared the forecasting ability of different models that includes regime switching model, ARIMA model, GARCH model. Furthermore, the authors combined Markov switching model and ARIMA-GARCH models to capture dramatic jumps experienced by the hedge fund returns during the periods of financial chaos. The objective of the study was to assess nonlinear behavior in the hedge funds returns. Galyfianakis et al. (2016) used data from 2005 to 2015,the study examine the behavior of five energy prices series. The current study also tries to address the similar objectives in the BRICS stock market returns data. Furthermore, the study measure the duration of each regime for all the stock market returns under examination and to assess the quality of the regime classification. The current study also tries to address the similar objectives employing the BRICS data. Furthermore, the study measure the duration of each regime for all the stock market returns under examination and to assess the quality of the regime classification. The study is organized as follows. Section 2 outlines the relevant literature review of the study. Section 3 outlines the data and methodology. Section 4 presents the empirical results and Section 5 concluding remarks.

Review of Literature
In this section, the study briefly describes the application of Markov switching models to stock market returns and others markets. The applications of Hidden Markov Models (HMM) to time series appear to have been introduced by Quandt and Goldfeld (1973). However, the models were made more popular after the publications of Hamilton (1989Hamilton ( , 1990. Hamilton (1989) applied Markov-switching model after recognizing their usefulness in capturing asymmetric conditional moments or asymmetric dynamic properties of time series. In one of his popular work, Hamilton (1989) applied MSM to model the recession in the US economy. The estimated model of the economy alternated between two unobserved states of high growth and slow growth according to a Markov chain process. More recently, Caporale & Spagnolo (2004) employed the MSM to model East Asian exchange rates. The motivation for applying Markov switching models was provided by the work of Engle andHamilton (1982), Bekaert (2002), Engle (1982). All these authors document regime shifts in exchange rates, and find that regime switching models provide better in-sample fit and out-of-sample forecasts. This class of models is flexible and has interesting properties, with the models being described by a mixture of two or more distributions. Ismail and Isa (2007) captured regime shifts behaviour in both the mean and variance of Malaysian ringgit exchange rates against British pound sterling, Australian dollar, Singapore dollar and Japanese yen in the period 1990 to 2005 using univariate 2-regime Markov switching autoregressive model (MS-AR) model. The results show that the model captured regime shifts successfully in all four series. Furthermore, likelihood ratio test (LR test) signified the utilization of nonlinear MS-AR model over a linear AR model. Parikakis and Merika (2009) employed Markov switching models to exchange rates with the aim of capturing volatility dynamics and to assess models forecasting ability. It is found that structural changes are somewhat responsible for increased volatilities in four euro-based exchange rates. It is also evident that there is a close relationship between currencies particularly in high volatility periods. Random walk hypothesis is rejected in favour of Markov switching models when using Markov switching Monte Carlo approach. Exchange rate movements are accurately forecasted when using econometric methodology in terms of testing in-sample and out-of-sample Markov trading rules. The model performs exceptionally in terms of out-of-sample returns when applied to euro/US dollar and euro/British pound daily returns.
However, it loses power when applied to euro/Brazilian real and euro/Mexican peso and this seems to be due to higher volatility exercised in Latin America. Yarmohammadi and Mostafaei (2012) used Iranian exchange rate series and compared MS-AR model with six other models in terms of performance in capturing the series. Based on the results MS-AR model is found to be appropriate in terms of best fit to Iran's exchange rate as this is based upon the criterions of AIC and BIC values. The study explored the prospects of formation of currency union among BRICS countries using Markov Regime-Switching model. Furthermore, the real exchange rate markets behaviour in terms of regime switching is compared, the period of the data used is before and after the formation of the group. The study found that there is divergent of real exchange market before the group was found. However, India, China and South Africa show the convergence in direct intervention of central bank after the integration of economies. The study concluded that there is a chance of a strong currency union among BRICS members should there be a strong policy interaction especially in monetary management (Saji, 2019). In the study, volatility of gold returns was tested using the developed models of MS-FIGARCH-hybrid-MPL, MS-APGARCH-hybrid-MLP and MS-FIAPGARCH-hybrid-MLP.
Forecasting criterions of MSE, MAE and RMSE are utilized to evaluate model performance and modified Diebold-Mariano is employed for evaluating forecasting accuracy of the models. Based on the results it is found that the proposed models performs better in modelling and forecasting volatility in daily returns of international gold market (Bildirici and Ersin, 2016). Çifter (2017) employed both regime-dependent impulse response and Markov switching vector autoregression approach to investigate and test the effect of inflation on South African stock market and nonlinear regime-dependent interaction approach respectively. The period between July, 1995 and July, 2017. It is found that in the short-term there is a negative impact in the of inflation, however in the long-term is not evident. Furthermore, stock market movement is also strongly regime-dependent. Aye et al. (2014) used ARFIMA models to BRICS countries in terms of investigating the existence of long memory in daily stock market returns of these countries. Furthermore, the study attempted to clarify the effectiveness of ARFIMA models in predicting stock returns. The evidence found that predicting stock markets yields superior forecasting results by estimating ARFIMA models using various estimation procedures unlike using non-ARFIMA models (AR, MA, ARMA and GARCH).

Data and Methodology
The study used monthly stock market returns of BRICS countries (Brazil, Russia, India, China and South Africa) from 01/1997 to 01/2017. A total of 241 observations were collected. The variables were sourced from www.quantec.com. The variables are stock market returns in percentage t t t 1 R ln(P / P )   where t P the monthly stock market returns are monthly series could reveal structural breaks more clearly across time. The stock market returns display an increasing linear upward trend with drifts from January 1997 to January 2017.

Nonlinearity and Nonstatinary Tests:
The study applied several tests of nonlinearity and nonstationry to assess if it is appropriate to use nonlinear models. Isa and Ismail (2007) in their work advised that it is wise to use different nonlinearity tests, since nonlinearity in time series may appear in several ways. We used two portmanteau tests are the McLeod-Li test and the BDS test. The McLeod-Li test was proposed by McLeod and Li (1983) based on suggestion by Granger and Andersen (1978) to test for ARCH effects. The BDS test is derived and discussed by Brock et al. (1996) to test the null hypothesis of independently and identically distributed (iid) in the data. The plot indicates that the data is unstable and non-stationary, reported in fig 1 below. Further empirical analysis is continued by employing the nonlinear unit root test.  Table 1 reports summary statistics and unit root tests for the return series. On average, stock market returns of South Africa are higher than the stock returns of other BRICS countries, but they are more volatile as indicated by the associated standard deviations. The stock market in China is the least volatile (0.322%) among the stock markets of the BRICS, while the Russian stock market is the most volatile (1.00%). Jarque Bera (JB) for normality is rejected. We were unable to reject the hypothesis that the level of each series was non stationary. In other words, over the sample period all the data series evidence significant skewness and kurtosis implying the existence of market movements with great frequency. The study adopted two types MS-DR model to capture the regime shifts behaviour of BRICS stock market returns. Furthermore, the study used CUSUM test to evaluate the stability of the five stock market retunes. In case of nonstationary, the study used Beirens and Guo test and Beirens Nonlinear ADF unit root test. We applied all these tests to provide evidence that the BRICS stock market returns were nonlinear in nature. Hamilton (1989Hamilton ( , 1990 was the first to apply Markov switching models (MSM) on time series data to identify and describe the specific features of the business cycle. Other researchers used this econometric framework in order to model other financial and economic variables. Hamilton (1993) proposed MSM that is based on the assumption that the development of t X can be explained by states (or regimes), where a two regime Markov-switching regression model can be expressed as:  is the autoregressive coefficient and t  is the error at time t.
In the case where the state (regime) shifts are known, the two regime Markov-switching model can expressed as: where t S represents the regime and is equal to 1 if the process is in regime 1 and 2 if it is in regime 2.
However, in most cases it is not possible to observe in which regime t S the process is currently in and therefore unknown. In Markov-switching regression models the regime t S follows a Markov chain. A model with k regime-dependent intercepts, can be expressed as: Study follows the work of Hamilton (1994), that the probability of the Markov chain t S can be expressed as: where ij p is the probability of moving from regime i at time t-1 to regime j at time t. Using the fact that: (3.5) the probability of state i being followed by state j (also known as the transition matrix) is given by A small value of ij p ( ij  ) is an indication that the model tends to stay longer in regime i while its reciprocal ij 1 p is the expected duration of staying in regime i.

Model Selection Criteria:
To identify the best fitted MS-DR model, study used the Akaike information criterion (Akaike, 1974) and Likelihood ratio test (Bevington and Robinson, 2003). These criterions measure the deviation of the fitted model from the actual data. The model with the minimum value of AIC and LR is chosen. The study compared the MS-DR model with different lags based on these two criterions.

Empirical Findings
In this section, study reports the empirical results obtained from the various tests and regime switching model. The study first extract the states of stock market return by using a regime switching model. A twostate regime switching model is estimated for all the variables under investigation.

LM Test Results:
There is evidence of ARCH effects in the series as the reported p-value is less than the significance level of 0.05 and it is reported in Table 2. Thereby, the null hypothesis of the series being independently and identically distributed (i.i.d.) is rejected and the conclusion is that the stock returns are nonlinear and dependent. BDS test was utilized to evaluate nonlinearity on the series. Both the null hypothesis and alternative hypothesis were stated respectively, the latter stated that the series is i.i.d and the former that the series is nonlinear or non i.i.d. As per the results indicated in table 3, the p-values of the BDS test statistic are all less than 0.05 significance level. Therefore, the null hypothesis of i.i.d is strongly rejected in favour of the alternative hypothesis. Therefore, the conclusion is that the time series is nonlinear in nature.  Brock, et al. (1987) which simulated the results using 1000 repetitions. The independently and identically distributed null hypothesis is rejected strongly. It should be taken into account that regulatory reforms or regime change amongst other factors can lead to the rejection of i.i.d and giving returns an appearance of non-randomness (when actually returns are random in suitable periods).

Nonstationary Results:
The Bierens and Guo (1993) test results of stationarity are rejected in table 4. Overall, we come to a conclusion that there is no proof of mean-reversion in the level of stock price using the critical values computed by Mackinnon's (1990) method. It is discovered that at conventional significance level the null hypothesis which states that real stock market returns series contains unit root cannot be rejected and therefore the conclusion is that all series are nonstationary, similar results were found by Assaf (2006).  Bierens-Guo (1993)  The B-NLADF unit root test results for different Chebyshev polynomial orders are presented in table 5. Wild bootstrap procedure is utilized for simulating p-values for all the tests, an approach by Bierens (1997) is adopted by the study. The AIC is used for choosing optimal lag length for each variable, while the 10000 replications of Gaussian AR(m) process was used to obtain test statistics. The results show that at conventional levels of 0.05, 0.10, 0.90 and 0.95 the null hypothesis of nonlinear unit root cannot be rejected for all the five variables. The test statistic of t-test, Am and F-test reported are all greater than their corresponding critical values. In conclusion all the variables are non-stationary at levels.   In this section, study report the empirical results obtained from the regressions. A regime switching model is used to extract the states of the stock market return. A two-state regime switching model is estimated for all the variables under investigation. The Table 7 below shows the estimated coefficients of the regime switching models. As observed from these results, Brazil, Russia, India, China and RSA, the estimated coefficients of the regime switching models (expected monthly increments in stock returns) are higher in Regime 0 (low) than in Regime 1(high) (that is, > for Brazil, Russia, India, China and RSA). These results indicates that regime 0 (low or calm regime) is more stable and markets spend more time in this regime than in regime 1 (high regime) for all stock market returns. Furthermore, parameter σ represents volatility. Among the five commodity prices, Russia has the highest variance of returns followed by India.  Galyfianakis et al. (2016) and Saji (2017). Further, study specifies the mechanism that describes how to move from one regime to another. This is achievable with the Markov transition matrix which contains probabilities of jumping from one regime to another (Huisman and Mahieu, 2003). The probability of moving from state j in one period (regime 1) to state i in the next period (regime 0) only depends on the previous state. Study thus obtain, as presented in the following Table 8, the matrix of transition probabilities, with conditional probabilities in columns summing to one for all the parameters under investigation.  The results show that for Brazil, there is a 0.39% probability to move from regime 1 to regime 0 but is much easier to get out of regime 0 with a probability of 0.45% each month. Similarly, the results obtained for Russia 0.39% probability to move from regime 0 to regime 1, while there is a 0.51% probability to get out from regime 0. India results show that there is a probability 0.41% to move from regime 1 to regime 0, while there is a 0.45% probability to get out from regime 0. Analogically, China and RSA provide us with similar results with the other stock market returns by moving from one regime to another but much higher probability (1.58%) of getting out of regime 0. To further assist with the economic interpretation of the different regimes, the Smoothed Regime Probabilities depicted in Figures 3-7 for all the parameters under investigation. Study note that for all our data series, episodes of the crisis (low) regime (regime 1) occur in two distinct periods.
The first begins at about the 25th month of our data and coincides the Russian financial crisis, at the second half of 1998. The second distinct period, beginning almost at the 120th month of our data, which caused a global economic crisis and a sharp decline in stock market in 2008.  Based on the smoothed probabilities of the various MS-DR models, stock market returns yields were classified into one of the two regimes -low or stable regime (Regime 0) and high or unstable regime (Regime 1) -as reported in Table 9 The regime classification based results show China stock returns having the longest period of stability (125 months or 51.87% stability of the time) with an average duration of 62.50 months, while RSA stock returns have the shortest period of stability (94 months or 39.00% stability of the time) with an average duration of 94 months.
Regime Classification Measure: According to Ang and Bekaert (2002) we can calculate a measure in order to assess the quality of the regime classification. This measure is called Regime Classification Measure (RCM) and the formula for a model with two regime is the following: Where pt is the smoothed regime probabilities and T is their total number. When the regime-switching model cannot successfully separate the regimes, then we have weak regime inference. If pt is close to 1 or 0, the regime-switching model is ideal and it classifies regimes abruptly. The fixed term in the form is used to keep the RCM statistics between 0 and 100. Low RCM implies good regime classification. On the other hand, a value of denotes that we cannot observe any information about the regimes. Now, in the analysis study find the following values for the RCM statistic (Table 10). The RCM statistic is relatively low for all the indices. Therefore, study can conclude that the regime classification for the model in all five cases is good enough. The regime-switching model of India produced perfect followed by Brazil, Russia, China and RSA.

Conclusion
The exploratory analyse were conducted to examine the nature of the data. Preliminary analysis were conducted which revealed that all the variables were not normally distributed. Furthermore, the study was to provide evidence that the underlying characteristics of the five stock retunes (Brazil, Russia, India, China and RSA) used in the study were nonlinear in nature. To address the objective, various tests, including the BDS and LM, were conducted. Results from the BDS tests results revealed no structural change in the data while Lagrange Multiplier (LM) tests also suggested that the five stock returns (Brazil, Russia, India, China and RSA) were nonlinear in nature. Furthermore, nonstationary test was used the support the results of nonlinear test and the Bierens nonlinear unit root tests confirmed that variables are nonlinear and nonstationary in nature. Moreover, the three tests suggest that a nonlinear model is more appropriate to be used in this study. Study employed a regimes Markov Switching Dynamic Regression (MS-DR) model to measure the switch. The smooth probability enables the researcher to look back and to determine, when a particular regime has emerged, or, in other words, if and what specific time the regime switches occur.
Our results indicate that our model corresponds to two regimes; a calm regime (regime 0) and a crisis regime (regime 1) for all of stock market with the exception of gasoline which plots some more recessions (or crisis regimes). In returns between two regimes for the five variables, and to measure the duration of each regime for all the variable. The study found that the five return series are well fitted by the MS-DR model and a two regime switching behaviour can be extracted. Furthermore, the study found that the MS-DR model managed to capture a satisfactory timing of the two crisis period that affected the five stock markets. Finally study concluded that there is evidence of comovement among the five stock market returns because study managed to extract common regime switching behaviour among them. Overall, the results indicate that, using a simple MRS model, financial analysts of stock markets may be able to obtain superior gains in terms of regime switching modeling (i.e. when it allows different states of the economy). An interesting direction for future research is to explore stock market use using a Markov switching Bayesian VAR approach.