Optimal policy_steady state

Dear professor,
I am working on optimal fiscal problem with two tax instruments: consumption tax and capital income tax . with a RBC framework. I successfully run the stochastic version of the model setting the two tax rates as parameters and the steady state solution are quite consistent.
However, when i run the same code with ramsey_model, it can’t find the steady state. I got the error message as follows:
Using 64-bit preprocessor
Starting Dynare (version 4.6.1).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Ramsey Problem: added 11 Multipliers.
Found 11 equation(s).
Found 24 FOC equation(s) for Ramsey Problem.
Evaluating expressions…done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 2).
Computing static model derivatives (order 3).
Processing outputs …
done
Preprocessing completed.

Error using print_info (line 32)
Ramsey: The steady state file does not solve the static first order conditions conditional on the instruments.

Error in stoch_simul (line 103)
print_info(info, options_.noprint, options_);

Error in Benin_opt.driver (line 333)
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list_);

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;
What could be the reason for that?

You most probably did not write a correct steady state file that provides the steady state conditional on the value of the instruments.

Dear Professor,
I do not understand the exact thing to do in this case. I mean writing the steady state conditional on instrument. I wrote the steady state equation in a steady_state_block not in a steadystate.m file separately. So in this case, how should I got about writing the steady state conditional on instruments?

Usually, you set the value of all variables. But now you are not allowed to set the value of the specified instrument. Rather, for any possible value of the instrument given by Dynare, you need to specify the steady state of all other variables.

1 Like

Dear Professor,
I follow the steps as you mentioned by solving the static steady state recursively conditional on instruments and coding the analytical solution in the steady_state_model block. However, it could not find the steady state conditional on instruments though it solved for the steady state when I run the same code considering the instruments ( tax rate) as parameters in the model. I have attached the .mod file.optimal_fiscal.mod (4.2 KB)

Using resid results in

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 1.6746
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : -1.6908
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0

Dear professor,
I have run the same code a got instead something different from yours as follows:
Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : NaN
Equation number 3 : NaN
Equation number 4 : NaN
Equation number 5 : 0
Equation number 6 : NaN
Equation number 7 : -1.6908
Equation number 8 : NaN
Equation number 9 : 0
Equation number 10 : NaN
Equation number 11 : 0
Equation number 12 : NaN
Equation number 13 : NaN.

I tagged the equation to identify without ambiguity the problematic ones but the tags don’t appear with the resid outcome.
My question is how come the outcome sends out more equations than I have in the model block? I tried to understand the reason and why I could not get the respective tags of equations but I could not figure out the reason and nothing about it mentioned in the manual in optimal policy section. I wonder whether Dynare considers the two instruments as equations.
I finally changed the ordering of equations in the model block but the same message comes meaning that the residual problem is not related to a particular equation. I could not understand the reason .

  1. Here, the order matters. I called resid manually in Matlab after the error message.
  2. There are more equations because you are using Ramsey with instruments. There are as many equations as unknowns.

Dear professor,
I still have an important issue which i do not understand with the “resid” command in the .mod file to find out the faulty equation. in your output you sent to me i can see easily that the residuals are 0 for clean equations and non-zero for two. however when i run the same code and type “resid” in Mtalab command windows, I can’t get the same result but I get NaN for some equations, 0 for some and non-zero for others.
What might be the problem? I tried with different versions of Dynare 4.6.1 and ealier version 4.5.7. but still NaN for some equations. is there anything I can do to get 0 and non-zero only when I run the “resid” command?
Thank

As I wrote;

You cannot have it in the mod-file.

1 Like

Dear Professor,
The core of my problem now is that the same .mod file which sent the error message about some equations not having zero residuals under ramsey command runs perfectly when I remove the instrument ( tax rate on consumption and capital income) from var list and introcue them as parameter in the model and fix the corresponding equations accordingly. But with ramsey optimal policy where the two instruments are taken to var list it could not run> After model_diagnostics command, I got the following:
Warning: Some of the parameters have no value (optimal_policy_discount_factor) when using model_diagnostics. If these
parameters are not initialized in a steadystate file or a steady_state_model-block, Dynare may not be able to solve the
model…
Warning: Either you have not correctly initialized planner_discount or you are calling a command like steady or stoch_simul
that is not allowed in the context of ramsey_policy

MODEL_DIAGNOSTICS: The Jacobian of the static model contains Inf or NaN. The problem arises from:

Derivative of Auxiliary Equation 4 with respect to Variable Y (initial value of Y: 2.03204)
Derivative of Auxiliary Equation 2 with respect to Variable C (initial value of C: 0.558887)
Derivative of Auxiliary Equation 10 with respect to Variable C (initial value of C: 0.558887)
Derivative of Auxiliary Equation 12 with respect to Variable C (initial value of C: 0.558887)
Derivative of Auxiliary Equation 13 with respect to Variable C (initial value of C: 0.558887)
Derivative of Auxiliary Equation 4 with respect to Variable K (initial value of K: 4.63789)
Derivative of Auxiliary Equation 4 with respect to Variable L (initial value of L: 1.32834)
Derivative of Auxiliary Equation 4 with respect to Variable Z (initial value of Z: 1)
Derivative of Auxiliary Equation 8 with respect to Variable Z (initial value of Z: 1)
Derivative of Auxiliary Equation 2 with respect to Variable R (initial value of R: 0.148967)
Derivative of Auxiliary Equation 12 with respect to Variable R (initial value of R: 0.148967)
Derivative of Auxiliary Equation 13 with respect to Variable R (initial value of R: 0.148967)
Derivative of Auxiliary Equation 2 with respect to Variable tau_K (initial value of tau_K: 0)
Derivative of Auxiliary Equation 10 with respect to Variable tau_K (initial value of tau_K: 0)
Derivative of Auxiliary Equation 13 with respect to Variable tau_K (initial value of tau_K: 0)
Derivative of Auxiliary Equation 2 with respect to Variable tau_C (initial value of tau_C: 0.18)
Derivative of Auxiliary Equation 10 with respect to Variable tau_C (initial value of tau_C: 0.18)
Derivative of Auxiliary Equation 12 with respect to Variable tau_C (initial value of tau_C: 0.18)
Derivative of Auxiliary Equation 13 with respect to Variable tau_C (initial value of tau_C: 0.18)
Derivative of Auxiliary Equation 2 with respect to Lagrange multiplier of equation 2 (initial value: 0)
Derivative of Auxiliary Equation 10 with respect to Lagrange multiplier of equation 2 (initial value: 0)
Derivative of Auxiliary Equation 12 with respect to Lagrange multiplier of equation 2 (initial value: 0)
Derivative of Auxiliary Equation 13 with respect to Lagrange multiplier of equation 2 (initial value: 0)
Derivative of Auxiliary Equation 4 with respect to Lagrange multiplier of equation 3 (initial value: 0)
Derivative of Auxiliary Equation 8 with respect to Lagrange multiplier of equation 4 (initial value: 0)
Derivative of Auxiliary Equation 4 with respect to Lagrange multiplier of equation 5 (initial value: 0)
Derivative of Auxiliary Equation 6 with respect to Lagrange multiplier of equation 6 (initial value: 0)
Derivative of Auxiliary Equation 3 with respect to Lagrange multiplier of equation 7 (initial value: 0)
Derivative of Auxiliary Equation 4 with respect to Lagrange multiplier of equation 8 (initial value: 0)

MODEL_DIAGNOSTICS: The problem most often occurs, because a variable with
MODEL_DIAGNOSTICS: exponent smaller than 1 has been initialized to 0. Taking the derivative
MODEL_DIAGNOSTICS: and evaluating it at the steady state then results in a division by 0.
MODEL_DIAGNOSTICS: If you are using model-local variables (# operator), check their values as well.

MODEL_DIAGNOSTICS: The Jacobian of the dynamic model contains Inf or NaN. The problem arises from:

Index in position 2 is invalid. Array indices must be positive integers or logical values.

Error in display_problematic_vars_Jacobian (line 67)
if M_.aux_vars(1,problemcol(ii)-M_.orig_endo_nbr).type==6 %Ramsey Lagrange Multiplier

Error in model_diagnostics (line 235)
display_problematic_vars_Jacobian(infrow,infcol,M,dr.ys,‘dynamic’,'MODEL_DIAGNOSTICS: ')

Error in optimal_fiscal_2.driver (line 338)
model_diagnostics(M_,options_,oo_);

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

1 Like

Hi I have the same problem, probably I need to solve the optimal policy manually