IRF in a Markov Switching VAR (mean)

Discussion of models with structural breaks or endogenous switching.
MathieuJourjon
Posts: 5
Joined: Sun Sep 17, 2017 10:03 am

IRF in a Markov Switching VAR (mean)

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF in a Markov Switching VAR (mean)

Unread post 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.
MathieuJourjon
Posts: 5
Joined: Sun Sep 17, 2017 10:03 am

Re: IRF in a Markov Switching VAR (mean)

Unread post 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
Attachments
SEPTEMBRE26.RPF
Code
(7.07 KiB) Downloaded 1401 times
DATA FULL 2 (sans erreur).txt
Data
(11.37 KiB) Downloaded 1356 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF in a Markov Switching VAR (mean)

Unread post 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.
MathieuJourjon
Posts: 5
Joined: Sun Sep 17, 2017 10:03 am

Re: IRF in a Markov Switching VAR (mean)

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF in a Markov Switching VAR (mean)

Unread post 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.
MathieuJourjon
Posts: 5
Joined: Sun Sep 17, 2017 10:03 am

Re: IRF in a Markov Switching VAR (mean)

Unread post 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
Attachments
SEPTEMBRE26.RPF
Code
(6.78 KiB) Downloaded 1356 times
DATA FULL 2 (sans erreur).txt
Data
(11.37 KiB) Downloaded 1352 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF in a Markov Switching VAR (mean)

Unread post 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.
MathieuJourjon
Posts: 5
Joined: Sun Sep 17, 2017 10:03 am

Re: IRF in a Markov Switching VAR (mean)

Unread post 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,
Last edited by MathieuJourjon on Sat Oct 14, 2017 11:12 pm, edited 1 time in total.
Post Reply