Page 1 of 1

use ramsey to solve for optimal transition path

PostPosted: Thu Oct 31, 2013 5:44 pm
by anitazhang
Dear all,

Thank you for help in advance! I really appreciate it.

I'd like to use ramsey function to solve for an optimal transition path from one steady state to another. Specifically, I use the RBC model provided by dynare, 'ramst.mod', extended to allow for a tax parameter "x". The after-tax production function is 'aa*x*k(-1)^alph'. I also assume there is a quadratic tax adjustment cost: 'psi*(x-x(-1))^2'.

I want to solve for an optimal path for x from x=0.8 to 0.9. This requires x should not be higher than 0.9. This policy constraint is imposed by assuming a very large resource cost if x>0.9: '(x>0.9)*10000'.

However, when I use 'ramsey' to solve for the problem. Dynare gives the error:
Code: Select all
Reference to non-existent field 'maximum_exo_lag'.

Error in check_model (line 22)
xlen = M_.maximum_exo_lag+M_.maximum_exo_lead + 1;

Error in stoch_simul (line 63)
check_model;

Error in ramsey_policy (line 25)
info = stoch_simul(var_list);

Error in ramsey_transition (line 121)
ramsey_policy(var_list_);

Error in dynare (line 120)
evalin('base',fname) ;


I attached the codes. can any one please take a look and let me know if anything goes wrong.

Thank you for your time in advance.

Re: use ramsey to solve for optimal transition path

PostPosted: Fri Nov 01, 2013 8:56 am
by jpfeifer
You model does not feature any exogenous variables to which the transition could happen. I think that x should be a var_exo.

Re: use ramsey to solve for optimal transition path

PostPosted: Wed Nov 06, 2013 3:07 am
by anitazhang
Sorry for the confusion. I set 'x' as an endogenous variable because it has to be optimally choosed to maximize the utility. I wonder if it is exogenous, can I still use it as an instrument in the 'ramsey'?

Re: use ramsey to solve for optimal transition path

PostPosted: Wed Nov 06, 2013 7:26 pm
by jpfeifer
Forget what I said. There was a bug in Dynare 4.3.3. Please try again with tomorrow's unstable version.

Re: use ramsey to solve for optimal transition path

PostPosted: Fri Nov 08, 2013 1:38 am
by anitazhang
I try with both 2013/11/6's and 2013/11/7's unstable version. Both versions give the following error:

Code: Select all
Error using print_info (line 51)
The Jacobian matrix evaluated at the steady state
contains elements that are not real or are infinite

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

Error in ramsey_policy (line 25)
info = stoch_simul(var_list);

Error in ramsey_transition (line 125)
ramsey_policy(var_list_);

Error in dynare (line 147)
evalin('base',fname) ;


jpfeifer wrote:Forget what I said. There was a bug in Dynare 4.3.3. Please try again with tomorrow's unstable version.

Re: use ramsey to solve for optimal transition path

PostPosted: Fri Nov 08, 2013 9:24 am
by jpfeifer
I was referring to the fact that there was a bug triggered by your model. This one has been fixed and you now get a correct error message. Unfortunately, I have no idea, what is causing your model not being able to solve.