Skip to content
Snippets Groups Projects
Commit 43f46f28 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Removed stability test over the last periods of the perfect foresight solution.

parent 64ebd1d0
Branches
Tags
No related merge requests found
...@@ -248,16 +248,7 @@ while (t<sample_size) ...@@ -248,16 +248,7 @@ while (t<sample_size)
end end
end end
end end
% Test if periods is big enough. The variable delta measures the maximum absolute variation during % Test if periods is big enough.
% the last periods of the simulated path. This variation has to be close to zero (because the
% economy is assumed to be in the steady state at the end of the simulated path).
if info.convergence
delta = max(max(abs(tmp(:,end-options_.ep.lp:end)-tmp(:,end-options_.ep.lp-1:end-1))));
end
if info.convergence && ~increase_periods && delta<options_.dynatol.x
% Exit from the while loop (the number of periods is big enough).
break
else
% Increase the number of periods. % Increase the number of periods.
options_.periods = options_.periods + options_.ep.step; options_.periods = options_.periods + options_.ep.step;
pfm.periods = options_.periods; pfm.periods = options_.periods;
...@@ -335,7 +326,6 @@ while (t<sample_size) ...@@ -335,7 +326,6 @@ while (t<sample_size)
break break
end end
end% if info.convergence end% if info.convergence
end% ~increase_periods && delta<options_.dynatol.x
end% while end% while
if ~info.convergence% If exited from the while loop without achieving convergence, use an homotopic approach if ~info.convergence% If exited from the while loop without achieving convergence, use an homotopic approach
[INFO,tmp] = homotopic_steps(.5,.01); [INFO,tmp] = homotopic_steps(.5,.01);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment