Jacobian contains NaNs

Hi everyone,

I am simulating an open-economy NK model with capital accumulation and international banking, but when I tried to run it I get the error “The Jacobian contains NaNs” . Model diagnostics indicates only collinearity with some equations, but I think it’s a feature. Does anyone spot some obvious reason why the error might pop up? I tried checking for variables that are set to 0 in steady state raised to powers lower than one but could not find any. Any help would be greatly appreciated!


bankingintermediation.mod (5.6 KB)

bankingintermediation_steadystate.m (1.5 KB)

Your problem is the
H^(1 - gamma)
in equation 10. H has steady state 0 while gamma is 3. So you have H^{-2}=\frac{1}{H^2}=\frac{1}{0}