Perfect foresight simulation with initial values off steady state

Hello everyone,

I am trying to simulate the Ramsey-Cass-Koopmans model (deterministic) starting from initial values that off the steady state to see a path of convergence. However, I am getting the paths for k and c with all their values at their steady states (k,c)=(1.7378,0.9186). How to fix that (chatGPTs suggestions didn’t work so far)?
In addition, what is the correct way to specify the equation for capital: as a forward looking k(+1) = (1/GL_tilda)*((1-delta)k+k^alpha-c); or a backward looking k = (1/GL_tilda)((1-delta)*k(-1)+k(-1)^alpha-c);? Both cases produce the same result.

Thank you.

Argyn

Here is the mod-file:

var GL_tilda, k, c;

parameters gga, ggl, delta, theta, alpha, beta;
    gga = 1.03; % gross growth rate of productivity
    ggl = 1.02; % gross growth rate of population
    delta = 0.1; % depreciation rate 
    theta = 3; % coefficient of CRRA
    alpha = 0.3; % income share of capital
    beta = 0.99; % what is the value for beta to match ? 4% growth rate

steady_state_model;
    GL_tilda = gga*ggl;
    k = ((gga^theta/beta - 1 + delta)/alpha)^(1/(alpha-1));
    c = (1-delta)*k+k^alpha-GL_tilda*k;
end;

steady;
check;
model_diagnostics;

model;
    % Assume F(K, L_tilda) = K^alpha*(A*L)^(1-alpha) => f(k) = k^alpha
    % kstar = (((1+ga)^theta/beta - 1 + delta)/alpha)^(1/(alpha-1));
    GL_tilda = gga*ggl;
        
    k(+1) = (1/GL_tilda)*((1-delta)*k+k^alpha-c);
    % k = (1/GL_tilda)*((1-delta)*k(-1)+k(-1)^alpha-c);                              
    c(+1) = (1/gga)*beta^(1/theta)*(1-delta+alpha*k^(alpha-1))^(1/theta)*c;   
    
end;

initval;
    % NE quadrant
    k = 5;
    c = 2;
end;

perfect_foresight_setup(periods=50);
perfect_foresight_solver;

rplot k, c;

Try rck.mod (1.2 KB)
It has the correct timing and the correct initial and terminal condition setup.

Professor Pfeifer thank you.
It works.
Is there a link to better understand why did those changes?

  1. Proper perfect foresight simulations regularly require a terminal condition typically set with endval. That is for example documented in the manual.
  2. The timing convention for predetermined states is also documented in the manual.

The slides at deterministic.pdf · master · Sébastien Villemot / perfect-foresight-slides · GitLab may also be helpful.