# Transition path in the simplest RBC model

**URL:** <https://forum.dynare.org/t/transition-path-in-the-simplest-rbc-model/20852>\
**Category:** Perfect foresight simulations\
**Created:** [6 August 2022 22:17 UTC](https://forum.dynare.org/t/transition-path-in-the-simplest-rbc-model/20852 "2022-08-06T22:17:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sslan](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@sslan](https://forum.dynare.org/u/sslan)\
**Post date:** [6 August 2022 22:17 UTC](https://forum.dynare.org/t/transition-path-in-the-simplest-rbc-model/20852/1 "2022-08-06T22:17:18Z")

</div>

Dear Professor Johannes Pfeifer,

I am trying to compute the transition path for the simplest rbc model with log utility and full depreciation. I am unable to find a reasonable transition path (although the “solution is found”, it does not find it, as you can see in the figure).

I have tried with multiple solvers. There appear to be no problem if delta (the depreciation rate) is set to a sufficiently low value. Do you have any insight on what could be the issue? I was trying to implement several simple algorithms for the case that we have a closed form solution, and I was surprised that I cannot get the path with Dynare.

Thanks a lot in advance for you time. The code is below.

Sergio

```auto
%--Solving a simple RBC model
var c k;
predetermined_variables k;

parameters alpha bet delta sigma k_b;

alpha = 0.27; %parameter production function f=k^alpha
bet = 0.994; %discount factor
delta = 1; %depreciation rate
sigma = 1; %risk aversion
k_b = (alpha*bet/(1-bet*(1-delta)))^(1/(1-alpha)); %k in steady state

model;

%--- Eq 1 resource constraint

k(+1)-(1-delta)*k+c = k^alpha;

%--- Eq 2 Euler equation

c^(-sigma) = bet*c(+1)^(-sigma)*(alpha*k^(alpha-1)+1-delta);

end;

initval;
k = 0.1*k_b;
end;

endval;
k = k_b;
c = k_b^alpha-delta*k_b;
end;

resid;

perfect_foresight_setup(periods=200);
perfect_foresight_solver;
%perfect_foresight_solver(stack_solve_algo=7, solve_algo=9);

rplot k;

```

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 August 2022 07:35 UTC](https://forum.dynare.org/t/transition-path-in-the-simplest-rbc-model/20852/2 "2022-08-08T07:35:10Z")

</div>

It needs to be `k(+1)` in your Euler equation.

---

<div class="post-metadata">

**Author:** ![sslan](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@sslan](https://forum.dynare.org/u/sslan)\
**Post date:** [8 August 2022 15:46 UTC](https://forum.dynare.org/t/transition-path-in-the-simplest-rbc-model/20852/3 "2022-08-08T15:46:02Z")

</div>

Thank you Professor,

Best regards,

Sergio
