Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix treatment of complex elements in perfect foresight simulations #896
terminates with imaginary parts in the results. Judging from the size of imaginary parts (maximum in the range of 1e-13) this is due to numerical inaccuracies.
We should aim at making this consistent. My proposal would be to discard any imaginary parts smaller than 1e-10 in perfect foresight simulations and return the cleaned values as a solution.
Sidenote: in the attached mod-file, capital explodes despite the model being Blanchard-Kahn stable. This is something regularly reported by users in the forum in the presence of endogenous stocks. IS there a good explanation for this?