Hi! I was computing the transition path in the perfect foresight Solow growth model from a given initial capital stock, and keep getting “LoadError: InexactError: Int64(NaN)” when I tried to run the .mod file. I can’t figure out what went wrong given that the code is so simple (please see below). Can someone help me out here? Many many thanks!
var k;
parameters alpha, delta, s;
alpha = 1/3;
delta = 0.05;
s = 0.1;
model;
k = (1-s)*k(-1)^alpha + (1-delta)*k(-1);
end;
steady_state_model;
k = (delta/(1-s))^(1/(alpha-1));
end;
Thank you for reporting the problem! The current implementation of perfect foresight simulation assumes a shock to an exogenous variable. Your model is perfectly valid on principle, we need to cover the case without exogenous variable or shocks. Wait please for the next release.
P.S. In the future, please refrain to post the same question here and on https://forum.dynare.org/. This forces us to answer twice.