Skip to content
Snippets Groups Projects
Commit 24e1c499 authored by MichelJuillard's avatar MichelJuillard
Browse files

simulations: draw random shocks so that, given a seed, the sequence is the...

simulations: draw random shocks so that, given a seed, the sequence is the same, independently of the number of periods
parent cf6772bc
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,9 @@ chol_S = chol(DynareModel.Sigma_e(i_exo_var,i_exo_var));
for i=1:replic
if ~isempty(DynareModel.Sigma_e)
DynareResults.exo_simul(:,i_exo_var) = randn(DynareOptions.periods,nxs)*chol_S;
% we fill the shocks row wise to have the same values
% independently of the length of the simulation
DynareResults.exo_simul(:,i_exo_var) = randn(nxs,DynareOptions.periods)'*chol_S;
end
y_ = simult_(y0,dr,DynareResults.exo_simul,order);
% elimninating initial value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment