Hi, running the attached mod.file results in the following errors:

Error using dynare_solve (line 60)
An element of the Jacobian is not finite or NaN

[ys,check] = dynare_solve([M.fname
’_static’],…

Error in shock1 (line 154)

Error in dynare (line 180)
evalin(‘base’,fname) ;

There is clearly a problem in computing the steady state. I only wrote the initial conditions for exogenous variables (deterministic setup). Do you have any suggestion to fix these problems ?

[quote]STEADY: The Jacobian contains Inf or NaN. The problem arises from:

Derivative of Equation 1 with respect to Variable gdp (initial value of gdp: 0)

STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.[/quote]

Put gdp=1 into initval.

New problems:

Error using print_info (line 74)
Impossible to find the steady state. Either the
model doesn’t have a steady state, there are an
infinity of steady states, or the guess values
are too far from the solution

print_info(info,options_.noprint, options_);

Error in shock1 (line 155)

Error in dynare (line 180)
evalin(‘base’,fname) ;

I forgot to say that gdp_ss=1 is not the true value of gdp at the steady state. I have not yet computed the steady states, but putting gdp_ss=1 eliminates log(gdp). I wanted to check if the syntax was correct and then proceed to the computation of the steady states in a separate file.

But the new message is a problem you have to solve. Provide an analytical steady state of better starting values. Also, make sure your equations are correct.

I’m not succeeding at finding the steady states. In the model, there are 7 equations in 7 variables but computing the deterministic steady states results in more equations than variables. How is it possible ? Is there anything else I can do to compute them?

I meant more variables than equations.

What do you mean? If the dynamic model has as many equations as unknowns, the same is true for the static model.

I don’t know what’s wrong in the computations. The value of the exogenous variables z,d and eta is fixed. gdp_hat becomes equal to 0 at the steady state and simplifiyng I get one equation for gdp_ss as a function of h_ss and pi_ss, another equation for h_ss as a function of pi_ss and R_ss and another for R_ss as a function of pi_ss. So there is one equation missing, but I cannot find it!!

You seem to be confusing something. gdp_ss is a parameter that is extraneous to your model and can not be endogenously determined.

Yes, I’m confusing something. I fixed gdp_ss equal to 1 before and that produced an error. You told me to put gdp=1 in initval and that resulted again in an error:
Error using print_info (line 74)
Impossible to find the steady state. Either the
model doesn’t have a steady state, there are an
infinity of steady states, or the guess values
are too far from the solution

Should I compute the exact steady states, fixing gdp_ss to, say, 1 and then writing the values of pi, h and R in initval ?

So, I computed the steady states with fsolve, putting an arbitrary value for gdp_ss. Then I wrote the obtained values in initval, but the problem of steady states persists.
Error using print_info (line 74)
Impossible to find the steady state. Either the
model doesn’t have a steady state, there are an
infinity of steady states, or the guess values
are too far from the solution

print_info(info,options_.noprint, options_);

Error in shock1 (line 158)

Error in dynare (line 180)
evalin(‘base’,fname) ;

What should I do ?

You are the model builder. You need to sit down and think about what are the endogenous variables and what are parameters fixed outside of the model. Currently, you seem to be mixing the two. There is only one correct way. If you fix a value for gdp_ss and “compute the steady state with fsolve” and these values are not a steady state for Dynare, either your previous computations are wrong or the equations you entered into Dynare.

What do you mean exactly by “mixing the two”? If gdp_ss, as you said, cannot be endogenously determined I have to fix a value. Then I compute the steady states for the exogenous variables h, pi and R and write the obtained values in initval. Is this the correct procedure ?

I don’t know your model, so I am mostly guessing here. But it seems you have a case where you moved from a non-linear model, where gdp is a variable endogenously determined to a linearized version where gdp_ss becomes a parameter (which typically depends on the other deep parameters of the model). In the process, the variable gdp is redefined.

If you are able to compute the steady state for all variables conditional on the parameters, including gdp_ss, you should write this analytical solution into a steady_state_model block. If you can only do this numerically, use the initval block. My comment about consistency of these values with the model equations stays the same.

Actually there is no linearized equation. gdp is defined as gdp=(1-k)zh, where z=1, k=(gamma/2)*pi^2. When computing the steady states, I have one equation for h_ss, one for R_ss and one for gdp_ss. It doesn’t look like gdp_ss is redefined in the process, but maybe I have not understood what you really mean. Moreover, solving the nonlinear system with fsolve results in three complex roots for the steady states, even if I change the starting guess values.

Why do you have an equation for gdp_ss if it is a parameter?

Maybe I am confusing something. If you want to take a look, the reference paper is “Small and orthodox fiscal multipliers at the ZLB” by Braun, Koerber and Waki (2013). At page 6 and 7 you can find the Taylor rule, the process for gdp and the definition of resource cost of price adjustment, k; at page 8 the AS and AD schedules. These are the equations I wrote in the model block and from which I am trying to compute the steady states.

gdp_ss is definitely not a parameter, but a function of h_ss and pi_ss, that I fix equal to 0.02, the target rate implicitly assumed by the Taylor rule. So I computed the steady state values with an external Matlab program and I copied the resulting values in the initval-block. However the problem persists and I really don’t know what’s wrong, since the equations of the model are correct.

gdp_ss really is the steady state associated with the variable gdp. You can use the steady_state operator for this:

```gdp_hat=log(gdp)-log(steady_state(gdp)); ```
Moreover, in New Keynesian models, the inflation rate is not endogenously determined but fixed to a particular value by the montary policy rule that sets the nominal interest rate. You need to set the monetary policy rule and the Euler equation in a consistent way to set target inflation to the desired level. Currently, you fix r_e to 1/beta, the real interest rate, implying that steady state inflation must be 0.

See the attached mod-file
shock1.mod (899 Bytes)