Numerical Implementation: Ramsey-Cass-Koopmans Model

Project Date:

View Code on GitHub

Timeline: Sep 2025 - Dec 2025
Tech Stack: Python, NumPy, Matplotlib
Code Repository: View on GitHub
Project Report: Download PDF

Project Overview

The Ramsey-Cass-Koopmans (RCK) model is a foundational neoclassical growth model that endogenizes the savings rate through intertemporal utility maximization. Unlike the simpler Solow-Swan model, the RCK model results in a system of non-linear Ordinary Differential Equations (ODEs) where the steady state is a saddle point. The RCK model extends the Solow-Swan growth model by endogenizing the savings rate. Instead of a fixed savings rate, a representative household maximizes utility over an infinite horizon, leading to a dynamic optimization problem.

Key Technical Challenges & Solutions

1. The Stability Problem

The system is characterized by the following dynamic equations for capital ($k$) and consumption ($c$):

\[\frac{dk}{dt} = k^\alpha - c - (n + g + \delta)k\] \[\frac{dc}{dt} = c \left[ \frac{1}{\rho} (\alpha k^{\alpha-1} - \delta - \theta - n) - g \right]\]

Standard numerical integration methods (like Runge-Kutta via scipy.integrate.solve_ivp) fail to trace the saddle path accurately because any infinitesimal deviation from the path grows exponentially in forward time.

2. Custom Backward Integration

To visualize the correct trajectory, I implemented a custom backward integration algorithm in Python.

  • Methodology: Instead of solving from $k_0$ forward (which is unstable), I linearized the system around the steady state $(k^, c^)$ to find the stable eigenvector.
  • Implementation: I initialized the system at a small $\epsilon$ distance from the steady state along the stable eigenvector and integrated backwards in time ($dt < 0$).
  • Result: This successfully reconstructed the global non-linear saddle path that dictates optimal consumption behavior.

Visualizations

The plot below demonstrates the algorithm’s success. The red line represents the computed saddle path (optimal consumption rule) converging to the steady state (green dot), cutting through the unstable vector field.

Phase Portrait of RCK Model