Skip to content
Snippets Groups Projects
Commit f89a969a authored by MichelJuillard's avatar MichelJuillard
Browse files

fix bug with lag on exogenous variables on more than one period

(cherry picked from commit 492124ce9886e6aef4f4cefef302241d7edfe024)
parent 686f8b23
Branches
Tags
No related merge requests found
......@@ -38,13 +38,13 @@ dynamicmodel = str2func([M.fname,'.dynamic']);
info.status = 1;
for it = 2:options.periods+1
for it = M.maximum_lag + (1:options.periods)
yb = endogenousvariables(:,it-1); % Values at previous period, also used as guess value for current period
yb1 = yb(iyb);
[tmp, check] = solve1(dynamicmodel, [yb1; yb], 1:M.endo_nbr, nyb+1:nyb+M.endo_nbr, ...
1, options.gstep, options.dynatol.f, options.dynatol.x, ...
options.simul.maxit, options.debug, exogenousvariables, ...
M.params, steadystate, it+M.maximum_lag-1);
M.params, steadystate, it);
if check
info.status = 0;
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment