Transition path: equilibrium conditions do not hold at end

Hey,

Thank you for help in advance! I really appreciate it.

I’m learning to solve for a transition path from one steady state to another using dynare. Specifically, I use the RBC model provided by dynare, ‘ramst.mod’ and try to simulate the transition path following a permanent shock in “x”, the technology parameter.

The problem is that, the equilibrium conditions do not hold for the end of the simulated path: i.e.

given the model,

model; c + k - aa*x*k(-1)^alph - (1-delt)*k(-1); // Resource constraint c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam); // Euler equation end;

if I set initval x=0.8, and in endval x=0.9, set the simulation periods=20, and check the resource constraint condition for the final period:

x=oo_.exo_simul;
tt=22;
c(tt) + k(tt) - aa*x(tt)*k(tt-1)^alph - (1-delt)*k(tt-1) //check the resource constraint

ans =

    1.4732

The resource constraint does not hold at the end. I am wondering if I could use dynare to solve a transition path, where for each point on the path, including the end, the equilibrium conditions hold?

i attached my code. i have searched for similar issues, but only came up with this thread that may or may not be similar to the problem i am having. Thank you for your time in advance.

Sincerely,
Anita
ramst.mod (2.1 KB)

I am not following. If you use

x=oo_.exo_simul; tt=20 c(tt)^(-gam) - (1+bet)^(-1)*(aa*alph*x(tt)*k(tt)^(alph-1) + 1 - delt)*c(tt+1)^(-gam) c(tt) + k(tt) - aa*x(tt)*k(tt-1)^alph - (1-delt)*k(tt-1)
the FOCs hold for all tt (up to numerical approximation error of about 10e-7)

Thank you for your reply. To clarify, let us try tt=22 (under a simulation period of 20 “simul(periods=20);”). It turns out that “c(tt) + k(tt) - aa*x(tt)*k(tt-1)^alph - (1-delt)*k(tt-1)” gives 1.4732. Hence the FOC is not satisfied. I wonder if there is any way to let tt=22 also satify the FOC. Thanks

[quote=“jpfeifer”]I am not following. If you use

x=oo_.exo_simul; tt=20 c(tt)^(-gam) - (1+bet)^(-1)*(aa*alph*x(tt)*k(tt)^(alph-1) + 1 - delt)*c(tt+1)^(-gam) c(tt) + k(tt) - aa*x(tt)*k(tt-1)^alph - (1-delt)*k(tt-1)
the FOCs hold for all tt (up to numerical approximation error of about 10e-7)[/quote]

No. The FOCs govern optimal transition behavior. Jumping to the new steady state more quickly, i.e. in 20 periods would force the HH into off-equilibrium behavior. You cannot fix a starting and an endpoint of the endogenous variables and simultaneously fix the transition behavior embedded in the FOCs.
It will take more time to converge to the new steady state. Thus, you should increase the number of periods.

thank you for your suggestion. i increase the simulation periods and it converges to steady state now. i think i previously had a wrong understanding of the command “simul”. thank you again for the clarification