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]
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?
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!!
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?
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?
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
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?
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.