Hi all,
I am trying to solve using Fsolve and lsqnonlin functions, an environmental DSGE with an output damage function, an energy sector, a fossil fuel stock reserve and a pollution stock, along with some environmental policy rules, and although the lsqnonlin functions seems to find a steady state, when i populate them in dynare the sum of squared residuals of the static equations is close to 0 → 0.9034 and i receive the message:
"Calling Dynare with arguments: none
Starting preprocessing of the model file ...
Found 26 equation(s).
Evaluating expressions...
Computing static model derivatives (order 1).
Normalizing the static model...
Finding the optimal block decomposition of the static model...
9 block(s) found:
8 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 18 equation(s)
and 18 feedback variable(s).
Computing dynamic model derivatives (order 1).
Normalizing the dynamic model...
Finding the optimal block decomposition of the dynamic model...
2 block(s) found:
1 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 18 equation(s)
and 11 feedback variable(s).
Preprocessing completed.
Preprocessing time: 0h00m01s.
Residuals of the static equations:
Equation number 1: 1 : -0.309102
Equation number 2: 2 : 1.108777
Equation number 3: 3 : 3.150875
Equation number 4: k_fossil : -0.000227
Equation number 5: k_rest : -0.089422
Equation number 6: k_total : -5.303200
Equation number 7: E : 1.293382
Equation number 8: E_fossil : 5.471022
Equation number 9: E_renew : -0.491174
Equation number 10: X : -0.694450
Equation number 11: Z : -0.314455
Equation number 12: F : -0.151172
Equation number 13: y : 0.935226
Equation number 14: g : -8.619432
Equation number 15: G : 2.322530
Equation number 16: r : 0.421466
Equation number 17: w : -1.044351
Equation number 18: d : 0.215754
Equation number 19: 19 : -5.717700
Equation number 20: a : -0.000075
Equation number 21: z : 0.094200
Equation number 22: tau : 0.010480
Equation number 23: T_tax : 0.191910
Equation number 24: cap : -0.008940
Equation number 25: A_x : 0.100000
Equation number 26: ND : 0.030000
DYNARE_SOLVE (solve_algo=2|4): number of blocks = 9
Nonlinear solver routine returned errorcode=0.
MODEL_DIAGNOSTICS: The steady state cannot be computed
Residuals of the static equations:
Equation number 1: 1 : -0.290122
Equation number 2: 2 : -0.029605
Equation number 3: 3 : -0.063965
Equation number 4: k_fossil : -0.052717
Equation number 5: k_rest : -0.052833
Equation number 6: k_total : -0.012239
Equation number 7: E : -0.010098
Equation number 8: E_fossil : 0.005844
Equation number 9: E_renew : -0.000878
Equation number 10: X : -0.141675
Equation number 11: Z : -0.112894
Equation number 12: F : 0.000000
Equation number 13: y : 0.192982
Equation number 14: g : -0.317202
Equation number 15: G : -0.472537
Equation number 16: r : -0.486529
Equation number 17: w : 0.041995
Equation number 18: d : -0.068860
Equation number 19: 19 : -0.413802
Equation number 20: a : 0.000000
Equation number 21: z : 0.000000
Equation number 22: tau : 0.000000
Equation number 23: T_tax : 0.000000
Equation number 24: cap : 0.000000
Equation number 25: A_x : 0.000000
Equation number 26: ND : 0.000000
Error using print_info
Impossible to find the steady state (the sum of squared residuals of the static equations is 0.9034). 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.
Error in steady (line 143)
print_info(info,options_.noprint, options_);
Error in test_env.driver (line 822)
steady;
Error in dynare (line 310)
evalin('base',[fname '.driver']);"
Any idea on how to proceed and what to look for?
Attached you may find the model in Dynare as well as the two .m files used to run lsqnonlin function.
energy_env_steady_equations_lsqnonlin.m (2.6 KB)
run_lsqnonlin_energy_env_L.m (1.2 KB)
test_env.mod (3.5 KB)
Kind regards
Michael