Interest rate target in NK model

Hi every one

I would like to know how to deal with an inflation target in the NK model. I tried to fix a 2% interest rate target in the form of trend interest as in the code proposed by @jpfeifer

The model is in inflations rate but as soon as I fix the target to 2 instead of 0 the model crash in the steady state.
Any idea on what am I doing wrong here?


testinf1.mod (14.4 KB)

If I have understood correctly, you want a model with an inflation target different from 0. First, notice that your pi_bar is 2, meaning that the inflation target is 200% quarterly! If you want to set an annual 2% inflation target, you should have pi_bar=0.005, if your model is quarterly.

Now, if you want to change the inflation target you should change also the specification of the Phillips Curves and the definition of price dispersion/market clearing (depending on which framework you are using, Calvo or Rotemberg). Otherwise, price adjustment costs are not zero in the steady state (if you use Rotemberg) or price dispersion is not 1 (if you use Calvo). And that’s why the steady state is not longer correct. For instance, in the Rotemberg case, the market clearing condition should be written as follows:


Thank you for your answer @valerio88

I will try your suggestion and let you know

@valerio88 is correct. The Ascari/Sbordone paper is about having trend inflation without the presence of full indexing so that price adjustment costs in steady state are non-zero. You need to decide what you want to do.

Hi dear @jpfeifer, @valerio88

Thank you for the reply.
Yes I understand for the different steady state. And that’s definitely what I want to do. That’s why I added some changes to the steady state part of the model.
I carefully read the paper and checked back the code you proposed. From the suggestion of @valerio88 I compared my model equations with those in Ascari to check for a way to modify the equations he mentioned in his reply. But apart the indexation part in some equations which play no role here due to Var_rho=0 the equations are mainly the same. I figured out that I might have some missing equtions and mistakes in my steady state part. Correct me if I’m wrong.

Thank you

Please send us the code.

This my code. I need to plug and test new steady state it seems
testinf1.mod (14.6 KB)

This Ascari code from johannes

ascari.mod (25.6 KB)

Dear anifab,
there are still some mistakes. The Rotemberg PC should be:

pi*(pi-pi_tar) = 1/psi*(epsilonMC+1-epsilon)+bettaC(+1)^(-siggma)/C^(-siggma)Y(+1)/Y(pi(+1)-pi_tar)*(pi(+1));

The steady-state value of nominal interest rate changes if pi_tar is not 0, hence also the Taylor rule changes. IF you are interested in a steady-state with inflation equal to the target, then in steady state:


I think also the Calvo block needs some changes, given that I do not see pi_tar there.

Hi dear @valerio88,

As I clearly understand (after some tests) the approach you suggest me was suppose to yield the the same steady state as in 0 inflation setup for price dispersion (V=1) and price adjustment costs (=0)?

Finally I corrected the steady state and the Taylor rule in the different set up so that price adjustment costs and price dispersion in steady state are different from 1 and non-zero. The model run in Calvo setup but with the Rotemberg set up I still have trouble although I also corrected the steady state. the problem comes from:

Equation number 11 : 0.0010362 : Definition marginal cost.

Can you take a look please?

I also have 2 questions regarding all this:
1-What is the difference or the best set up for inflation target between the approach you proposed were the steady state price dispersion is 1 and adj. cost = 0 and the trend inflation with a different steady state?

2-Is it because of the change in steady state nominal interest rate that we have to write the Taylor rule in this form for the model to run?

Thank you

testinf1.mod (15.3 KB)

Dear anifab,
the answer to question 1 is that it depends on what your goal is. If you want to study a model where average inflation is sistematically different from the target, then you should have price adjustment costs/price dispersion in steady state. If instead you are interested in welfare or IRF implications of having different targets, then you should have no dispersion/adjustment costs in steady state. It all depends on the research question you want to answer.

If you go for the second approach, then you should write the Taylor rule and Rotemberg PC as I suggested. And in steady state MC=(epsilon-1)/epsilon. If you go for the first approach, you have two options:

a) You find a closed form solution for the steady state and give it to Dynare, using the command steady_state_model; This is my favourite option.

b) You give to Dynare an initial guess for the steady state, using the command initval.

What you are currently doing is to use the command “steady_state_model” without having a steady-state solution for the Rotemberg case: if you do not have the exact steady state, you cannot use steady_state_model;

The answer to question 2. Normally the Taylor rule is written like this:


where pi_tar coincides with the steady state and R_tar coincides with the steady state nominal rate. The steady-state nominal rate will be always equal to steady-state gross inflation divided by the discount factor. But if you want a model with inflation different from the target in steady state, then also R will be different from the central-bank target: again, you need to find an analytical solution of the steady-state problem.

Thank you for the clear answers they are very helpful. For Rotemberg I computed analytically the whole steady state as for Calvo and used the steady_state_model command. I will check again the equations I have.

Hi dear @valerio88

I am still struggling with the steady state of the Rotemberg model. I solved and double checked many time all the steady state equations yet it’s still not working. The wedge comes from the link between real rate w and marginal cost MC equations I’am using to solve for steady state work N and the steady state MC solved from the NKPC. Is there something missing from these equations?

Dear anifab18,
pleans send us your code and tell us if in your model adjustment costs are 0 in ss or not.

testinf1.mod (16.1 KB)

I’am using the approach where the SS adjustment cost are different from 0 as well price dispersion different from 1 in Calvo.

Thank you

Dear anifab18,
your equations seem ok, so the problem should be in the ss computation. I think in the ss of N adjustment costs should show up in the denominator: you compute the ss of N using the labor supply condition and replacing C with the market clearing condition (where psi shows up). Redo the algebra with a linear production function (alpha=0) and then implement it in Dynare. The Math will become easier and you will be able to spot the mistake.

Hi dear @valerio88
Thank you everything’s ok now. You were right I missed this one. Sorry for waisting your time on such a little matter.

No problem, this is the aim of the Forum I guess!

Hi dear @valerio88

First thank you for your help it is very appreciate. I have 2 questions again

1- When running a simulation, the simulated path of the shocks are not the same through the different order and specification (Calvo-Rot). But I would like to compare the simulated path of the endogenous variables of the model in all specification and order in response to the same path of shocks before moving forward in my work. Does it make any sense to generate from a normal distribution only one simulated shocks through the simulation periods and use them for the simulation?

2- I used simult_ command to for a test. It’s working but I would like to know if it’s the good approach?

initial_condition_states = repmat(oo_.dr.ys,1,M_.maximum_lag)

shock_matrix= zeros(options_.periods,M_.exo_nbr);


y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,1);

Thank you

  1. How did you notice that and how did you generate the simulations? Did you set a seed?
  2. Yes, I would use the simult_-function as it allows you to control the exact shock paths.

Hi professor @jpfeifer

1-For the same period for exemple in Calvo and Rotemberg and for the 3 different order the value of the simulated shock are different. I generated the simulation with stoch_simul, but I did not set a seed. from what I found in the forum it seems that we get different results across different dynare run with the seed (correct me if i’am wrong). But I would like to have the same shocks path wether I use different specification and order that’s why I went directly for simult_-function.

2-ok thank you. I tried it using the same shock matrix across the different model specification and order and it worked. But i’am still wondering if it is the good way to compare the two models across periods? from what I understood, I guess it is normal to have different simulated path for the shocks because it is different specifications and order (considering the that the shocks after the first period exogenous implementation are endogenous response of the model depending on the path of real variables, or is it just still different random exogenous shocks implemented each period?)

Thank you

The main mod-file is testinf2

testinf2.mod (17.8 KB)
simul1.mod (4.3 KB)
simul2.mod (2.1 KB)
simul3.mod (2.2 KB)