Problem getting steady state values

Hello, I am trying to run the attatched dynare mod file and following matlab files for steady state. To get the steady state value, I used ‘fsolve’(‘solve_calibration.m’) while running ‘_steadystate.m’ file. I used the example code by JohannesPfeifer : “DSGE_mod/Gali_2010/Gali_2010_calib_target_steadystate.m at master · JohannesPfeifer/DSGE_mod · GitHub”. The ‘fsolve’ was done successfully(please refer to ‘_error.txt’) and I got my ‘deep parameters’ updated with no weird values. However, I got ‘The steadystate file did not compute the steady state’ message with the following result.

Residuals of the static equations:

Equation number 1 : NaN : 1. FOC consumption
Equation number 2 : NaN : 2. Euler equation
Equation number 3 : -0.03451 : 3. FOC capital utilization
Equation number 4 : -Inf : 4. FOC capital
Equation number 5 : NaN : 5. FOC investment
Equation number 6 : 0 : 6. Firm price setting 1
Equation number 7 : 0 : 7. Firm price setting 2
Equation number 8 : 0 : 8. Firm price setting 3
Equation number 9 : 0 : 9. Marginal cost
Equation number 10 : -Inf : 10. law of motion prices
Equation number 11 : NaN : 11. Optimal capital labor ratio
Equation number 12 : 0 : 12. law of motion employment
Equation number 13 : -1 : 13. unemployment measure
Equation number 14 : NaN : 14. Job finding rate
Equation number 15 : 0 : 15. Value of firm
Equation number 16 : 0 : 16. recursive representation of nup
Equation number 17 : 0 : 17. recursive representation of wp
Equation number 18 : -Inf : 18. optimal condition for wholesaler
Equation number 19 : 0 : 19. Value of work
Equation number 20 : 0 : 20. Present value of worker payoff after separation
Equation number 21 : -0.46127 : 21. Unemployment value
Equation number 22 : NaN : 22. Vacancy filling rate
Equation number 23 : 0 : 23. Matching function
Equation number 24 : NaN : 24. Job market tightness
Equation number 25 : 0.47575 : 25. AOB equilibrium equation
Equation number 26 : 0 : 26. Monetary Policy
Equation number 27 : 0 : 27. Tax Rule
Equation number 28 : NaN : 28. Government budget constraint
Equation number 29 : NaN : 29. Resource constraint
Equation number 30 : NaN : 30. Aggregate production
Equation number 31 : -Inf : 31. LOM Price dispersion term
Equation number 32 : NaN : 32. Law of motion for capital
Equation number 33 : 0 : 33. Profits of the intermediate firm
Equation number 34 : 0 : 34. Preference Shock
Equation number 35 : 0 : 35. UB Shock
Equation number 36 : 0 : 36. Investment specific technology
Equation number 37 : 0 : 37. Neutral technology
Equation number 38 : 0 : 38. Defininition composite technology

I checked the equations for any typos or other mistakes but I could not find one. I would be really appreciated if anyone could help me handle the problem.

To add a short background, the model is a medium scale NK model(similar to NK baseline model but for labor market frictions and some policy structures). The labor market frictions come from Christiano et.al.(2016, Econometrica) and some notations(e.g. ump) from Ravenna and Walsh(2011). I did not make use of Omega as in Christiano et.al.(2016, Econometrica) for this prototype version.

Thank you so much.

Regards,
Yoonhyok Choi

aob_policy_regime.mod (10.5 KB)
aob_policy_regime_steadystate.m (6.4 KB)
solve_calibration.m (730 Bytes)
aob_policy_regime_error.txt (3.2 KB)

Your steady state file should have

  eval(['ys(' int2str(ii) ') = ' varname ';']);

not

  eval(['ys(' int2str(ii) ') =  0 ;']);

aob_policy_regime_steadystate.m (6.5 KB)

Thank you for your comment. I now have the following result, which does not have NaN or Inf. However, some values on the residuals seem to be far from zero and it still shows ‘The steadystate file did not compute the steady state’. The result I see is as follows:

clear
aob_policy_regime
Starting Dynare (version 5.4).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Found 38 equation(s).
Evaluating expressions…done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
Processing outputs …
done
Preprocessing completed.

Equation solved.

fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.

Residuals of the static equations:

Equation number 1 : 0 : 1. FOC consumption
Equation number 2 : 0 : 2. Euler equation
Equation number 3 : 0 : 3. FOC capital utilization
Equation number 4 : 0 : 4. FOC capital
Equation number 5 : 0 : 5. FOC investment
Equation number 6 : 0 : 6. Firm price setting 1
Equation number 7 : 0 : 7. Firm price setting 2
Equation number 8 : 0 : 8. Firm price setting 3
Equation number 9 : 0 : 9. Marginal cost
Equation number 10 : 0 : 10. law of motion prices
Equation number 11 : 0 : 11. Optimal capital labor ratio
Equation number 12 : 0 : 12. law of motion employment
Equation number 13 : 0 : 13. unemployment measure
Equation number 14 : -1.3932 : 14. Job finding rate
Equation number 15 : 0 : 15. Value of firm
Equation number 16 : 0 : 16. recursive representation of nup
Equation number 17 : 0 : 17. recursive representation of wp
Equation number 18 : 0 : 18. optimal condition for wholesaler
Equation number 19 : 0 : 19. Value of work
Equation number 20 : 0 : 20. Present value of worker payoff after separation
Equation number 21 : 0 : 21. Unemployment value
Equation number 22 : 0 : 22. Vacancy filling rate
Equation number 23 : 0.019265 : 23. Matching function
Equation number 24 : -14.9007 : 24. Job market tightness
Equation number 25 : 0 : 25. AOB equilibrium equation
Equation number 26 : 0 : 26. Monetary Policy
Equation number 27 : 0 : 27. Tax Rule
Equation number 28 : 0 : 28. Government budget constraint
Equation number 29 : 0 : 29. Resource constraint
Equation number 30 : 0 : 30. Aggregate production
Equation number 31 : 0 : 31. LOM Price dispersion term
Equation number 32 : 0 : 32. Law of motion for capital
Equation number 33 : 3.1462 : 33. Profits of the intermediate firm
Equation number 34 : 0 : 34. Preference Shock
Equation number 35 : 0 : 35. UB Shock
Equation number 36 : 1.003 : 36. Investment specific technology
Equation number 37 : 1.0032 : 37. Neutral technology
Equation number 38 : 0 : 38. Defininition composite technology

Equation solved.

fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.

Error using print_info The steadystate file did not compute the steady state

Error in check (line 48)
print_info(info, 0, options);

Error in aob_policy_regime.driver (line 544)
oo_.dr.eigval = check(M_,options_,oo_);

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

Error in aob_policy_regime (line 2)
dynare aob_policy_regime.mod

Thank you so much!

Now it’s a standard problem of steady state computations and model equations not matching. Debug your codes based on the equations with residuals.

Thank you so much for your help! I debugged my codes (changing some definitions at the mod file and equations on the steady state file as well as setting phif = 0 as in NK baseline.mod) and got the following result:

Residuals of the static equations:

Equation number 1 : 0 : 1. FOC consumption
Equation number 2 : 0 : 2. Euler equation
Equation number 3 : 0 : 3. FOC capital utilization
Equation number 4 : 0 : 4. FOC capital
Equation number 5 : 0 : 5. FOC investment
Equation number 6 : 0 : 6. Firm price setting 1
Equation number 7 : 0 : 7. Firm price setting 2
Equation number 8 : 0 : 8. Firm price setting 3
Equation number 9 : 0 : 9. Marginal cost
Equation number 10 : 0 : 10. law of motion prices
Equation number 11 : 0 : 11. Optimal capital labor ratio
Equation number 12 : 0 : 12. law of motion employment
Equation number 13 : 0 : 13. unemployment measure
Equation number 14 : 0 : 14. Job finding rate
Equation number 15 : 0 : 15. Value of firm
Equation number 16 : 0 : 16. recursive representation of nup
Equation number 17 : 0 : 17. recursive representation of wp
Equation number 18 : 0 : 18. optimal condition for wholesaler
Equation number 19 : 0 : 19. Value of work
Equation number 20 : 0 : 20. Present value of worker payoff after separation
Equation number 21 : 0 : 21. Unemployment value
Equation number 22 : 0 : 22. Vacancy filling rate
Equation number 23 : 0 : 23. Matching function
Equation number 24 : 0 : 24. Job market tightness
Equation number 25 : 0 : 25. AOB equilibrium equation
Equation number 26 : 0 : 26. Monetary Policy
Equation number 27 : 0 : 27. Tax Rule
Equation number 28 : 0 : 28. Government budget constraint
Equation number 29 : 0 : 29. Resource constraint
Equation number 30 : 0 : 30. Aggregate production
Equation number 31 : 0 : 31. LOM Price dispersion term
Equation number 32 : 0 : 32. Law of motion for capital
Equation number 33 : 0 : 33. Preference Shock
Equation number 34 : 0 : 34. UB Shock
Equation number 35 : 0 : 35. Investment specific technology
Equation number 36 : 0 : 36. Neutral technology
Equation number 37 : 0 : 37. Defininition composite technology

However, I still have a problem with a message that : “Error using print_info
Blanchard & Kahn conditions are not satisfied: indeterminacy.” (please refer to the “_error2.txt” attatched.)

It also says: “There are 19 eigenvalue(s) larger than 1 in modulus
for 20 forward-looking variable(s) The rank condition ISN’T verified!”

I attatched the updated .mod file and steadystate.m file. The _calibration.m file remains the same. Thank you for your help!! Your comments make my progress. Thank you.

aob_policy_regime.mod (10.3 KB)
aob_policy_regime_steadystate.m (6.2 KB)
aob_policy_regime_error2.txt (5.4 KB)

This looks like a timing error. ump does not appear contemporaneously in the model.

I see. Thank you so much for your comment!