I see. You can verify in oo_.exo_simul that the exogenous variable you set is correctly set. The variable you are talking about an endogenous variable (‘z_shock’). It’s value for periods 2 to 301 are solved for given the terminal condition you provided in endval and the initial condition provided via initval. In the endval-block you did not set z_shock, which explains your picture above. That being said, given that z_shock is not forward-looking, the value in the last period does not matter.
But if you simulate the model for lets say 1000 periods you can see in oo_.endo_simul that the varibales have converged to the new steady state after 200 periods.
However, in the end at period 1002 the model is back in the steady state of period 1.
So if it is not z_shock what causes this then? I want the model to stay in this new steady state forever.
That is only true if your model does not feature forward-looking variables. You did not instruct the code to end in the terminal steady state. For that to be the case, you need to set not only the exogenous variables, but also the other variables. As documented, you need to put steady after endval-block. However, your steady_state file is not correct. You set z_shock=0.34456;
but that is not correct. The model equation is z_shock=z_L+epsilon;
so the file must work for any value of epsilon provided in the input exo to the steady state file.