Perfect Foresight Convergence Problem

Hello everyone, actually i’m comparing a bank capital shock in a dsge model with perturbation and perfect foresight. For perturbation no problems. For perfect foresight if i keep the magnitude of the shock low it converges without problems, however by increasing it, instead of getting the non-convergence message from Dynare (“failed to…” ), it stops with the following error during the iterations:

MODEL SIMULATION:

Iter: 1, err. = 1.4187, time = 1.2
Warning: Matrix is singular to working precision.

In sim1>lin_solve (line 194)
In sim1 (line 127)
In perfect_foresight_solver_core (line 102)
In perfect_foresight_solver (line 63)
In dynare (line 278)
In PF_DKP_BankCap (line 58)

Iter: 2, err. = 4.63429e+08, time = 2.229
Warning: Matrix is singular to working precision.

In sim1>lin_solve (line 194)
In sim1 (line 127)
In perfect_foresight_solver_core (line 102)
In perfect_foresight_solver (line 63)
In dynare (line 278)
In PF_DKP_BankCap (line 58)

Error using perfect_foresight_problem
An error occurred when calling SW_EAtot85bankriskGBAC_estadjc3_PF.dynamic_g1_tt

Error in sim1 (line 67)
[res, A] = perfect_foresight_problem(y, y0, yT, exogenousvariables, M.params, steadystate, periods, M, options);

Error in perfect_foresight_solver_core (line 102)

Error in perfect_foresight_solver (line 63)
oo_ = perfect_foresight_solver_core(M_,options_,oo_);

perfect_foresight_solver;

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

Error in PF_DKP_BankCap (line 58)

Unfortunately i cannot share the code, do you have any general idea about why this may happens? Could be the presence of strong non-linearities in the model?

Alex Crescentini.

Most probably. Does homotopy work for the small steps and then fail?

Yes exactly, if i increase the magnitude of the shock not too much, after all the Newton iterations, the homotopy starts and it seems to converge (it does the first step with a very good max residual) but then i get exactly the same error as above. If the shock is large enough instead (as above), the homotopy doesn’t even start. Below is the Dynare output:

Iter: 49, err. = Inf, time = 0.684
Warning: Matrix is singular to working precision.

In sim1>lin_solve (line 194)
In sim1 (line 127)
In perfect_foresight_solver_core (line 102)
In perfect_foresight_solver (line 63)
In dynare (line 278)
In PF_DKP_BankCap (line 58)

Iter: 50, err. = Inf, time = 0.851
Warning: Matrix is singular to working precision.

In sim1>lin_solve (line 194)
In sim1 (line 127)
In perfect_foresight_solver_core (line 102)
In perfect_foresight_solver (line 63)
In dynare (line 278)
In PF_DKP_BankCap (line 58)

Total time of simulation: 164.466. Maximum number of iterations is reached (modify option maxit).

Simulation of the perfect foresight model failed!
Switching to a homotopy method…
Iter. | Lambda | status | Max. residual
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 | 0.50000 | succeeded | 5.803871e-08
Error using perfect_foresight_problem
An error occurred when calling SW_EAtot85bankriskGBAC_estadjc3_PF.dynamic_resid

Error in sim1 (line 67)
[res, A] = perfect_foresight_problem(y, y0, yT, exogenousvariables, M.params, steadystate, periods, M, options);

Error in perfect_foresight_solver_core (line 102)

Error in perfect_foresight_solver (line 156)
[oo_,me] = perfect_foresight_solver_core(M_,options_,oo_);