Drop the “periods” statement

silicon
Sébastien Villemot 2023-01-16 16:14:28 +01:00
parent 1c5c1639e1
commit 1b47c8a5e5
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
10 changed files with 7 additions and 281 deletions

View File

@ -2846,24 +2846,6 @@ Other general declarations
|br| Reduces the number of periods considered in subsequent output commands.
.. command:: periods INTEGER
|br| This command is now deprecated (but will still work for older
model files). It is not necessary when no simulation is performed
and is replaced by an option ``periods`` in
``perfect_foresight_setup``, ``simul`` and ``stoch_simul``.
This command sets the number of periods in the simulation. The
periods are numbered from 1 to INTEGER. In perfect foresight
simulations, it is assumed that all future events are perfectly
known at the beginning of period 1.
*Example*
::
periods 100;
.. _st-st:

@ -1 +1 @@
Subproject commit 93b9ed69577246cb13eef1890d52708f2aea4a9d
Subproject commit a7b0a324c9b97ec1bbcf3e3487dcaa176423598a

View File

@ -51,7 +51,7 @@ oo_.exo_steady_state = 1.1;
oo_.exo_simul(end, 1) = oo_.exo_steady_state;
oo_.steady_state = evaluate_steady_state(oo_.steady_state, M_, options_, oo_, true);
oo_.endo_simul(:, end) = oo_.steady_state;
periods 6;
options_.periods = 6;
saved_endo = oo_.endo_simul(:, 1);
saved_exo = oo_.exo_simul(1, :);
oo_.endo_simul = oo_.endo_simul(:, 2:end);
@ -66,7 +66,7 @@ oo_.exo_steady_state = 1.2;
oo_.exo_simul(end, 1) = oo_.exo_steady_state;
oo_.steady_state = evaluate_steady_state(oo_.steady_state, M_, options_, oo_, true);
oo_.endo_simul(:, end) = oo_.steady_state;
periods 5;
options_.periods = 5;
saved_endo = oo_.endo_simul(:, 1:2);
saved_exo = oo_.exo_simul(1:2, :);
oo_.endo_simul = oo_.endo_simul(:, 3:end);
@ -82,7 +82,7 @@ oo_.exo_steady_state = 1.1;
oo_.exo_simul(end, 1) = oo_.exo_steady_state;
oo_.steady_state = evaluate_steady_state(oo_.steady_state, M_, options_, oo_, true);
oo_.endo_simul(:, end) = oo_.steady_state;
periods 2;
options_.periods = 2;
saved_endo = oo_.endo_simul(:, 1:5);
saved_exo = oo_.exo_simul(1:5, :);
oo_.endo_simul = oo_.endo_simul(:, 6:end);

View File

@ -94,7 +94,7 @@ oo_.exo_steady_state = 1.1;
oo_.exo_simul(end, 1) = oo_.exo_steady_state;
oo_.steady_state = evaluate_steady_state(oo_.steady_state, M_, options_, oo_, true);
oo_.endo_simul(:, end) = oo_.steady_state;
periods 6;
options_.periods = 6;
saved_endo = oo_.endo_simul(:, 1);
saved_exo = oo_.exo_simul(1, :);
oo_.endo_simul = oo_.endo_simul(:, 2:end);
@ -110,7 +110,7 @@ oo_.exo_steady_state = 1.1+0.1;
oo_.exo_simul(end, 1) = oo_.exo_steady_state;
oo_.steady_state = evaluate_steady_state(oo_.steady_state, M_, options_, oo_, true);
oo_.endo_simul(:, end) = oo_.steady_state;
periods 5;
options_.periods = 5;
saved_endo = oo_.endo_simul(:, 1:2);
saved_exo = oo_.exo_simul(1:2, :);
oo_.endo_simul = oo_.endo_simul(:, 3:end);
@ -126,7 +126,7 @@ oo_.exo_steady_state = (1.1+0.1)*0.75;
oo_.exo_simul(end, 1) = oo_.exo_steady_state;
oo_.steady_state = evaluate_steady_state(oo_.steady_state, M_, options_, oo_, true);
oo_.endo_simul(:, end) = oo_.steady_state;
periods 2;
options_.periods = 2;
saved_endo = oo_.endo_simul(:, 1:5);
saved_exo = oo_.exo_simul(1:5, :);
oo_.endo_simul = oo_.endo_simul(:, 6:end);

View File

@ -1,44 +0,0 @@
// example 1 from Collard's guide to Dynare
periods 400;
var y, c, k, a, h, b, b1;
varexo e,u;
parameters beta, rho, alpha, delta, theta, psi, tau, phi;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b1(-1) + e;
b = tau*a(-1)+rho*b1(-1) + u;
b1 = b(-1);
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
b1 = 0;
a = 0;
b = 0;
e = 0;
u = 0;
end;
Sigma_e = [ 0.000081; (phi*0.009*0.009) 0.000081];
stoch_simul(order=2,irf=0);

View File

@ -1,44 +0,0 @@
// example 1 from Collard's guide to Dynare
periods 400;
var y, c, k, a, h, b, b1;
varexo e,u;
parameters beta, rho, alpha, delta, theta, psi, tau, phi;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b1(-1) + e;
b = tau*a(-1)+rho*b1(-1) + u;
b1 = b(-1);
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
b1 = 0;
a = 0;
b = 0;
e = 0;
u = 0;
end;
Sigma_e = [ 0.000081; (phi*0.009*0.009) 0.000081];
stoch_simul(order=1,irf=0);

View File

@ -1,44 +0,0 @@
// example 1 from Collard's guide to Dynare
periods 400;
var y, c, k, a, h, b, b1;
varexo e,u;
parameters beta, rho, alpha, delta, theta, psi, tau, phi;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b1(-1) + e;
b = tau*a(-1)+rho*b1(-1) + u;
b1 = b(-1);
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
a = 0;
b = 0;
b1 = 0;
e = 0;
u = 0;
end;
Sigma_e = [ 0.000081; (phi*0.009*0.009) 0.000081];
stoch_simul(irf=0,order=1);

View File

@ -1,42 +0,0 @@
// example 1 from Collard's guide to Dynare
periods 400;
var y, c, k, a, h, b, b1;
varexo e,u;
parameters beta, rho, alpha, delta, theta, psi, tau, phi;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b1(-1) + e;
b = tau*a(-1)+rho*b1(-1) + u;
b1 = b(-1);
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
a = 0;
b = 0;
b1 = 0;
end;
Sigma_e = [ 0.000081; (phi*0.009*0.009) 0.000081];
stoch_simul(irf=0,periods=10000,order=2);

View File

@ -1,40 +0,0 @@
periods 200;
var y, c, k, a, h, b;
varexo e,u;
parameters beta, rho, beta, alpha, delta, theta, psi, tau, phi;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b(-1) + e;
b = tau*a(-1)+rho*b(-1) + u;
end;
initval;
y = 1;
c = 0.7;
h = 0.1;
k = 11;
a = 0;
b = 0;
e = 0;
u = 0;
end;
Sigma_e = [ 0.01 0.005; 0.01];
stoch_simul(irf=0);

View File

@ -1,42 +0,0 @@
// test setting variance to 0
periods 400;
var y, c, k, a, h, b;
varexo e,u;
parameters beta, rho, alpha, delta, theta, psi, tau, phi;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b(-1) + e;
b = tau*a(-1)+rho*b(-1) + u;
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
a = 0;
b = 0;
e = 0;
u = 0;
end;
Sigma_e = [ 0.000081; (phi*0.009*0.009) 0];
stoch_simul(order=1,irf=0,simul);