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.
@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.
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?