Merge branch 'master' into ecb-master
commit
c7fe3770df
42
NEWS
42
NEWS
|
@ -1,3 +1,43 @@
|
|||
Announcement for Dynare 4.5.5 (on 2018-06-08)
|
||||
=============================================
|
||||
|
||||
We are pleased to announce the release of Dynare 4.5.5.
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
The Windows packages are already available for download at:
|
||||
|
||||
http://www.dynare.org/download/dynare-stable
|
||||
|
||||
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
|
||||
|
||||
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.3 (R2018a)
|
||||
and with GNU Octave versions 4.2.
|
||||
|
||||
Here is a list of the problems identified in version 4.5.4 and that have been
|
||||
fixed in version 4.5.5:
|
||||
|
||||
- Identification was crashing during prior sampling if `ar` was initially too
|
||||
low.
|
||||
|
||||
- The `align` method on `dseries` did not return a functional second `dseries`
|
||||
output.
|
||||
|
||||
- Predetermined variables were not properly set when used in model local
|
||||
variables.
|
||||
|
||||
- `perfect_foresight_solver` with option `stack_solve_algo=7` was not working
|
||||
correctly when an exogenous variable has a lag greater than 1.
|
||||
|
||||
- `identification` with `prior_mc` option would crash if the number of moments
|
||||
with non-zero derivative is smaller than the number of parameters.
|
||||
|
||||
- Calling several times `normcdf` or `normpdf` with the same arguments in a
|
||||
model with block decomposition (but not bytecode) was leading to incorrect
|
||||
results.
|
||||
|
||||
|
||||
|
||||
Announcement for Dynare 4.5.4 (on 2018-01-29)
|
||||
=============================================
|
||||
|
||||
|
@ -146,7 +186,7 @@ fixed in version 4.5.2:
|
|||
another variable. Note that the constraint on a variable that is not an
|
||||
instrument of the Ramsey problem must be written with an equation tag in the
|
||||
model block.
|
||||
|
||||
|
||||
- Fixed bug in Ramsey problem with constraints on policy instrument.
|
||||
|
||||
- Fixed crash with optimizer 5 when not used with DSGE model at order 1.
|
||||
|
|
|
@ -15275,7 +15275,7 @@ Models of the Business Cycle: A Bayesian Approach,'' Federal Reserve
|
|||
of Atlanta, @i{Working Paper Series}, 2003-30.
|
||||
|
||||
@item
|
||||
Raftery, Adrien E. and Steven Lewis (1992): ``How many iterations in the Gibbs sampler?,'' in @i{Bayesian Statistics, Vol. 4},
|
||||
Raftery, Adrian E. and Steven Lewis (1992): ``How many iterations in the Gibbs sampler?,'' in @i{Bayesian Statistics, Vol. 4},
|
||||
ed. J.O. Berger, J.M. Bernardo, A.P. Dawid, and A.F.M. Smith, Clarendon Press: Oxford, pp. 763-773.
|
||||
|
||||
@item
|
||||
|
|
|
@ -84,7 +84,11 @@ end
|
|||
|
||||
disp([' ']),
|
||||
|
||||
if any(idemodel.ino)
|
||||
|
||||
no_warning_message_display=1;
|
||||
|
||||
if any(idemodel.ino) || any(any(idemodel.ind0==0)) || any(any(idemodel.jweak_pair))
|
||||
no_warning_message_display=0;
|
||||
disp('WARNING !!!')
|
||||
if SampleSize>1
|
||||
disp(['The rank of H (model) is deficient for ', num2str(length(find(idemodel.ino))),' out of ',int2str(SampleSize),' MC runs!' ]),
|
||||
|
@ -152,12 +156,15 @@ if any(idemodel.ino)
|
|||
% end
|
||||
end
|
||||
|
||||
if ~any(idemodel.ino) && ~any(any(idemodel.ind0==0))
|
||||
if no_warning_message_display
|
||||
disp(['All parameters are identified in the model (rank of H).' ]),
|
||||
skipline()
|
||||
end
|
||||
|
||||
if any(idemoments.ino)
|
||||
no_warning_message_display = 1;
|
||||
|
||||
if any(idemoments.ino) || any(any(idemoments.ind0==0)) || any(any(idemoments.jweak_pair))
|
||||
no_warning_message_display = 0;
|
||||
skipline()
|
||||
disp('WARNING !!!')
|
||||
if SampleSize > 1
|
||||
|
@ -234,7 +241,7 @@ if any(idemoments.ino)
|
|||
% end
|
||||
% end
|
||||
end
|
||||
if ~any(idemoments.ino) && ~any(any(idemoments.ind0==0))
|
||||
if no_warning_message_display
|
||||
skipline()
|
||||
disp(['All parameters are identified by J moments (rank of J)' ]),
|
||||
skipline()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 84c2dc5f3621d47407397d519b623eb9d1fc1eb3
|
||||
Subproject commit b8ae9f6935f7039c0ab65946a844f78cf4f8061d
|
|
@ -281,6 +281,8 @@ MODFILES = \
|
|||
deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.mod \
|
||||
deterministic_simulations/rbc_det.mod \
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7.mod \
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.mod \
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.mod \
|
||||
lmmcp/rbc.mod \
|
||||
lmmcp/sw_lmmcp.mod \
|
||||
lmmcp/sw_newton.mod \
|
||||
|
@ -452,6 +454,10 @@ deterministic_simulations/rbc_det_exo_lag_2b.o.trs: deterministic_simulations/rb
|
|||
deterministic_simulations/rbc_det_exo_lag_2c.o.trs: deterministic_simulations/rbc_det_exo_lag_2a.o.trs
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7.m.trs: deterministic_simulations/rbc_det.m.trs
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7.o.trs: deterministic_simulations/rbc_det.o.trs
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.m.trs: deterministic_simulations/rbc_det.m.trs
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.o.trs: deterministic_simulations/rbc_det.o.trs
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.m.trs: deterministic_simulations/rbc_det.m.trs
|
||||
deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.o.trs: deterministic_simulations/rbc_det.o.trs
|
||||
|
||||
initval_file/ramst_initval_file.m.trs: initval_file/ramst_initval_file_data.m.tls
|
||||
initval_file/ramst_initval_file.o.trs: initval_file/ramst_initval_file_data.o.tls
|
||||
|
|
|
@ -17,7 +17,7 @@ sigma2 = 0;
|
|||
model;
|
||||
|
||||
// Eq. n°1:
|
||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation(-2); // Use a lag of two to test the maximum_lag logic
|
||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation;
|
||||
|
||||
// Eq. n°2:
|
||||
Efficiency = effstar*exp(efficiency);
|
||||
|
|
|
@ -17,7 +17,7 @@ sigma2 = 0;
|
|||
model;
|
||||
|
||||
// Eq. n°1:
|
||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation(-2); // Use a lag of two to test the maximum_lag logic
|
||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation;
|
||||
|
||||
// Eq. n°2:
|
||||
Efficiency = effstar*exp(efficiency);
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
var Capital, Output, Labour, Consumption, Efficiency, efficiency, ExpectedTerm;
|
||||
|
||||
varexo EfficiencyInnovation;
|
||||
|
||||
parameters beta, theta, tau, alpha, psi, delta, rho, effstar, sigma2;
|
||||
|
||||
beta = 0.9900;
|
||||
theta = 0.3570;
|
||||
tau = 2.0000;
|
||||
alpha = 0.4500;
|
||||
psi = -0.1000;
|
||||
delta = 0.0200;
|
||||
rho = 0.8000;
|
||||
effstar = 1.0000;
|
||||
sigma2 = 0;
|
||||
|
||||
model;
|
||||
|
||||
// Eq. n°1:
|
||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation(-2); // Use a lag of two to test the maximum_lag logic
|
||||
|
||||
// Eq. n°2:
|
||||
Efficiency = effstar*exp(efficiency);
|
||||
|
||||
// Eq. n°3:
|
||||
Output = Efficiency*(alpha*(Capital(-1)^psi)+(1-alpha)*(Labour^psi))^(1/psi);
|
||||
|
||||
// Eq. n°4:
|
||||
Capital = Output-Consumption + (1-delta)*Capital(-1);
|
||||
|
||||
// Eq. n°5:
|
||||
((1-theta)/theta)*(Consumption/(1-Labour)) - (1-alpha)*(Output/Labour)^(1-psi);
|
||||
|
||||
// Eq. n°6:
|
||||
(((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption = ExpectedTerm(1);
|
||||
|
||||
// Eq. n°7:
|
||||
ExpectedTerm = beta*((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)*(alpha*((Output/Capital(-1))^(1-psi))+(1-delta));
|
||||
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
efficiency = EfficiencyInnovation/(1-rho);
|
||||
Efficiency = effstar*exp(efficiency);
|
||||
Output_per_unit_of_Capital=((1/beta-1+delta)/alpha)^(1/(1-psi));
|
||||
Consumption_per_unit_of_Capital=Output_per_unit_of_Capital-delta;
|
||||
Labour_per_unit_of_Capital=(((Output_per_unit_of_Capital/Efficiency)^psi-alpha)/(1-alpha))^(1/psi);
|
||||
Output_per_unit_of_Labour=Output_per_unit_of_Capital/Labour_per_unit_of_Capital;
|
||||
Consumption_per_unit_of_Labour=Consumption_per_unit_of_Capital/Labour_per_unit_of_Capital;
|
||||
|
||||
% Compute steady state share of capital.
|
||||
ShareOfCapital=alpha/(alpha+(1-alpha)*Labour_per_unit_of_Capital^psi);
|
||||
|
||||
% Compute steady state of the endogenous variables.
|
||||
Labour=1/(1+Consumption_per_unit_of_Labour/((1-alpha)*theta/(1-theta)*Output_per_unit_of_Labour^(1-psi)));
|
||||
Consumption=Consumption_per_unit_of_Labour*Labour;
|
||||
Capital=Labour/Labour_per_unit_of_Capital;
|
||||
Output=Output_per_unit_of_Capital*Capital;
|
||||
ExpectedTerm=beta*((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)
|
||||
*(alpha*((Output/Capital)^(1-psi))+1-delta);
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
||||
ik = varlist_indices('Capital',M_.endo_names);
|
||||
CapitalSS = oo_.steady_state(ik);
|
||||
|
||||
histval;
|
||||
Capital(0) = CapitalSS/2;
|
||||
end;
|
||||
|
||||
|
||||
perfect_foresight_setup(periods=200);
|
||||
|
||||
perfect_foresight_solver(stack_solve_algo=7,solve_algo=1);
|
||||
|
||||
if ~oo_.deterministic_simulation.status
|
||||
error('Perfect foresight simulation failed')
|
||||
end
|
||||
|
||||
rplot Consumption;
|
||||
rplot Capital;
|
||||
|
||||
D = load('rbc_det_results');
|
||||
|
||||
if norm(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead)) > 1e-30;
|
||||
disp(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead));
|
||||
error('rbc_det_stack_solve_algo_7 failed');
|
||||
end;
|
||||
|
||||
options_.dynatol.f=1e-10;
|
||||
@#define J = [0,1,2,3,4,9,10]
|
||||
@#for solve_algo_iter in J
|
||||
|
||||
perfect_foresight_setup(periods=200);
|
||||
perfect_foresight_solver(stack_solve_algo=7,solve_algo=@{solve_algo_iter});
|
||||
|
||||
if ~oo_.deterministic_simulation.status
|
||||
error('Perfect foresight simulation failed')
|
||||
end
|
||||
|
||||
rplot Consumption;
|
||||
rplot Capital;
|
||||
|
||||
D = load('rbc_det_results');
|
||||
if isoctave && options_.solve_algo==0
|
||||
%%acount for somehow weaker convergence criterion in Octave's fsolve
|
||||
tol_crit=1e-4;
|
||||
else
|
||||
tol_crit=1e-8;
|
||||
end
|
||||
if norm(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead)) > tol_crit;
|
||||
disp(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead));
|
||||
error(sprintf('rbc_det_stack_solve_algo_7 failed with solve_algo=%u',options_.solve_algo));
|
||||
end;
|
||||
@#endfor
|
|
@ -0,0 +1,116 @@
|
|||
var Capital, Output, Labour, Consumption, Efficiency, efficiency, ExpectedTerm;
|
||||
|
||||
varexo EfficiencyInnovation;
|
||||
|
||||
parameters beta, theta, tau, alpha, psi, delta, rho, effstar, sigma2;
|
||||
|
||||
beta = 0.9900;
|
||||
theta = 0.3570;
|
||||
tau = 2.0000;
|
||||
alpha = 0.4500;
|
||||
psi = -0.1000;
|
||||
delta = 0.0200;
|
||||
rho = 0.8000;
|
||||
effstar = 1.0000;
|
||||
sigma2 = 0;
|
||||
|
||||
model;
|
||||
|
||||
// Eq. n°1:
|
||||
efficiency = rho*efficiency(-1) + EfficiencyInnovation(+2); // Use a lead of two to test the maximum_lag logic
|
||||
|
||||
// Eq. n°2:
|
||||
Efficiency = effstar*exp(efficiency);
|
||||
|
||||
// Eq. n°3:
|
||||
Output = Efficiency*(alpha*(Capital(-1)^psi)+(1-alpha)*(Labour^psi))^(1/psi);
|
||||
|
||||
// Eq. n°4:
|
||||
Capital = Output-Consumption + (1-delta)*Capital(-1);
|
||||
|
||||
// Eq. n°5:
|
||||
((1-theta)/theta)*(Consumption/(1-Labour)) - (1-alpha)*(Output/Labour)^(1-psi);
|
||||
|
||||
// Eq. n°6:
|
||||
(((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption = ExpectedTerm(1);
|
||||
|
||||
// Eq. n°7:
|
||||
ExpectedTerm = beta*((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)*(alpha*((Output/Capital(-1))^(1-psi))+(1-delta));
|
||||
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
efficiency = EfficiencyInnovation/(1-rho);
|
||||
Efficiency = effstar*exp(efficiency);
|
||||
Output_per_unit_of_Capital=((1/beta-1+delta)/alpha)^(1/(1-psi));
|
||||
Consumption_per_unit_of_Capital=Output_per_unit_of_Capital-delta;
|
||||
Labour_per_unit_of_Capital=(((Output_per_unit_of_Capital/Efficiency)^psi-alpha)/(1-alpha))^(1/psi);
|
||||
Output_per_unit_of_Labour=Output_per_unit_of_Capital/Labour_per_unit_of_Capital;
|
||||
Consumption_per_unit_of_Labour=Consumption_per_unit_of_Capital/Labour_per_unit_of_Capital;
|
||||
|
||||
% Compute steady state share of capital.
|
||||
ShareOfCapital=alpha/(alpha+(1-alpha)*Labour_per_unit_of_Capital^psi);
|
||||
|
||||
% Compute steady state of the endogenous variables.
|
||||
Labour=1/(1+Consumption_per_unit_of_Labour/((1-alpha)*theta/(1-theta)*Output_per_unit_of_Labour^(1-psi)));
|
||||
Consumption=Consumption_per_unit_of_Labour*Labour;
|
||||
Capital=Labour/Labour_per_unit_of_Capital;
|
||||
Output=Output_per_unit_of_Capital*Capital;
|
||||
ExpectedTerm=beta*((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)
|
||||
*(alpha*((Output/Capital)^(1-psi))+1-delta);
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
||||
ik = varlist_indices('Capital',M_.endo_names);
|
||||
CapitalSS = oo_.steady_state(ik);
|
||||
|
||||
histval;
|
||||
Capital(0) = CapitalSS/2;
|
||||
end;
|
||||
|
||||
|
||||
perfect_foresight_setup(periods=200);
|
||||
|
||||
perfect_foresight_solver(stack_solve_algo=7,solve_algo=1);
|
||||
|
||||
if ~oo_.deterministic_simulation.status
|
||||
error('Perfect foresight simulation failed')
|
||||
end
|
||||
|
||||
rplot Consumption;
|
||||
rplot Capital;
|
||||
|
||||
D = load('rbc_det_results');
|
||||
|
||||
if norm(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead)) > 1e-30;
|
||||
disp(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead));
|
||||
error('rbc_det_stack_solve_algo_7 failed');
|
||||
end;
|
||||
|
||||
options_.dynatol.f=1e-10;
|
||||
@#define J = [0,1,2,3,4,9,10]
|
||||
@#for solve_algo_iter in J
|
||||
|
||||
perfect_foresight_setup(periods=200);
|
||||
perfect_foresight_solver(stack_solve_algo=7,solve_algo=@{solve_algo_iter});
|
||||
|
||||
if ~oo_.deterministic_simulation.status
|
||||
error('Perfect foresight simulation failed')
|
||||
end
|
||||
|
||||
rplot Consumption;
|
||||
rplot Capital;
|
||||
|
||||
D = load('rbc_det_results');
|
||||
if isoctave && options_.solve_algo==0
|
||||
%%acount for somehow weaker convergence criterion in Octave's fsolve
|
||||
tol_crit=1e-4;
|
||||
else
|
||||
tol_crit=1e-8;
|
||||
end
|
||||
if norm(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead)) > tol_crit;
|
||||
disp(D.oo_.endo_simul(:,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead));
|
||||
error(sprintf('rbc_det_stack_solve_algo_7 failed with solve_algo=%u',options_.solve_algo));
|
||||
end;
|
||||
@#endfor
|
Loading…
Reference in New Issue