Fixed bugs.
parent
e8ec0a37df
commit
59a62d87af
|
@ -2,7 +2,7 @@ var Efficiency, efficiency;
|
||||||
|
|
||||||
varexo EfficiencyInnovation;
|
varexo EfficiencyInnovation;
|
||||||
|
|
||||||
parameters rho, effstar, sigma2;
|
parameters rho, effstar, sigma;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Calibration
|
** Calibration
|
||||||
|
@ -11,22 +11,22 @@ parameters rho, effstar, sigma2;
|
||||||
|
|
||||||
rho = 0.950;
|
rho = 0.950;
|
||||||
effstar = 1.000;
|
effstar = 1.000;
|
||||||
sigma2 = 0.0001;
|
sigma = 0.0001;
|
||||||
|
|
||||||
external_function(name=mean_preserving_spread);
|
external_function(name=mean_preserving_spread,nargs=2);
|
||||||
|
|
||||||
model;
|
model;
|
||||||
|
|
||||||
// Eq. n°1:
|
// Eq. n°1:
|
||||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation;
|
efficiency = rho*efficiency(-1) + sigma*EfficiencyInnovation;
|
||||||
|
|
||||||
// Eq. n°2:
|
// Eq. n°2:
|
||||||
Efficiency = effstar*exp(efficiency-mean_preserving_spread(rho));
|
Efficiency = effstar*exp(efficiency-mean_preserving_spread(rho,sigma));
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
shocks;
|
shocks;
|
||||||
var EfficiencyInnovation = sigma2;
|
var EfficiencyInnovation = 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
steady;
|
steady;
|
||||||
|
@ -36,15 +36,15 @@ options_.ep.stochastic.order = 0;
|
||||||
options_.ep.stochastic.nodes = 0;
|
options_.ep.stochastic.nodes = 0;
|
||||||
options_.console_mode = 0;
|
options_.console_mode = 0;
|
||||||
|
|
||||||
ts = extended_path([],100);
|
ts = extended_path([],10000);
|
||||||
|
|
||||||
options_.ep.verbosity = 0;
|
options_.ep.verbosity = 0;
|
||||||
options_.ep.stochastic.order = 1;
|
options_.ep.stochastic.order = 1;
|
||||||
options_.ep.stochastic.nodes = 3;
|
options_.ep.stochastic.nodes = 3;
|
||||||
options_.console_mode = 0;
|
options_.console_mode = 0;
|
||||||
|
|
||||||
sts = extended_path([],100);
|
sts = extended_path([],10000);
|
||||||
|
|
||||||
if max(max(abs(ts-sts)))>options_.dynatol.x
|
if max(max(abs(ts-sts)))>pi*options_.dynatol.x
|
||||||
disp('Stochastic Extended Path:: Something is wrong here (potential bug in extended_path.m)!!!')
|
disp('Stochastic Extended Path:: Something is wrong here (potential bug in extended_path.m)!!!')
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,4 +14,4 @@ function m = mean_preserving_spread(autoregressive_parameter,sigma)
|
||||||
% stephane DOT adjemian AT univ DASH lemans DOT fr
|
% stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||||
% frederic DOT karame AT univ DASH evry DOT fr
|
% frederic DOT karame AT univ DASH evry DOT fr
|
||||||
|
|
||||||
m = sigma/(1-autoregressive_parameter*autoregressive_parameter);
|
m = .5*sigma*sigma/(1-autoregressive_parameter*autoregressive_parameter);
|
Loading…
Reference in New Issue