Hi Dynare experts,

I would like to study the response of a set of variables to a shock (e.g. demand shock) in two regimes:

1) high output volatility,

2) low output volatility.

Could you please tell me if I can do this in Dynare? and how?

Thank you.

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

5 posts
• Page **1** of **1**

Hi Dynare experts,

I would like to study the response of a set of variables to a shock (e.g. demand shock) in two regimes:

1) high output volatility,

2) low output volatility.

Could you please tell me if I can do this in Dynare? and how?

Thank you.

I would like to study the response of a set of variables to a shock (e.g. demand shock) in two regimes:

1) high output volatility,

2) low output volatility.

Could you please tell me if I can do this in Dynare? and how?

Thank you.

- dynare_question
**Posts:**2**Joined:**Fri Jul 07, 2017 4:36 pm

What exactly are you trying to do? Please describe the modeling environment you have in mind. You want a regime-switching DSGE model?

- jpfeifer
**Posts:**6940**Joined:**Sun Feb 21, 2010 4:02 pm**Location:**Cologne, Germany

Dear Johannes,

Thank you for your prompt answer and apologies for being vague on my side.

Yes, the environment is a DSGE model. Let me be more clear: Take for example the baseline RBC model (code on your website): https://github.com/JohannesPfeifer/DSGE ... seline.mod

In this model, there are two shocks: a shocks to TFP and a government spending shock.

What I would like to do is to augment the TFP with a time-varying volatility shock. Then, I can parameterize the shock such that I get regime 1) high time-varying volatility, regime 2) low time-varying volatility. Then, I would like to see how model variables, in particular output, would respond differently to government expenditure shocks in times of high and low volatility.

Would that be feasible? My concern is that it may not be because, according to my understanding, when there are two shocks and we study the responses of variables to the shocks, we get first the responses of variables to one shock while the other one is muted and then the other way around. Am I right?

Would there be any other way to study in this kind of DSGE setup the response of model variables to government spending shocks in times of high versus low output volatility?

Hope this is clear; if not please let me know. I would very much appreciate your help. Thank you.

Thank you for your prompt answer and apologies for being vague on my side.

Yes, the environment is a DSGE model. Let me be more clear: Take for example the baseline RBC model (code on your website): https://github.com/JohannesPfeifer/DSGE ... seline.mod

In this model, there are two shocks: a shocks to TFP and a government spending shock.

What I would like to do is to augment the TFP with a time-varying volatility shock. Then, I can parameterize the shock such that I get regime 1) high time-varying volatility, regime 2) low time-varying volatility. Then, I would like to see how model variables, in particular output, would respond differently to government expenditure shocks in times of high and low volatility.

Would that be feasible? My concern is that it may not be because, according to my understanding, when there are two shocks and we study the responses of variables to the shocks, we get first the responses of variables to one shock while the other one is muted and then the other way around. Am I right?

Would there be any other way to study in this kind of DSGE setup the response of model variables to government spending shocks in times of high versus low output volatility?

Hope this is clear; if not please let me know. I would very much appreciate your help. Thank you.

- dynare_question
**Posts:**2**Joined:**Fri Jul 07, 2017 4:36 pm

So if I understand you would have first to add a third shock on the variance of the innovation of the TFP.

You cannot do that with a first order approximation of the model (as in the example, posted by Johannes, you give as a reference). Even with a second order approximation, we know that the size of the shocks does not affect the slopes of the reduced form (but only the constant), so you would have at least to work with a third order approximation. With a third order approximation the size of the shocks will affect the elasticities.

Your understanding of the IRFs in Dynare is correct. That said, you could implement that by modifying the irf.m Matlab function in Dynare (you would just have to change the call to the simult_ routine). But I do not understand how you model high and low volatility regimes. Is is just a shift on a constant in the equation for the shock on the variance of the TFP? If so, why do you need to add some noise on this shock?

Best,

Stéphane.

You cannot do that with a first order approximation of the model (as in the example, posted by Johannes, you give as a reference). Even with a second order approximation, we know that the size of the shocks does not affect the slopes of the reduced form (but only the constant), so you would have at least to work with a third order approximation. With a third order approximation the size of the shocks will affect the elasticities.

Your understanding of the IRFs in Dynare is correct. That said, you could implement that by modifying the irf.m Matlab function in Dynare (you would just have to change the call to the simult_ routine). But I do not understand how you model high and low volatility regimes. Is is just a shift on a constant in the equation for the shock on the variance of the TFP? If so, why do you need to add some noise on this shock?

Best,

Stéphane.

- StephaneAdjemian
**Posts:**429**Joined:**Wed Jan 05, 2005 4:24 pm**Location:**Paris, France.

Hi,

as Stéphane said, you need to specify the precise experiment you have in mind. Of course, as usual in the literature if you use a stochastic volatility process, you need to approximate the model at third order. In this case, the IRFs are actually Generalized IRFs. Thus, you need to think about both the point in the state-space at which you construct the IRFs as well as the general stochastic properties. If your two regimes are just characterized by a different shock standard deviation for the volatility shock (high vs. low time-varying volatility), then you can just run the mod-file twice for different values of the standard deviation of the volatility shock in the shocks-block. However, I guess what you actually have in mind is having a fixed standard deviation of this volatility shock in both experiments, but looking at the government spending shock IRF for a case where the volatility state is high vs low (i.e. it was preceeded by a high/low volatility shock). In this case, you would need to use the simult_-function to construct the particular simulations. An example for using this function is at https://github.com/JohannesPfeifer/DSGE ... _model.mod. The file at https://sites.google.com/site/pfeiferec ... edirects=0 shows how to compute GIRFs.

as Stéphane said, you need to specify the precise experiment you have in mind. Of course, as usual in the literature if you use a stochastic volatility process, you need to approximate the model at third order. In this case, the IRFs are actually Generalized IRFs. Thus, you need to think about both the point in the state-space at which you construct the IRFs as well as the general stochastic properties. If your two regimes are just characterized by a different shock standard deviation for the volatility shock (high vs. low time-varying volatility), then you can just run the mod-file twice for different values of the standard deviation of the volatility shock in the shocks-block. However, I guess what you actually have in mind is having a fixed standard deviation of this volatility shock in both experiments, but looking at the government spending shock IRF for a case where the volatility state is high vs low (i.e. it was preceeded by a high/low volatility shock). In this case, you would need to use the simult_-function to construct the particular simulations. An example for using this function is at https://github.com/JohannesPfeifer/DSGE ... _model.mod. The file at https://sites.google.com/site/pfeiferec ... edirects=0 shows how to compute GIRFs.

- jpfeifer
**Posts:**6940**Joined:**Sun Feb 21, 2010 4:02 pm**Location:**Cologne, Germany

5 posts
• Page **1** of **1**

Users browsing this forum: No registered users and 11 guests