Hi,
I’m trying to use the --steps option in dynare++ in a model. I am getting the error:
Caught TL exception: At …/tl/cc/t_container.hh:186:NaN or Inf asserted in TensorContainer::insert
This issue only occurs when the --steps option is set greater than 0. Or in other words, I can solve models in dynare++ normally around the deterministic steady state.
Problem occurs in the model I’m working with but also in the example given in the dynare++ files, so I include that below in case its of use (with order=3, rather than 7. It gives the same error either way, just gets there faster with a lower order…)
So my command line text to get the above error would be: dynare++ --steps 1 example1.mod
Whilst the command line text: dynare++ example1.mod
will give the expected output.
Thanks for any help - much appreciated!
/*
-
This Dynare++ mod-file implements the RBC model with time-to-build
-
described in Kamenik (2011): “DSGE Models with Dynare++. A Tutorial.”
-
Note that Dynare++ uses the same stock-at-the-end-of-period timing convention
-
as the regular Dynare
*/
var Y, C, K, A, H, B;
varexo EPS, NU;
parameters beta, rho, alpha, delta, theta, psi, tau;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 1/(1.03^0.25);
delta = 0.025;
psi = 0;
theta = 2.95;
model;
CthetaH^(1+psi) = (1-alpha)*Y;
beta*exp(B)C/exp(B(1))/C(1)
(exp(B(1))alphaY(1)/K(1)+1-delta) = 1;
Y = exp(A)K^alphaH^(1-alpha);
K = exp(B(-1))*(Y(-1)-C(-1)) + (1-delta)*K(-1);
A = rhoA(-1) + tauB(-1) + EPS;
B = tauA(-1) + rhoB(-1) + NU;
end;
initval;
A = 0;
B = 0;
H = ((1-alpha)/(theta*(1-(delta*alpha)/(1/beta-1+delta))))^(1/(1+psi));
Y = (alpha/(1/beta-1+delta))^(alpha/(1-alpha))*H;
K = alpha/(1/beta-1+delta)*Y;
C = Y - delta*K;
end;
vcov = [0.0002 0.00005;
0.00005 0.0001
];
order = 3;