diff --git a/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m b/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m index 105de132fa3e472f482d64268a85d51d46835f54..22996f1cd1feef3da549eec4eaf2a3a674ebced1 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m +++ b/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m @@ -75,11 +75,11 @@ while info_period <= periods options_.simul.last_simulation_period = dates(); if info_period > 1 && homotopy_completion_share < 1 && options_.simul.homotopy_marginal_linearization_fallback > 0 - marginal_linearization_previous_raw_sims.sim1.endo_simul = oo_.deterministic_simulation.sim1.endo_simul(:, info_period:end); - marginal_linearization_previous_raw_sims.sim1.exo_simul = oo_.deterministic_simulation.sim1.exo_simul(info_period:end, :); + marginal_linearization_previous_raw_sims.sim1.endo_simul = oo_.deterministic_simulation.sim1.endo_simul(:, increment+1:end); + marginal_linearization_previous_raw_sims.sim1.exo_simul = oo_.deterministic_simulation.sim1.exo_simul(increment+1:end, :); marginal_linearization_previous_raw_sims.sim1.homotopy_completion_share = oo_.deterministic_simulation.sim1.homotopy_completion_share; - marginal_linearization_previous_raw_sims.sim2.endo_simul = oo_.deterministic_simulation.sim2.endo_simul(:, info_period:end); - marginal_linearization_previous_raw_sims.sim2.exo_simul = oo_.deterministic_simulation.sim2.exo_simul(info_period:end, :); + marginal_linearization_previous_raw_sims.sim2.endo_simul = oo_.deterministic_simulation.sim2.endo_simul(:, increment+1:end); + marginal_linearization_previous_raw_sims.sim2.exo_simul = oo_.deterministic_simulation.sim2.exo_simul(increment+1:end, :); marginal_linearization_previous_raw_sims.sim2.homotopy_completion_share = oo_.deterministic_simulation.sim2.homotopy_completion_share; else marginal_linearization_previous_raw_sims = []; diff --git a/tests/deterministic_simulations/pfwee_homotopy_marginal_linearization.mod b/tests/deterministic_simulations/pfwee_homotopy_marginal_linearization.mod index d884a102905ec1ead15e808728d6f46096313845..1151349d3f42a0a5f84f16636bd95cefe49f3b07 100644 --- a/tests/deterministic_simulations/pfwee_homotopy_marginal_linearization.mod +++ b/tests/deterministic_simulations/pfwee_homotopy_marginal_linearization.mod @@ -32,6 +32,12 @@ endval(learnt_in = 5); LoggedProductivityInnovation = 1; end; +shocks(learnt_in = 3); + var LoggedProductivityInnovation; + periods 4; + values 0.2; +end; + perfect_foresight_with_expectation_errors_setup(periods=200); perfect_foresight_with_expectation_errors_solver(homotopy_max_completion_share = 0.8, homotopy_marginal_linearization_fallback, steady_solve_algo = 13);