Early detection of Indonesian financial crisis using combination of volatility and Markov switching models based on indicators of real exchange rate and M2/foreign exchange reserves

The financial crisis that occurred in the middle of 1997 and 2008 had a significant impact on the economy of Indonesia. To minimize the impact of the crisis, an early detection system that can detect some signs of a financial crisis is needed so that the relevant departments can apply some appropriate policies. The crisis occurred due to several macroeconomic indicators which reached very high fluctuation and changing condition. The combination of volatility and Markov switching models could explain the crisis. The indicators of the real exchange rate and M2/foreign exchange reserves from January 1990 to June 2018 were used to build such combined model. The results showed that the best model of real exchange rate and M2/foreign exchange reserves are MS GARCH (2,1,1). Real exchange rate indicator could explain the crisis in 1997 and 2008 periods, while the M2/foreign exchange reserves indicator could only explain the crisis in 1997. The predicted value of smoothed probability of real exchange rate and M2/foreign exchange reserves indicators showed that by the end of 2019 and early 2020 there will be no signs of a financial crisis in Indonesia.


Introduction
Financial crisis in Indonesia happened on two periods, namely in 1997 and 2008. The crisis in Indonesia occurred due to the transmission of such crisis that occurred in other countries because the open economic system that was applied. Financial crisis that happened in Asia in the mid-1997 began with collapse of the exchange rate of Baht. Crisis then occurred in Indonesia which resulted in the fall of the rupiah toward the dollar. The crisis also gave effect to the economic condition in Indonesia. Based on Kaminsky et al. [1], there are 15 macroeconomic indicators can be used to form early warning model to give sign of crisis, two of them are real exchange rate and M2/foreign exchange reserves. Those indicators are time series data that contain high fluctuation and changing conditions, so the model that can be used is a combination of volatility and Markov switching model. Chang et al. [2] applying MS ARCH model based on real exchange rate indicator to identify the volatility of foreign currency and the financial crisis in Korea with three states assumption. Sugiyanto et al. [3] conducted research on a combined Markov switching and volatility models which is capable of detecting crises based on bank deposit, real exchange rate and term of trade indicators. Sugiyanto et al. [4] conducted a univariate study of M1, M2/foreign exchange reserves, and M2 multipliers indicators using SWARCH model. Each indicator has a different level of sensitivity in capturing crisis signals, but all three indicators could detect both the 1997 and 2008 crises.
In this research, volatility and Markov switching model are combined to explain volatility and changing condition of real exchange rates and M2/foreign exchange reserves indicators. In Sugiyanto et al. [4] research, the determination of the number of states is based on changing conditions. Whereas in this study, the number of states used is the cluster optimum value. This model will be used for early detection of financial crisis in Indonesia in 2020.

Theoritical framework
In this research, an analysis was conducted to detect and predict crisis condition based on real exchange rate and M2/foreign exchange reservesindicators. Theories that support this analysis are as follows

Augmented Dickey Fuller (ADF) test
Stationarity of data can be tested ADF test. ADF test statistic can be written as log return transformation method was applied to turn the unstationary data into stationary. Log return transformation formulated as

Autoregressive Moving Average (ARMA) model
According to Tsay [5], ARMA (p, q) model can be written by where ∅ 0 is model constant, ∅ is parameter of AR, is parameter of MA, and is residue of ARMA model.

Autoregressive Conditional Heteroscedasticity (ARCH) model
Based to Tsay [5], ARCH (m) is written by = with ~(0,1) and | −1~( 0, 2 ) where is the residual standardized volatility model, −1 is the set of all information from ( − 1) period, m is model order, 0 is constant of model , is parameter coefficient of model, and 2 is the residual variance of t period.

Generalized Autoregressive Conditional Heteroscedasticity (GARCH) model
If ARCH order was greater than 5, then GARCH model was formed. GARCH (m, s) model is written by with is the parameter of GARCH model.

Markov Switching Autoregressive Conditional Heteroscedasticity (MS ARCH) model
According to Hamilton and Susmel [6], MS ARCH is written by where is conditional average and , 2 residual variance in a state of t period.

Markov Switching Generalized Autoregressive Conditional Heteroscedasticity (MS GARCH) model
Based on Gray [7], MS GARCH is written by Smoothed probability value in the MS GARCH model is used to determine and predict crises. According to Kim and Nelson [8], the smoothed probability value (Pr( = | )), = 1,2, … , and it can be formulated as with is a collection of all information in the observational data up to time . According to Sopipan et al. [9], smoothed probability value in T+1 would be forecasted by The short term signal of a crisis can be obtained from the total of the predicted value of smoothed probability that exceeds a predetermined threshold.

Method
This research studied about early detection of crisis condition using monthly data of real exchange rate and M2/foreign exchange reserves indicators. Data were obtained from Bank Indonesia and International Monetery Fund from January 1990 to June 2019. In this research, the researchers used real exchange rate data from January 1990 to June 2018 as training data, next 12 periods were used as testing data. The steps are as follows (1) Visualizing data through data plots then perform ADF test. If data were unstationary, then log return transformation were carried out to station the data. (2) Making a partial autocorrelation function (PACF) and autocorrelation function (ACF) plot of transformed data to build ARMA (p,q) model. Best model selection is based on smallest AIC value and the significance of parameters. After obtaining the best model, the test of heteroscedasticity effect on the model residue using the Lagrange Multiplier (LM) test was done. (3) Identifying heteroscedasticity effect to form ARCH or GARCH volatility model. (4) Establishing and conducting diagnostic test on the best volatility model that are autocorrelation, heteroscedasticity and normality tests. The autocorrelation is tested using Ljung-Box test, the heteroscedasticity is tested using Lagrange multiplier test, and the normality is tested using Kolmogorov Smirnov test.

Results and discussion
In this research, monthly data of real exchange rate and M2/foreign exchange reserves from January 1990 to June 2019 was used to build the detection model.

Data plots
Plots of real exchange rate and M2/foreign exchange reserves indicators are presented in figure 1 and figure 2. Figure 1 and figure 2 shows that data were not stationary because the data fluctuate and has abnormal patterns as they approach a crisis period. To reinforce these assumption, the ADF test was carried out and the probability values for both indicators were obtained as much as 0.4418 and 0.3824. Each of probability value is greater than α = 0.05, so those two data were not stationary.  The next step is to transform unstationary data using log return transformation and did the ADF test again for those data. The probability value for both indicators are 0.01 less than α = 0.05, so that it can be concluded that the transformed data of both indicators was stationary. The plot of log return data shown in figure 3 and figure 4. Based on the transformed data plot, the data was fluctuate around zero and has no trend pattern.   After obtaining an AR model for the log return data of real exchange rate and ARMA model for log return data of M2/foreign exchange reserves, then a heteroscedasticity effect test was performed to determine whether there was heteroscedasticity effect on the model residue or not. Heteroscedasticity effect test was performed with LM test and the probability values for each indicator was obtained as much as 0.00005785 and 0.001125. The probability value were fewer than α = 0.05. So, there was heteroscedasticity effect of model residue.

Formation of volatility model
Volatility models are built to deal with heteroscedasticity effects on the residues of AR and ARMA models. In order to determine the best volatility model, several models are compared. The best model is the model that has smallest AIC value. The best volatility model is obtained, namely GARCH (1,1) for real exchange rate indicator is written by The normality test from residue of GARCH (1,1) for real exchange rate was done with the Kolmogorov Smirnov (KS) test. The probability value of normality test was 0.7412 which was greater than α = 0.05. The autocorrelation was tested using the Ljung-Box test, the probability value was 0.05796 which is greater than α = 0.05. The test of heteroscedasticity effect on the model residue was tested using LM test and the probability value was 0.9995 which is greater than α = 0.05. So, the residue of GARCH(1,1) model for real exchange rate data was normally distributed, had no autocorrelation and had no heteroscedasticity effect.
The normality test using KS test of residue of GARCH (1,1) for M2/foreign exchange reserves shows that the probability value was 0.9971 which was greater than α = 0.05. The autocorrelation in the residue of volatility model showed that the probability value was 0.08787 which is greater than α = 0.05. The test of heteroscedasticity effect on the model residue showed that the probability value was 0.9385 which is greater than α = 0.05. So, the residue of GARCH (1,1) model for M2/foreign exchange reserves data was normally distributed, had no autocorrelation and had no heteroscedasticity effect.

Formation of MS GARCH model
The best volatility model was combined with the Markov switching model with k state. The value of k optimum state was obtained from clustering method using the Dynamic Time Wrapping (DTW) distance. For both indicators, the optimum state was 2, it meant that the state explained crisis condition and static condition. Transition probability matrix for real exchange rate indicator is Transition probability matrix showed that the probability of surviving in a low volatility state was 0.91902571. The probability change from low to high volatility state was 0.02137152. The probability change from a high to a low volatility state was as much as 0.08097429. The probability of surviving in a high volatility state is 0.97862848.
Transition probability matrix for M2/foreign exchange reserves indicator is , 0.9869168 0.0130832 Transition probability matrix shows that the probability of surviving in a low volatility state is 0.9446865. The probability change from low to high volatility state is 0.0553135. The probability change from high to low state volatility is 0.0130832. The probability of surviving in high volatility states is as much as 0.9869168.
The results of parameter estimation of MS GARCH (2,1,1) for real exchange rate and M2/foreign exchange reserves indicators are as follows

Crisis Detection
In order to determined crisis condition, the smoothed probability value was compared with a threshold. A threshold was obtained based on the smallest smoothed probability value when a crisis occured in Indonesia on 1997 and 2008. Then, the results of the crisis happened when the value of smoothed probability was higher than 0.97. The smoothed probability plot can be seen in figure 5 and figure 6. Based on the smoothed probability plot, the smoothed probability value on crisis period was higher than 0.97.   Next, the predicted smoothed probability value was calculated. The comparison between predicted and actual smoothed probability value for testing data of each indicator shown in table 1. It can be concluded that the predicted and actual smoothed probability from each indicator indicated secure condition because the value was less than 0.97. Furthermore, it is computed the forecast value of smoothed probability of each indicator for the next periods as shown in table 2. Based on the forecast value, it can be concluded that the condition will be secure for next periods.

Conclusion
Based on the results and discussion, it can be concluded that combination of volatility and Markov switching models were good for detecting the financial crisis in Indonesia. The best combination model for each indicator was MS-GARCH (2,1,1). Crisis which happened in 1997 and 2008 can be detected well using the real exchange rate indicator, but the M2 / foreign exchange indicator only detected crisis which in the 1997. The real exchange rate indicator gave crisis signs starting in July 1997, while the M2/foreign exchange reserves indicator began to give the crisis signals in September 1997. Based on predicted smoothed probability value of each indicators, it was estimated that there will be no crisis in July 2019 to June 2020. For further analysis, if there is a causality effect between both indicators, then the analysis can be done multivariately.