Modeling South African Banks closing stock prices: a Markov-Switching Approach

In this paper, we provide evidence that the five variables used in the study were nonlinear in nature, while finding a better Markov-switching model. The study used dailydata obtained from the Johannesburg Stock Exchange over the period from January 2010 to December 2012. An extension of Markov Switching with autoregressive model was used for empirical analysis. Prior to using this model, the series were tested for nonlinear unit root with modified Kapetanois-Shin-Snell nonlinear Augmented Dickey-Fuller (KSS-NADF) test which successfully provided positive results.Other preliminary tests selected the first lag as optimal and confirmed that stock prices may switch between two regimes. Further empirical findings proved that stock prices can be successfully modelled with Markov Switching Autoregressive model of order one. First National bank was found to have 99.64% longer stock price stability if adjustments regards tofinancialpolicies are made. Capitec Bank was the least favoured among the banks.


Introduction
In recent years, stock markets data analyses have become very important object of academic research.In the course of establishing deeper understanding of the 2007-2008 financial crises, research findings reported that standard time series models have several shortages in precision and robustness.The conventional methods often employed by data analysts to capture the dynamics and patterns in the most financial time series based on the assumption of linearity, leading to failure by majority of models failing to address the fundamentals of most financial data.Having discovered the glitch, various researchers and financial practitioners have shifted their attention to the use of nonlinear prediction methods.These modelling techniques fulfil many other useful roles such as generating forecasts whilst capturing volatility and nonlinearity very well.Applications of such techniques in the field of finance have proven to reflect valid empirical and theoretical knowledge of how financial markets work.They also help in explaining changes in financial markets and the anticipation of any unexpected changes.Where linear methods fail to describe the dynamics of finance time series, nonlinear methods are the main alternatives.
Literature highlights evidence of occasional sudden breaks in many financial and economic time series, especially stock market data, making it extremely difficult for accurate prediction.These changes have been attributed to several reasons including changes in economic conditions, investor expectations, relative performance of other stock markets, responses to shocks from exogenous geopolitical events or financial crises, or disruptions due to weather related catastrophes, just to mention a few.This is supported by Vasanthi et al. (2011) who reiterated that prediction of financial market could be a complex task since the distribution of such data often changes over a period of time.Consequently, determining more effective and efficient ways of predicting the movement of stock market prices are important.The findings of this study could be useful to finance professionals who refer to forecasts when making financial plans.The five suggested banks and others may also use the findings when compiling report regards to their earnings expectations.Investors on the other hand need to be assured of their value for money as they invest their hard earned capital in stocks with the expectation of gaining from their investment through a positive payoff (Ababio, 2012).As a result, availability of knowledge about share price movement in the future serves the interest of financial professionals and investors.Through this knowledge, investor's confidence may be boosted by way of consulting and investing.
The most basic reason for forecasting stock market price is financial gain.Any model found to be reliable in forecasting stock market prices would make the owner of the method very popular and wealthy.Hence, many individuals, including academics, researchers, investment professionals and investors are searching for a superior method which will offer high returns (Dase et al., 2011).According to Hemanth et al. (2012), the main objective of stock market forecasting is to determine the future price of a company stock or other financial instrument traded on a financial market exchange.The successful prediction of a stock's future price could help the buyer and seller to make good decisions.The investor may realise a significant profit by buying stock at its lowest price and sell when the price is at its highest level.This study explores the efficiency and robustness of a nonlinear Markov-Switching autoregressive (MS-AR) model in predicting closing stock prices of the five major Banks in South Africa.The model yielding the least error margin will be of much interest to financial professional and investors.There is death of literature on the application of the MS-AR model in stock prediction in the context of South Africa.As a result, this study contributes to literature in this area.The application of this method may also stimulate interest to other scholars who wish to analyse other financial data exhibiting nonlinearities.The MS-AR model is vouched for by a number of authors who have published in the areas of finance and economics in different countries as an efficient and good predictor when used in financial data.In the next section, literature reviewed justifies the applicability of MS-AR model in finances by different authors from different countries.The rest of the paper is organized as follows.Section 2 provides a summary review of literature, Section 3 description ofMS-AR model.In Section 34, the discussion of empirical results is provided and conclusions and recommendations are given in Section 4.

Literature Review
A number of studies applied MS-AR model in both financial and economic data analysis.Hamilton applied Markov Switching Models in 1989 to explain the specific features of macroeconomic and financial time series.Specifically, Turner et al. (1989), Cecchetti et al. (1990) and Schaller and van Norden (1997) use MSM to model stock market return while Gray (1996), Hamilton (1988) and Ang and Bekaert (2002) employed this techniques to explain the behaviour of interest rates.The first application of Markov Switching model in financial econometrics was done by pioneers Turner et al. (1989).The authorswere the first to apply MS-AR model to capture the regime shifts behaviour in stock market returns.The study applied the model of normal distribution to study the relationship between the market risk premium and variance of stock returns using monthly prices of the S & P 500.The findings revealed the usefulness of the MS-AR allowing the regime shifts to happen in mean and variances and fitting the data effectively compared to other specifications of Markov regime switching models.A follow-up study which applied this model by Chu et al. (1996) examined the relationship between stock market returns and stock market volatility.The study revealed a nonlinear and asymmetrical relationship between returns and volatility.The findings of the two studies provide more bases to conclude that MS-AR model is good in revealing the features in the data that other nonlinear models fail to reveal.Liu (2011) conducted a study similar to Turner et al. (1989) and Schaller and Norden (1997).The authors incorporated regressors in the state-dependent volatilities through a link function to Markov switching model.This incorporation was done to assess sources of persistence on state-dependent volatilities.The model effectively produced new evidence on the relationship between market volatility and expected returns.Specifically the authors were studying the effect of two important volatility determinants of both price range and trade volume, thus assessing their importance in terms of both explanatory power and predictability for return volatility.The findings revealed strong evidence of switching behaviour in the US stock market with equities switching between two states; low expected return and high volatility state.The study by Wasim and Bandi (2011) aimed at determining if there existsbull and bear in the Indian stock market.The Akaike, Hana-Quinn and Schwartz information criteria were used to identify the model best fitting the data.Two-state MS-AR (2) model was used to identify bull and bear market regimes.The predictions by the model showed that Indian stock market remain under a bull regime with very much higher probability than the bear regime.The findings further showed that bull regime was more than a month in both the markets and that bear phases occurred during all major global economic crises including recent US sub-prime (2007)(2008) and European debt crisis (2010).Cruz and Mapa (2013) also contributed to the literature by developing an early warning system (EWS) for predicting inflation in the Philippines.The study used four two-regime  − (1) to  − (4) models.The Akaike information criterion used and various diagnostic tests were in favour of the − (2).The study concluded that Philippine inflation rate is better when modelled by a two-state − (2), with the estimated average inflation rate.The predictions further suggestedlower inflation rate targets for Bangkok Sentraling Philippines.

Application to South African banking Stocks:
This section provides a description for the data and ensures it is ready for application by addressing nonlinearity in unit root using the Kapetanois-Shin-Snell Nonlinear Augmented Dickey-Fuller Unit (KSS-NADF).The application of MS-AR models becomes effective on nonlinear unit root data.A review of the MS-AR model is also provided in this section.

Data:
The study employed the stock prices of South Africa collected daily for the period 2010-2012.A total of 563 observations were obtained from http://www.jse.com.The banks that responded were ABSA Bank (ABSA), Capitec Bank (CAPB), First National Bank (FIRB), Nedbank (NEDB) and Standard Bank (STDB) and ccoincidentally, these five banks constitute the five largest banks listed on the JSE.These also happened to be the five major banks in the country.Figure 1 is a depiction of the closing stock price series.The purpose of this figure is to identify broad characteristics of the variables used in this study.

Figure 1: Graphical Representation of the Five Closing Stock Prices
A visual examination of the plot reveals different patterns.FIRB has the lowest stock prices and is estimated by an upward sloping trend.Stock prices of other banks are explained by irregular increasing patterns with ABSA and NEBD showing convergence at several stages.Given this movements by the stock prices, the data is not stationary at all levels.Further empirical analysis is continued by employing the nonlinear unit root test discussed in the next section.

Preliminary tests:
The Kapetanois-Shin-Snell (KSS) is used to test unit root in nonlinear time series.The KSS test is a modification of the Augmented Dickey-Fuller (ADF), based on the following nonlinear model specification (Kapetanios et al., 2003): Which when parameterised yields: Where 1     ,  ,  are parameters that must be estimated and t  is the residual term.The KSS test sets 0  and the decay parameter, d1  , so that the test is formally based on the following specification: The KSS tests the null hypothesis of linear stationarity by setting 0  against the alternative that 0  .However, Katepenios et al. (2003) argue that it is impossible to directly test the null hypothesis since the speed of reversion,  , is unknown.Using a first-order Taylor series approximation, Luukkonen et al. (1988) reformulated an estimable nonlinear specification for testing nonlinear stationarity in t X as: (4) To account for the possibility of serial correlation in the error term, equation ( 4) is augmented with lags of the first-difference of t X as: Where is the coefficient used to test the presence of a unit root.From the nonlinear stationarity specification, the KSS-NADF unit root test is based on the t-statistic: (Nonlinear stationarity) Three different asymptotic critical values are constructed with three different nonlinear model specifications -raw data, demeaned data, and de-trended data (Kapetanios et al., 2003).The following scenarios prevail:  If t X has a zero mean, then the appropriate data to use is YX  , the raw data.
 If t X has a non-zero mean and zero trend, then the appropriate data to use is t t Y X -X  , the demeaned data, where X is the mean of the data. If t X has a non-zero mean and non-zero trend, then the appropriate data to use is , the de-trended data, where 0 1 t    is the trendline obtained by regressing t X on time point t=1, 2, 3,.., n with an intercept term.The KSS-NLADF test is sensitive to the choice of lag length, .One prominent approach to select  is use of general-to-specific method suggested by Hall (1994).This involves setting up an upper bound, pmax, suggested by Schwert (1989): Where n is the sample size, estimating the test regression with  = .This study will, however, appeal to the lag length of 8 as recommended by Liew et al. (2004).At the 1%, 5% or 10% level, if the last included lag is significant, it is retained as the optimal lag and used in the KSS-NLADF unit root test.However, if the last included lag is not significant,  is reduced by one lag until last included lag is significant, and used as the optimal lag for the KSS-NLADF unit root test.The null hypothesis of the nonlinear unit root is rejected in favour of the alternative if the t-statistic is greater than the critical value as some α-level of significance.Table 1 presents asymptotic critical values at the 1%, 5% and 10% levels.As a starting point for the KSS-NLADF, various regression analyses were conducted to examine whether the raw (zero-mean), de-meaned (single-mean) or de-trended data be used in conducting the KSS-NLADF test as discussed in Section 3.2.Preliminary results proved that the intercept term, c, and trend variable, t, to be significant at the 5% significance level for all five variables, thus suggesting that de-trended variables be used in the KSS-NLADF unit root tests.Upon using the Schwartz Bayesian Criterion, an optimal lag one was selected and included in the analysis.The results for KSS-NLADF are summarised in Table 2.  5% and 1% significant levels are -3.13, -3.40 and -3.93, respectively Referring to the results in Table 2 and the critical values in Table 1, the null hypothesis of nonlinear unit root is rejected for all the five banks at all levels of significance.The observedp-values for KSS test are all less than the conventional levels of significance.This means that the data exhibit asymmetric and nonlinear stationarity allowing the application of MS-AR model to be used.

Model estimation
The underlying principle of Markov Switching Models is to decompose nonlinear time series into a finite sequence of distinct stochastic processes, states or regimes, whereby the parameters are allowed to take on different values with regard to the state/regime prevailing at time t.Switches between states/regimes arise from the outcome of an unobservable regime variable, t S , which is assumed to evolve according to a Markov Chain Given the time series t {X : t 1,2,3,...,n}  , the MS-AR model assumes the representation adopting Hamilton (1989): Which, when re-parameterised yields: In the current study, two states or regimes assumed that  = 2 and the underlying  −  () model is given by: The transition matrix is, thus, given by: The MS-AR allows one to make inferences about the value of the observed regime, t S , through the observed behaviour of t X .This inference takes the form of probabilities called 'filtered probabilities', which are estimated using a simple iterative algorithm that computes both the likelihood function recursively and , the filtered probability conditional on the set of observations, t t t 1 t 2 1 0 (X ,X ,X ,...,X ,X )   up to time t.If the whole data set is used, the probabilities obtained are called the 'smoothed probabilities' which is estimated conditional on all the n available observations,  . An important result that can be derived from the transition matrix is the expected duration (or average duration) of regime i as well as the average duration of regime i.The expected duration of regime iis given by: ) is an indication that the model tends to stay longer in state i while its reciprocal ij 1p describes the expected duration of the process to stay in state i.

Results
In order to ascertain the possibility of using two-regime switching models for the variables, linearity likelihood ratio (LR) tests were conducted and the regime results reported in Table 3. Findings from the linearity LR results suggest that the null hypothesis of no regime switching is rejected in favour of the two regimes.The p-value of the chi-square statistics for all the five variables are all significant at the 10%, 5% or 1% level.Therefore, theLR test results support a two-state regime for all the five variables.Similar results were reported by Ismail and Isa (2007), Psaradakis et al. (2009), Wasin andBandi (2011) and Yarmohammadi et al. (2012).The information gathered from preliminary analysis was consolidated to run the analysis using the MS-AR(1) model and the results are summarised in Table 4.As observed from these results, with ABSA, CAPB and FIRB, the variance of Regime 2  2 t σ (s 2) is greater than the variance of Regime 2   − 1 . .This suggests that Regime 2 is more volatile than Regime 1 regards to the three stocks.In other words, Regime 2 captures the volatility behaviours in ABSA, CAPB and FIRB in an unstable manner while Regime 1 captures the behaviours of the three stock prices in a stable manner.The opposite is true for NEDB and STDB since the variances of Regime 1,  2 t σ (s 1) is greater than the variance of Regime 2,  2 t σ (s 2) .It is also observed that, for ABSA, FIRB, NEDB and STDB, the estimated regime-dependent intercepts (expected daily increments in closing stock prices) are higher in Regime 1 than in Regime 2 (that is,  t μ(s 1) >  t μ(s 2) for ABSA, FIRB, NEDB and STDB) while the opposite holds in the case of CAPB.In other words, changes in ABSA, FIRB, NEDB and STDB closing stock prices increased in a stable state while opposite holds for CAPB.
In the absence of autocorrelation in 0  .Hence, the hypotheses usually considered in the Durbin-Watson test are: The autocorrelation test results are summarised in Table 5.The results in Table 3

Conclusion
The study modelled the daily closing stock price series of five variablesin South Africa.Data was obtained from the Johannesburg stock exchange covering the period 2010 to 2012.Prior to application of the MA-AR model, the data used was prepared by checking nonlinearity in unit root using the KSS-NLADF test.This is a basic assumption for using the suggested model.The results from this test confirmed that the five stock prices are indeed nonlinear and the stationarity condition was also captured.This implies that the South African stock prices are no different from those of other countries as reported in literature.The data does conform to time series properties and is suitable for application of nonlinear models.The suggested MS-AR model was used to provide results in the primary analysis.The SBC was used as a guiding criterion to select an optimal used in building the model.The analysis also suggested an MS-AR model switching between two regimes.The daily stock prices of the three banks ABSA, Capitec and First National banks proved to be more volatile compared to those of Standard bank and Nedbank.The findings further revealed that the expected daily increment in daily stock prices for ABSA, Nedbank, Standard and First National banks are stable and higher in Regime 1 than in Regime 2 overtime.This could also mean good returns for clients using these banks.The results rule out Capitec Bank as providing value for money in terms of investment.
However, classification results proved FIRB closing stock prices as having the longest period of about 99.64% stability, i.e. a total of about 560 days in average of 187 days.Standard bank is the second revealing about 96.62% running over 543 days on an average of 45 days.Nedbank was identified as having the lowest stability of about 51.6% over 290 days.Further analysis proved that the MS-AR (1) is a best modeller of closing stock prices in South Africa and that the model can be used to generate forecasts when planning for future.Based on these conclusions, the study makes the following recommendations:  Since MS-AR (1) model proved to be effective in capturing regime shifts behaviour in stock market returns, asymmetrical relationships between returns, nonlinear unit root and volatility, analysts of stock markets from other countries may use this model in their studies.
 Further studies may apply Markov Switching model with extension of moving averages (MA) and autoregressive moving averages (ARMA).Just like the autoregressive (AR) model, the MA and ARMA are Box-Jenkins univariate processes built for stationary and linear time series.Their integration of AR model in Markov Switching provided robust model which may be used for further analyses. For policy purposes, financial analysts at the five banks may refer to the findings of this study when revising their policies.Closing stock prices have proven to be volatile for ABSA, Capitec and First National banks and as a result policies to address such instability have to be formulated.Provided adjustments are made to stock prices, there are 99.64%chances that First National Bank prices will be stable for 560 days.ABSA and Capitec banks may experience improved 86.3% and 74.7% stability in prices for 485 and 420 days respectively.This provides guarantee for investors and/or clients of these banks that they will enjoy value for their money.Some banks may however lose their clients to others on the process.
.( ) is the standard error of .The following hypotheses are tested: respectively, the observed and predicted values of the response variable.Upper and lower critical values, dU and dL have been tabulated for different values of k (the number of explanatory variables) and n.Based on the estimated DW, the following decisions suffice:

Table 2 : KSS Nonlinear Unit Root Test Bank Optimal Lag, P Estimate
, the last state/regime).The change from one state to another is governed by the R-state first-order Markov Chain with transition probabilities, expressed as: is the probability of moving from state i at time  − 1 to state  at time .Using the fact that: t S2  ), …, and R  if the process is in state/regime R ( t SR  ij p

Table 4 : Two-Regime MS-AR Modelling Results
show the insignificant pvalues of the Durbin-Watson and Breusch-Godfrey test statistics.These observed probabilities are greater than the 1%, 5% and 1% significance levels, suggesting that the residuals are not auto correlated.This means that the MS-AR model residuals do not violate the serial correlation assumption.This finding is supported by the Portmanteau test results reported in Table4(that is, the p-values of the chi-square test statistics are greater than 1%, 5% or 10% levels).

Table 5 : Durbin-Watson and Breusch-Godfrey Tests of Residuals from MS-AR Models Autocorrelation Tests of Residuals
One other way of assessing model robustness is by comparing the actual and predicted values of a series.Appendix C displays the overlay plots of the actual series and predicted series from the MS-AR (1) model.The model appears to predict the actual series well, suggesting that the MS-AR model could performed relatively well in tracking the behaviours of the five closing stock prices.Both series are moving along the same trend suggesting that MS-AR model could provide efficient and robust forecasts of the closing five stock prices.Based on the smoothed probabilities of the various MS-AR (1) models, closing stock yields were classified into one of the two regimes -stable regime (Regime 1) and volatile regime (Regime 2) as reported in Table6.The classification results show FIRB closing stock prices having the longest period of stability, i.e. 560 days or 99.64% stability, with an average duration of almost 186.67 days while NEDB closing stock price have the shortest period of stability (290 days or 51.60% stability) with an average duration of 290.00 days.