Page 1 of 1

IRF in a Markov Switching VAR (mean)

Posted: Mon Sep 18, 2017 7:51 am
by MathieuJourjon
Hi,

I am working on Impulse Response Function (IRF) on a Markov-Switching Structural Vector model. RATS allows me to estimate my MS-SVAR with mean as a switch using the procedure MSVARSetup. I would like to produce IRF responses in two different regimes. Unfortunately, I just found the work on Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's which just allow changes in coefficient and/or variance.

I do not know if there is the option to estimate IRF in different regimes allowing mean to change.

Thank you :) ,

Mathieu

Re: IRF in a Markov Switching VAR (mean)

Posted: Mon Sep 18, 2017 11:54 am
by TomDoan
The treatment of the deterministic variables has no effect on how the IRF's work (IRF's depend only upon the lag coefficients and the covariance matrices). If you use @MSVARSETUP rather than @MSSYSREGRESSION, then you use @MSVARSETMODEL rather than @MSSYSREGSETMODEL to pull out the regime-specific model.

Re: IRF in a Markov Switching VAR (mean)

Posted: Tue Sep 26, 2017 11:18 pm
by MathieuJourjon
Thank you. I have followed your instructions and understand them. I posted the code which is working for one variable.

I tried to use more than one variable in the Markov-switching model to estimate and then draw IRF responses. Unfortunately, it does not work properly. I got this message:

## MAT6. Trying to Store 5 x 2 Matrix Into VECTOR
The Error Occurred At Location 679, Line 46 of MSVARMUCMOM

More precisely, I used the variable GDP (from Canada) and EPUU (Economic Policy Uncertainty of United States) and the code does not work. Do you know what I could change?

Thank you!

Mathieu

Re: IRF in a Markov Switching VAR (mean)

Posted: Wed Sep 27, 2017 10:59 am
by TomDoan
It works fine for me, so you may have an out-of-date @MSVARSETUP. However, I'm not sure what you're expecting out of this. Your estimating the model with fixed AR coefficients, so the IRF's will be identical. Not only that, because it's an AR on the growth rate, they're identical and collapse to zero after just a few periods.

Re: IRF in a Markov Switching VAR (mean)

Posted: Wed Sep 27, 2017 12:38 pm
by MathieuJourjon
Hi,

The idea is to estimate a Markov switching VAR with a variable which captures the effect of uncertainty (EPUU) and the GDP of Canada. How uncertainty can impact the Canadian economy? After, I want to draw IRF responses from the estimation to see the different impact of uncertainty in different regimes. The VAR will be VAR(EPUU,GDP). The code I posted above works when the model is with AR coefficients. But when I want to estimate a VAR, it does not work.

I am not sure what I should change?

PS: EPUU = Economic Policy Uncertainty Index (similar to the VIX) and GDP = Canadian GDP

Thank you,

Mathieu

Re: IRF in a Markov Switching VAR (mean)

Posted: Wed Sep 27, 2017 1:40 pm
by TomDoan
It would help to see the program that doesn't work. Offhand, it sounds like you haven't properly adapted the dimensions of the priors to the bigger model.

Again, however, note that if you just switch the means, the IRF's will be identical.

And before you get too heavily into this, why do you think that a MS model will be appropriate for this? Do you get a reasonable set of estimates when you just do the point estimates? It's quite possible that the maximum likelihood switching model looks nothing at all like what you want.

Re: IRF in a Markov Switching VAR (mean)

Posted: Thu Sep 28, 2017 5:31 pm
by MathieuJourjon
Hi,

In the attached documents you will find the code that doesn't work.

I already estimate the model with a VAR. I am using a MS model to be able to capture the different behavior between periods of time of high uncertainty and low uncertainty in the Canadian. I am searching for IRF in different regimes. I use the switch mean as an example. I would like to be able to switch C, CH, M, I, MH and observe the different behavior. Here in the code, I just put 2 variables but I am planning to add more.

I want to replicate something close to that: http://www.cepii.fr/PDF_PUB/wp/2016/wp2016-19.pdf

Not the DSGE but the Regime-dependent dynamic effects of uncertainty shocks and IRF.

Thank you

Re: IRF in a Markov Switching VAR (mean)

Posted: Thu Sep 28, 2017 10:12 pm
by TomDoan
Uncertainty would not be handled by switching the mean (at all)---that would be switching variance or switching coefficients and variance, which is what Ehrmann, Ellison and Valla do.

Re: IRF in a Markov Switching VAR (mean)

Posted: Wed Oct 11, 2017 9:12 pm
by MathieuJourjon
Thank you for answering. I have given some thought about your last answers.

1. Ehrmann et al (2003) assume in their regime-dependent impulse response that the system is in a certain state and stayed in this regime over the propagation of the shock. Is it possible to code impulse response that allowed agents to be aware of the possibility of regime changes and they form expectation accordingly (see Regime Switches, Agents Beliefs, and Post-World War II U.S. Macroeconomic Dynamics, Francesco Bianchi). I would like to compare impulse response in both methodologies.

2. Finally, my last questions refer to previous questions. I understand that Ehrmann et al (2003) allowed for coefficient and variance (CH) and coefficient (C) only (but it does not work for me). But it's reasonable to think that a MS-VAR (Uncertainty, GDP) could be handled by switching the mean and the variance (MH)?

Thank you,