# N equation and (n-1) endogenous variables with Monetary Policy

Helo Dynare Team,

I was recently working on a simple DSGE model with 12 endogenous variable and 12 equations. This model was working fine on dynare and I was able to test the impact of tfp shocks on this. Next, I wanted to see the implications of monetary policy, so I augmented the model with an interest rate rule and rotemberg type price ridigities in the firm’s problem.

Now, in this new problem, I have one new additional endogenous variable: P_t. (nominal interest rate was already an endogenous variable in the household’s problem)
Yet, I have two new equations: Central bank’s interest rate policy rule as well as the first-order condition from the firm’s price choice.

Hence, as I attempt to solve the model in dynare, it naturally gives me an error of < number of equations is greater than the number of endogenous variables>.

Does this problem arise because I haven’t log linearized the model in a compact format like in many NK model applications? Or am I completely missing the elephant in the room? [I’ve attached my code below]

Many thanks for you time and feedback,
E

RBC_MPShock_steadystate.m (2.2 KB) RBC_MPShock.mod (3.4 KB)

I am not sure I understand. Even in a classical monetary economy, you need to have an interest rate rule or a specification of monetary policy. See https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_2.mod

The reason is that the real side of the economy determines the real variables and monetary policy determines (expected) inflation.

Dear Prof Pfeifer,

Thank you so much for your reply. I already have an equation for the process of the interest rate; where nominal interest rate is a function of inflation and an exogenous shock.

My original problem was “the number of equations being greater than my unknowns”.
I have now re-written the model, where I converted some variables into real terms and re-arranged the way prices appear in the equations. I now have 14 equation and 14 unknowns which I have hoped to deal with the initial problem of “greater number of equations”. However, now my code suggests me that I haven’t defined the wage variable, which is actually defined/referred in the second equation.

Would you have any suggestions on this and how I may solve it?

E

Model1_steadystate.m (2.2 KB) Model1.mod (3.1 KB)

The problem is that you did not define the steady state of w in your steady state file.

I see. Thank you so much for the reply. I’ve added steady state wage to the ss file now and this finally gave me the residuals of the system, which is great! Now, it looks like my simple interest rate rule is not really going well somehow. I have added the steady state interest rate to the ss file and the parameters seems to add up as well.

Does this tell me that I potentially messed up something in my other equations? or is there something genuinely wrong in my interest rate rule?

PS. I also would like to thank you so much Prof Pfeifer, for helping us out with our models in these unconventional times. It feels great to not to be stuck in our models, despite being stuck in homes. Thank you so much!!

Model1_steadystate.m (2.3 KB) Model1.mod (3.1 KB)

Thanks for the kind words. Your interest rate rule should be something along the lines of

``````nint-steady_state(nint) =  phipi*(innf-steady_state(innf)) + si*epsiloni;
``````

The model runs with this.

Thank you so much Prof Pfeifer! I have one more question regarding my code. After your comments, I was able to see that my impulse response functions had these spikes at the first periods and they were switching to ss right after. So, I have made my shock process an AR(1) to deal with that.

However, as I was checking a couple of impulse response options, like choosing order =1 or higher, I have noticed that the signs of my impulse responses keeps switching based on the order choice. For instance, following order =1, the IRF shows that an expansionary monetary policy change leads to a contraction in income, consumption and investment (which looks not so right). Moreover, I see a different picture when I specify alternative orders.

Would you have any lead why I may be looking at this weird dynamics and how to generate the correct dynamics?

With many thanks,
E

Model1_steadystate.m (2.3 KB) Model1.mod (3.4 KB)

Your model seems to feature strong second order effects. That would explain the difference at order 2. Particularly with quadratic adjustment costs that may happen.
What I don’t get is the

Your shock increases the nominal interest rate, which is contractionary.

Thank you so much for the reply. I’ve attached both of my impulse responses below. Even though my shock seems to mathematically increase nominal interest rate, when I plot the nominal interest rate, the shock seems to decrease it. That was why I have interpreted it as expansionary mp. Questions:

i. Is dynare switching signs of my interest rate shock at the background?
ii. To make the figure intuitive, should I instead plot “-nint” and interpret everything as a contractionary mp shocks?

Best regards and many thanks for your help,
E

order1.pdf (5.8 KB) noorder.pdf (5.7 KB)

Maybe

Dear Prof Pfeifer,

Thank you so much for the link. The discussion under the post has really helped.
I believe I need to fine-tune my parameters to minimize the endogenous responses following the initial monetary policy shock. Thank you for that.

In this transition, I also would like to add interest rate persistence to my model. I’m not so sure of why my interest rule now gives a non-zero residual when I change my CB rule from

to

nint = 0.7nint(-1) + phipi(innf-steady_state(innf)) + vv ;

Do you have any insight on this? I’m attaching my mod file below as well.

Model1_steadystate.m (2.3 KB) Model1.mod (3.4 KB)

You still need

i.e.

``````nint -steady_state(nint) = 0.7 *(nint(-1)-steady_state(nint)) + phipi* (innf-steady_state(innf)) + vv ;
``````

Thank you very much, that makes sense!

I have one last question on my impulse responses. Why are they not nicely smooth, but rather have these kinks?

Thank you so much for your help!

Usually that happens if a model does not feature a lot of endogenous persistence.

I see, thank you for the insight. I can not say I have fully fixed the problem, but I discovered that the model (attached below) actually generates smooth impulse responses on capital. This gives me some hope that the adjustment costs in the capital actually does the work in terms of persistence.

But, somehow none of the k’s smooth impulse response impacts the rest of the endogenous variables the same way. Can this be due to how the steady state file is set up?

Many thanks for your time and help on this,

ModelA_steadystate.m (2.3 KB) ModelA.mod (3.7 KB)

No, your steady state looks sensible, as fare as I can see. It is well-known that the standard RBC model does not feature a lot of persistence. If you simulate a mildly persistent TFP shock, only capital will have some persistence, but all other variables return quite quickly to steady state.