# Strange IRFs in my DSGE model

Hello, I have run my mod file nou.mod (5.1 KB) of a DSGE model I’ve built . The steady state results are more or less close to the ones I inserted in the initval block. The variables all return to their steady state after some time. However the IRFs of almost all variables has a lot of spikes for all the shocks I consider, like on thic pic:

It’s not normal isnt’it ? Do you think it comes from a timing problem in my mod file ? Or something else ?

Thank you

Hi,

Your steady-state calculations are wrong for equ.13 and equ.35 (non zero residuals).

The weird shape of your IRFs must come from here.

Best

Thank you for your answer. I suppressed euqation 35 but it’s been several weeks I’m struggling with the euqation 13 (the budget constraint of my consumer). Is it related to some market clearing problem ? Because I played with this budget constraint in all ways but it never reaches 0 residuals.

You have put the wrong value as initial guess in initval. However, since you do not solve your steady-state analyticaly it is hard to find where the mistake lies.
You need to check your steady-state calculations by hand with à pencil in order to find the correct value for equ.13.

I had a quick look on the code. Basicaly, you should be able to define the steady-state value of your impatient household’s consumption with its budget constraint. Then, once you have defined the level of aggregate consumption with the aggregate constraint (Y=C+I+G) you should be able to pin down the steady state consumption of your patient household using equ.35 which defines consumption as a weighted sum of patient and impatient consumption.

Thank you for your answer. I did that but I think that maybe the problem comes from the fact that I choose arbitrary values for debt/GDB and G/GDP at steady state. Let me explain:

At steady state my consumption of the patient holder is this:

iI have chosen debt/GDP=0.358 and G/GDP=0.195 and I have normalized Y=1 at steady state. With the good market equilibrium I would deduct consumption of impatient household since c_patient= Y-c_patient-I-G. But maybe it makes no sense to choose arbitrary values for debt/GDP and G/GDP and this makes my computation wrong.

I have the following fiscal rules for G:

Can I use any value for debt/GDP and G/GDP ? I think the problem comes from here because I did the computation a lot of times to determine consumption at steady state and I can’t find where the error comes from.

Oscillating IRFs are either a timing problem (this happens most of the time) or a matter of problematic parameterizations. The latter happens less often but typically in models with complex feedback rules. In your model, you seem to have such a feedback rule. Have you tried what happens with lump-sum taxation balancing the budget?

Thank you for your answer professor J. Pfeifer. I have tried to do a model with lump sump taxes as you advised. Here is the mod file lump.mod (3.9 KB) and the file I used to compute the steady state Lump_calculs.m (2.0 KB) (you don’t need to run this file to run the mod file).

The steady state result are exactly the one I computed by hands. However I get the following error:

Do you think it comes from a timing problem in my mod file ?

I even tried to estimate the model without any taxes:iako.mod (3.0 KB) . It thus becomes the paper of Iacoviello (2005). Nontheless I still have the same error:

And the model_diagnostics(M_,options_,oo_) command tells:

So I really don’t know what is the problem. I compared my code with the one of Iacoviello and I don’t see huge differences. Here is the Iacoviello codes if you want to compare: execution.m (1.2 KB) Iaco.mod (3.1 KB)

In this case it’s most probably a timing error somewhere which was hidden by a strange fiscal rule that pushed one of the eigenvalues above one, but introduced oscillatory dynamics.

Thank you for your answer professor J. Pfeifer but I’m not sure to understand. Do you mean there is a timing error in my model without taxes ? Or do you mean that there were a timing problem in the model with lump sump taxes ? Or a timing problem in the fiscal rules of my 1st model ?

The model without taxes should be the simplest one and it does not work. The problem should be there. The model with lump sum taxes simply inherits the issue.

Thank you for your answer. Indeed I will have a look at the model without tax again. But do you have an idea on why the rank condition is not satisfied ?

I have changed the monetary policy equation and my model can now be solved.I have put the taylor rule in log and now my IRF looks more convincing:

For those who will have the same problem: instead of writing the taylor rule as follows:
r = ((1/beta_l)-1)^(1-rR)* (r(-1))^(rR)* ((Pi(-1)+1)^(1+rPi)* (Y(-1)/Y)^rY)^(1-rR)* exp(sR* eR) ;
I wrote it as such:
log(r+1) = (1-rhoR)* log(1/beta_l) + rhoR* log(r(-1)+1) + (1-rhoR)* thetap i* log(Pi+1) + sR* eR;