deterministic model: temporary shock - no convergence
Posted: Sat Sep 04, 2010 2:05 pm
Hello,
I have been working on a model (see code attached). The stochastic version seems to be working fine. However, I would like to examine the effects of a temporary and fully anticipated shock. This unfortunately does not seem to work: the code does not converge. Based on the tips I found online, I attempted several ways to fix this: 1) increasing the number of periods, 2) decreasing the step size (options_.slowc), but neither seem to help. Interestingly, even if I set the shock to be always equal to its steady state value, the algorithm still does not find the right solution (which should be to stay in steady state forever).
The name of the variable that is shocked is 'logkappa' and its dynamics are set in line 315 of the code.
I tried fixing some variables of the model, and found one thing that does 'work'. In line 139, there is a first order condition for a variable called 'LC'. If I fix this variable at its steady state value, the code seems to work. Also, if I change both sides of the equation to current instead of next-period variables (wC and wS), the algorithm works, but only if I don't set the number of time periods to be too high.
Would you have any ideas as to what is going on, and any tips on how I might fix this?
Thank you!
Gideon
I have been working on a model (see code attached). The stochastic version seems to be working fine. However, I would like to examine the effects of a temporary and fully anticipated shock. This unfortunately does not seem to work: the code does not converge. Based on the tips I found online, I attempted several ways to fix this: 1) increasing the number of periods, 2) decreasing the step size (options_.slowc), but neither seem to help. Interestingly, even if I set the shock to be always equal to its steady state value, the algorithm still does not find the right solution (which should be to stay in steady state forever).
The name of the variable that is shocked is 'logkappa' and its dynamics are set in line 315 of the code.
I tried fixing some variables of the model, and found one thing that does 'work'. In line 139, there is a first order condition for a variable called 'LC'. If I fix this variable at its steady state value, the code seems to work. Also, if I change both sides of the equation to current instead of next-period variables (wC and wS), the algorithm works, but only if I don't set the number of time periods to be too high.
Would you have any ideas as to what is going on, and any tips on how I might fix this?
Thank you!
Gideon