Option endval_steady in perfect_foresight_setup command

Dear team,

Since Dynare 6 there is an option endval_steady in the perfect_foresight_setup command. It uses the homotopy method to jointly find the terminal steady state and the corresponding perfect foresight solution. I find it extremely useful for simulating large shocks.

It works fine for a simulation with an initval block plus endval block (with or without shocks).

It doesn’t work, however, for a simulation with a histval block plus initval block. Please see the files attached to replicate.

I guess this isn’t a bug because per my understanding the homotopy methods helps with moving from one steady state to another and not from historical values to a terminal steady state. Nevertheless, could it be useful to have endval_steady start from the steady state associated with the historical values and then move to the terminal steady state in case of histval and initval blocks?

Best,
Christian

debugging_endval_steady_issue.zip (468.9 KB)