Error in discretionary policy

Hello everyone,
I am trying to compute the optimal policy under discretion for the SW model and I get this error:

Error using print_info (line 117)
Discretionary policy: NaN elements are present in the solution. Procedure failed.

I just get this error if I introduce in the objective function the variable yf. Nevertheless, for the same model, the optimal policy under commitment allows me to consider yf.

Thank you in advanceusmodel.mod (5.3 KB)

That is hard to tell. I am no expert on optimal policy. There may be a good economic reason why the procedure fails to solve under discretion.

Just got the same error. Not for the same .mod-file, but for a different version of SW from Del Negro et al. (AEJM, 2015).

US_DNGS_SW15.mod (7.5 KB)

Not sure what to make out of this.

@Phil Debugging models of this size is close to impossible, because you never know whether there is a technical problem or an economic reason for the approach failing. Also, I cannot run your file, because you are loading a file lambda you did not provide.

Sorry about that. This is just a parameter in the planner objective. This file should run without problems.

US_DNGS_SW15.mod (7.5 KB)

Again, it is hard to tell. The solution algorithm fails pretty much immediately. The problem appears when trying to invert the D matrix in equation (20) of the Dennis (2007)-paper. Maybe this provides you with a clue. Have you tried a simpler version of the model?