A Markov Switching VECM Model for Russian Real GDP, Real Exchange Rate and Oil Prices

This paper considers an application of the Markov switching vector error correction model to the analysis of the long-run and the short-run dependence of Russian real GDP and real exchange on oil prices. An algorithm for estimation of the model with a priori information on a state of hidden Markov chain in some periods of time is provided. It is shown that for the period of 1999-2018 two different regimes are well defined: with a slow adjustment of real exchange rate and a sharp reaction of GDP in response to oil price shock and with a fast adjustment of real exchange rate and a slow adjustment of GDP in response to shock. We have concluded that floating ruble exchange rate is a natural stabilizer of the Russian economic activity.

If oil prices rise, even if the physical volume of export remains unchanged, domestic economic agents can buy more imported goods, thereby consumption and investment increases. In the case of oil prices decrease, the opposite effect will be observed: a decline in real GDI and in the amount of resources that can be directed to consumption and investment. In papers (Esfahani et al., 2014;Idrisov et al., 2015) capital accumulation is singled out as a key channel for the oil prices influence, or in the broader sense of the terms of trade, on real GDP in This Journal is licensed under a Creative Commons Attribution 4.0 International License the long run, since capital is a factor of production and with its increase the production curve shifts to the right. In response to long-term trade conditions improvement the real exchange rate should strengthen to ensure external and internal equilibrium (Edwards, 1988): To increase the share of import goods in the basket of domestic consumption, the relative prices of domestic goods should rise.
In the short-term period, the dependence of output on oil prices could be determined by Keynesian mechanisms. It could depend on the level of demand for domestic products, which depends on the level of aggregated demand and relative prices, and the real exchange rate. The dynamics of relative prices in the short term is basically determined by the monetary policy regime. If the Bank of Russia prevents the strengthening of the nominal exchange rate while oil prices rise, then the real exchange rate adjustment to the long-term equilibrium will occur due to an increase in domestic prices. The higher the price rigidity, the longer the real exchange rate may be lower than its longterm equilibrium. This will lead to increased demand for domestic goods, which can lead to a significant overheating of the economy in the short-term period. With a flexible nominal exchange rate, real exchange rate appreciation can occur instantly while oil prices rise due to the nominal exchange rate appreciation. Thus, with a flexible exchange rate, real GDP should have a weaker reaction to oil shocks. These theoretical considerations have been repeatedly discussed in the literature (Broda, 2004;Devereux et al., 2006;Edwards and Yeyati, 2005;Gertler et al., 2007).
At the end of 2014, the Bank of Russia moved from manageable exchange rate regime to a floating exchange rate, which can be considered as an element of macroeconomic policy stabilizing economic activity. During the crisis of 2014-2015 there was a milder drop in real GDP (−2.8%) than during the 2008-2009 crisis (−7.8%). However, after the introduction of the new fiscal policy rule in February 2017, the dependence of the real exchange rate on oil prices in the short term again weakened, which was confirmed in the work (Polbin et al., 2019b) based on a model with Markov switching regimes for real exchange rate.
Thus, a key feature of Russian macroeconomic indicators dynamics is the intensification of structural changes and the change of regimes in economic policy. This actualizes the construction of models with time-varying parameters. In this paper, an attempt is made to develop an error correction model for real GDP, real exchange rate and real oil prices with Markov switching regimes. Based on the developed model, we show that two regimes are identified in the dynamics of Russian macroeconomic indicators: rapid and slow adjustment of the real exchange rate to long-term equilibrium. In the inflexible exchange rate regime, the effect of overshooting is observed for GDP: In response to rising oil prices output in the medium term is above its long-term equilibrium level. The proposed model is a natural combination of our previous models. In (Polbin, 2017a) an error correction model was proposed for the real effective ruble exchange rate with a structural break in 2014, and in (Fokin and Polbin, 2019) ARX and error correction models for GDP were proposed with a structural break in 2014. In (Polbin et al., 2019b), an error correction model with Markov switching for the real effective ruble exchange rate was proposed. When constructing a vector error correction model in this paper, along with Markov switching in the regimes, we take into account the presence of a structural break in the long-term growth rates of the real GDP of the Russian Federation, the hypothesis of which was tested in (Polbin and Skrobotov, 2016). When constructing the model, we also introduce a priori information that during the crisis of 2008-2009 the system was in an inflexible exchange rate regime, which introduces an element of the methodological novelty of the present study. Such an a priori assumption is introduced since at this period the exchange rate regime is quite difficult to qualify using purely econometric methods. On the one hand, during the crisis of 2008-2009 the reaction of the exchange rate was stronger than in previous years, when the Bank of Russia actually fixed the nominal exchange rate of the ruble to the dollar-euro basket. On the other hand, the reaction of the real exchange rate was much less than the reaction in the flexible exchange rate regime: at that time, the Bank of Russia carried out a controlled soft depreciation of the national currency, selling foreign exchange reserves. According to the expert community, such a policy has exacerbated the recession in the Russian economy. In this regard, we decided to introduce a priori information that during the crisis of 2008-2009 the system was in an inflexible regime. The work is structured as follows. The second section describes the research methodology and specification of an econometric model for Russia's real GDP, Russia's real effective exchange rate, and oil prices. The third section presents the results of an econometric analysis. In the last section the main conclusions of the work are presented.

RESEARCH METHODOLOGY AND SPECIFICATION OF AN ECONOMETRIC MODEL
Markov regime switching models were introduced in papers ( Baum and Petrie, 1966;Baum et al., 1970) and 1 st time were applied in economics by Hamilton (1989) for USA business cycles analysis. The quarterly data of real GNP growth y t for the period 1952-1984 was modeled by autoregression equation with Markov drift: where ε i -standard gaussian random variable, s(t) -binary variable describing the state of hidden Markov chain with transitional probabilities p P s t j s t i ij ( ( ) | ( ) ) 1 ; i j , , ^0 1 . Parameters estimation using maximum likelihood technique showed that μ 0 > 0, μ 1 > 0, and the both regimes are stable, so the US economy can be represented as a sequence of growths and recessions. Asymmetry and heavy tails of GNP are also explained by this model. Model identified regimes in the past which coincide with the phases of business cycle determined by the National Bureau of Economic Research (NBER) dealing with business cycles.
The initial Hamilton methodology has a lot of modifications. For example, in papers (Diebold et al., 1994;Filardo, 1994) Markov regime switching models with transition probabilities depending on time and/or other factors were considered. Markov switching model for vector autoregression and vector error correction model are considered in (Krolzig, 1997(Krolzig, , 1999, applications to ARCH and GARCH are considered in (Hamilton and Lin, 1996;Dueker, 1997). Various modifications of Markov switching models are successfully used to analyze national and global business cycles, stock returns and risk indicators, interest rates, inflation and other macroeconomic and financial indicators, see, for example, (Garcia and Perron, 1996;Kim and Nelson, 1998;Krolzig and Toro, 2005).
Empirical analysis is based on quarterly data from the 1 st Q 1999 till 4 th Q 2018. The beginning of data is taken after transformation downturn period of Russian economy. The end of data is taken at the time when the approach of hidden Markov chain with predetermined states was developed. The following time series are used: In(rer 1 ) -natural logarithm of Russian real effective exchange rate (Source: International Financial Statistics (IFS)), In(GDP 1 ) -natural logarithm of Russian seasonally adjusted real GDP (ARIMAX12 is used to subtract seasonal component from the series in EViews statistical package), In(poil 1 ) -natural logarithm of real Brent oil price (nominal Brent oil price is deflated using seasonally adjusted USA CPI index (Source: Federal Reserve Economic Data)).
The time series used are shown in a Figure 1. As shown in the figure, GDP and the real effective exchange rate have a clear collinear movement with oil prices. It can be seen that the longrun growth rate of GDP decreased after 2008 economic crisis. It should also be noted that the real exchange rate demonstrates a time-varying sensitivity to changes in oil prices. In particular, before the crisis of 2008, the exchange rate very slowly adjusted to oil price shocks, during the crisis of 2014 the reaction of the exchange rate was the most rapid.
We assume that there are two cointegration equations in our system with three variables. The first one describes long-run dependence of the Russian GDP on oil prices. Following (Polbin and Skrobotov, 2016;Kurozumi and Skrobotov, 2018) we introduce into a cointegration equation a linear trend with structural break to account for observed slowdown in economic growth: where u t -dummy variable, which shows the structural break in average GDP growth: The second cointegration equation describes dependence of real effective exchange rate rer t on oil prices: Other studies include in the regression equation other popular determinants of real exchange rates, for example, net foreign assets (Bleaney and Tian, 2014), share of government spending in GDP (Froot and Rogoff, 1991) and some proxies for productivity differential (Gurvich et al., 2008). But in case of Russia these determinants of real effective exchange rate are potentially highly dependent on oil prices too. In this situation, we decided to use the simplest specification with oil prices as the only long-run determinant of the real ruble effective exchange rate. In papers (Polbin, 2017a;Polbin et al., 2019b) we showed that hypothesis of cointegration absence between these two variables is rejected.
The short run dynamics of the system is modelled by the following Markov switching error correction model: Consequently, the corresponding logarithmic likelihood function has the following form:

Estimation of the model parameters θ is used via logarithmic likelihood function maximization. To find maximum we use
Broyden-Fletcher-Goldfarb-Shann (BFGS), its modification L-BFGS-B (Zhu et al., 1997) and Nelder-Mead method (Nelder and Mead, 1965). At the first step we use L-BFGS-B with random starting values in the set with boundary conditions, then we use Nelder-Mead method to restrict area of global maximum search even further. To find the global maximum we use more precise BFGS algorithm. When maximizing, we go over discrete values of T 1 through the period from 3 rd Q 2006 till 1 st Q 2010.

RESULTS OF AN ECONOMETRIC ANALYSIS
After preliminary calculations, as well as in the presence of a small number of observations and a large number of parameters, we settled on the following reduced econometric specification:  In Table 1 the estimates of parameters of the model considered above are presented.
The following characteristic features of the modes can be distinguished. First, in mode 0, the volatility of error in the real exchange rate equation is higher than in mode 1, and in mode 1, the volatility of error in the GDP equation is higher than in mode 0 (mode 1 is an exchange rate targeting regime, mode 0 is an inflation targeting, that helps stabilize GDP variation). Secondly, in both modes, the coefficients in the terms of error correction are of high significance, negative and <1 by module, which indicates convergence of the exchange rate and GDP to their equilibrium. The mean reversion rates in modes 0 and 1 are very different from each other. The values of the correction coefficients show that in order for the deviation of the real exchange rate from the equilibrium value to decrease 2 times, in mode 0 it will only take about 1 quarter, while in mode 1 it will take more than 1 year. The values of the correction coefficients show that in order for the deviation of GDP from the equilibrium value to decrease 2 times, in mode 1 <1 quarter, while in mode 1 it will take more than half a year. This result will be clearly demonstrated while building impulse responses of the real exchange rate and GDP in response to oil price shocks. Cross parameters of error correction are insignificant (there is no reversion on other cointegration equation, the change in exchange rate does not depend on changes in GDP). However, GDP and real exchange rate are tied by the same hidden Markov chain.
Since in mode 1 the coefficient of the difference in oil prices for real exchange rate was insignificant and in mode 0 the coefficient of the lag difference in GDP for GDP was also insignificant, it was decided to evaluate model with the restriction on the equality of some coefficients to zero. The evaluation results are given in Table 2 (AIC criterion gives better result than for model in Table 1). As for the parameters depending on the mode in Table 2, for each of them the estimate in mode 0 differs significantly from the estimate in mode 1. The significance of these differences is confirmed by Wald's tests for the equality of the corresponding coefficients in different modes. Correlation between residuals of GDP and real exchange rate is also set to 0 because this parameter was insignificant in the previous experiment.
Cointegration equation of GDP has the following form: Where estimated parameters are as follows: As it is easily seen from Figure 2 log-likelihood gives the best result for time switching of average GDP growth in 1st Q 2007.
show that both regimes are very stable. At Figure 3 we represent the graphs of filtered probability P s i I t t | and smoothed probability P s i I t T | . It is easily seen that the same regimes can be  0 5. It can be seen that mode 1 was observed mainly during periods when the ruble nominal exchange rate is managed by foreign exchange interventions. The real exchange rate was adapted to its longterm equilibrium to a greater extent due to changes in prices for domestic goods and services. The interval of mode 0 prevailing (1 st Q 2013 -3 d Q 2017) coincide with periods of high nominal exchange rate volatility. It is interesting to note that, despite the transition of the Bank of Russia in November 2014 to a floating nominal exchange rate, the state of inflexible exchange rate formation is identified in recent years (mode 1). This fact can be explained by the features of fiscal policy and new budget rule. Since February 2017, the Ministry of Finance of Russia began operations on a monthly basis to purchase foreign currency in the amount exceeding the actual oil and gas revenues over the level, formed at Urals oil price of 40 $ per barrel.
To show differences in the convergence of the real exchange rate and GDP to the equilibrium one in different modes, impulse responses of the real exchange rate and GDP to the shock of oil prices are constructed. It is assumed that at time 0 the system is in long-term equilibrium, and at time 1 there is an unexpected permanent increase in oil prices by 10%. The impulse response functions, showing the dynamics of real exchange rate and GDP to a new equilibrium with a higher level of oil prices, are presented in Figure 4. Here the dashed lines are the boundaries of the 95% confidence interval. The time period axis corresponds to one quarter. The ordinate axis represents the percentage change of real ruble exchange rate and GDP due to 10% oil price increase. When constructing the impulse response, it was assumed that the modes on the response horizon are unchanged, which corresponds to the task of analyzing the dynamic characteristics of the system in each mode.
As it can be seen in Figure 4 in mode 0 Russian real exchange rate immediately reacts sharply to oil shock due to the rapid change in the nominal exchange rate and Russian GDP reacts slowly to oil shock. In this mode overshooting is observed for real exchange rate: in response to a positive shock in oil prices, the real exchange rate appreciates too much compared to the long-term level, and in response to a negative shock, excessive devaluation occurs. Further, the real exchange rate quickly approaches its long-term equilibrium. In mode 1 reaction of Russian real exchange rate is due to mechanism of error correction however GDP is falling down immediately in response to a negative shock as in 2008. So GDP and real exchange rate have the different behavior in different modes.
Calculations above are based on hypothesis that the long-term parameters for real exchange rate and GDP cointegration equations