diff --git a/tests/ep/ar.mod b/tests/ep/ar.mod new file mode 100644 index 000000000..f139bde1e --- /dev/null +++ b/tests/ep/ar.mod @@ -0,0 +1,51 @@ +var Efficiency, efficiency; + +varexo EfficiencyInnovation; + +parameters rho, effstar, sigma2; + +/* +** Calibration +*/ + + +rho = 0.950; +effstar = 1.000; +sigma2 = 0.0001; + +external_function(name=mean_preserving_spread); + +model(block,bytecode); + + // Eq. n°1: + efficiency = rho*efficiency(-1) + EfficiencyInnovation; + + // Eq. n°2: + Efficiency = effstar*exp(efficiency-mean_preserving_spread(rho)); + +end; + +shocks; +var EfficiencyInnovation = sigma2; +end; + +steady; + +options_.ep.verbosity = 0; +options_.ep.stochastic = 0; +options_.console_mode = 0; + + +ts = extended_path([],1000); + + +options_.ep.verbosity = 0; +options_.ep.stochastic = 1; +options_.console_mode = 0; + +sts = extended_path([],1000); + + +if max(max(abs(ts-sts)))>1e-12 + disp('Stochastic Extended Path:: Something is wrong here (potential bug in extended_path.m)!!!') +end \ No newline at end of file diff --git a/tests/ep/ar_steadystate.m b/tests/ep/ar_steadystate.m new file mode 100644 index 000000000..966331f8e --- /dev/null +++ b/tests/ep/ar_steadystate.m @@ -0,0 +1,9 @@ +function [ys, info] = ar_steadystate(ys, exogenous) +% Steady state routine for ar.mod (First order autoregressive process) + +global M_ + +info = 0; + +ys(1)=M_.params(2); +ys(2)=0; \ No newline at end of file