Does this answer apply to “simul”, too? I am trying to estimate the parameters by matching the deterministic path (rather than the IRF). In each iteration of SMM, I change the parameter value by “set_param_value” and run “simul” to obtain the deterministic transition path. I however wonder whether I also have to recompute and change “initval” and “endval” (i.e., the old and new steady state) in each iteration, because those values must be changed when I change the parameters.
Oh, Really… Do we have a good way to reset “initval” and “endval” before running “simul” in each loop? I mean, how can I reset these values in each iteration as I change the parameter values by “set_param_value”? Thanks.
As you point out, I think it depends on how to compute the steady state. My code is like the following. I should:
(1) loop over “perfect_foresight_solver” rather than “simul”, and
(2) compute the steady-state for the initial and end point, and replace the initial and end value of “oo_.endo_simul” by these new steady state values, before running “perfect_foresight_solver”,
I am sorry to ask such a primitive question, but how do I compute the steady-state for both the initial point and the end point outside the mod-file? If I use “steady” after setting a new parameter value, it computes the steady state only at the end point.
When we loop over perfect_foresight_solver, do we also need to call perfect_foresight_setup before calling the solver?
When I looped over parameters, changed the first and last entry of oo_.endo_simul, and then called perfect_foresight_solver, the solver failed to converge at some iteration. But when I added `perfect_foresight_setup’, it worked fine.
perfect_foresight_setup should generally only change the initial and terminal condition in oo_endo_simul as well as set up oo_.exo_simul. In most applications you only need to call it once, but it’s hard to make general statements.