Endval for exogenous shocks in deterministic simulation


I want to get the transition path for initial TFP process (exogenous variable) with 0<rho<1:

when the process changes permanently in period 2 (and this is known in period 1) to:

What i did is the following:

[code]model block: z = rhoz(-1) + sigma + epssigma; (the NEW process)
initval: z = 0;
endval: z=(1-rho)*sigma;

shocks in eps:
periods 1 2:1000;
values -1 0; %the -1 is to keep z(1)=0;[/code]

When I get the results I see that z(2)=sigma/(1-rho); What did i do wrong? I thought it would calculate: z(2)=rho*z(-1) + sigma = sigma; but id doesnt. I havent used steady either.

(I know that I could get the correct result by setting the initval: z=0 and then add a shock eps=1 for period 2:1000, but i want to understand how to model it with initval and endval)

Thanks for your help!

For endogenous variables, initval and endval are for setting initial and terminal conditions. Everything else will be endogenously computed. As z is purely backward looking, the only things that matter are the initial value for z you assign and the subsequent shock values. What you are not telling is what you did with sigma.