dynare/tests/ep/ar.mod

52 lines
1.0 KiB
Modula-2
Raw Normal View History

var Efficiency, efficiency;
varexo EfficiencyInnovation;
2012-11-05 17:43:52 +01:00
parameters rho, effstar, sigma;
/*
** Calibration
*/
rho = 0.950;
effstar = 1.000;
2012-11-05 17:43:52 +01:00
sigma = 0.0001;
2012-11-05 17:43:52 +01:00
external_function(name=mean_preserving_spread,nargs=2);
model;
// Eq. n°1:
2012-11-05 17:43:52 +01:00
efficiency = rho*efficiency(-1) + sigma*EfficiencyInnovation;
// Eq. n°2:
2012-11-05 17:43:52 +01:00
Efficiency = effstar*exp(efficiency-mean_preserving_spread(rho,sigma));
end;
shocks;
2012-11-05 17:43:52 +01:00
var EfficiencyInnovation = 1;
end;
steady;
options_.ep.verbosity = 0;
options_.ep.stochastic.order = 0;
options_.ep.stochastic.nodes = 0;
options_.console_mode = 0;
ts = extended_path([], 10, options_, M_, oo_);
options_.ep.verbosity = 0;
options_.ep.stochastic.order = 1;
options_.ep.IntegrationAlgorithm='Tensor-Gaussian-Quadrature';
options_.ep.stochastic.nodes = 3;
options_.console_mode = 0;
sts = extended_path([], 10, [], options_, M_, oo_);
2012-11-05 17:43:52 +01:00
if max(max(abs(ts-sts)))>pi*options_.dynatol.x
disp('Stochastic Extended Path:: Something is wrong here (potential bug in extended_path.m)!!!')
2012-11-05 17:43:52 +01:00
end