Renamed and changed integration test for sim1_purely_backward routine.

Compare the solution returned by sim1_purely_backward with the true solution.
time-shift
Stéphane Adjemian (Charybdis) 2015-12-16 15:24:44 +01:00
parent e0be60710c
commit 02c71eb270
3 changed files with 33 additions and 28 deletions

View File

@ -215,7 +215,7 @@ MODFILES = \
ep/rbcii.mod \
ep/linearmodel.mod \
deterministic_simulations/deterministic_model_purely_forward.mod \
deterministic_simulations/deterministic_model_purely_backward.mod \
deterministic_simulations/purely_backward/ar1.mod \
deterministic_simulations/rbc_det1.mod \
deterministic_simulations/rbc_det2.mod \
deterministic_simulations/rbc_det3.mod \

View File

@ -1,27 +0,0 @@
var y;
varexo eps;
parameters rho1 rho2;
rho1 = 0.1;
rho2 = 0.2;
model;
log(y) = rho1*log(y(-1)) + rho2*log(y(-2)) + eps;
end;
initval;
y=1;
eps=0;
end;
steady;
check;
shocks;
var eps;
periods 1:9;
values -0.0104;
end;
simul(periods=100);

View File

@ -0,0 +1,32 @@
var y;
varexo eps;
parameters rho;
rho = 0.9;
model;
y = y(-1)^rho*exp(eps);
end;
initval;
y = 1;
eps = 0;
end;
steady;
check;
shocks;
var eps;
periods 1;
values 1;
end;
simul(periods=10);
if max(abs(y-[1; exp(cumprod([1; rho*ones(9, 1)]))]))>options_.dynatol.x
error('Wrong solution!')
end