Lecture Support: Solow Growth Model: 2020-01-23

In [1]:
# prepare the python environment with the numerical
# analysis package (np), the database package (pd), &
# the matlab clone plotting package (plt):

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

L_0 = 1
n = 0.00
L = [L_0]
T=200

for t in range(T):
    L = L + [L[t]*np.exp(n)]
    
solow_df = pd.DataFrame()
solow_df['L'] = L

solow_df.L.plot()

plt.show()
<Figure size 640x480 with 1 Axes>
In [2]:
E_0 = 1
g = 0.005
E = [E_0]

for t in range(200):
    E = E + [E[t]*np.exp(g)]

solow_df['E'] = E

solow_df.plot()

plt.show()

(2.1.2) $ Y = \kappa^\theta E L $

(2.2.2) $ \ln(Y) = \theta\ln(\kappa) + \ln(L) + \ln(E) $

(2.2.3) $ \frac{1}{Y}\frac{dY}{dt} = g_Y = \theta \left( \frac{1}{\kappa}\frac{d\kappa}{dt} \right) + \frac{1}{L}\frac{dL}{dt} + \frac{1}{E}\frac{dE}{dt} $

$ g_Y = \theta g_{\kappa} + n + g $

(2.1.14) $ \frac{dK}{dt} = sY - \delta K = \left( \frac{s}{\kappa} - \delta \right)K $

(2.2.5) $ \frac{1}{K}\frac{dK}{dt} = g_{K} = \frac{s}{\kappa} - \delta $

So the proportional rate of growth of capital-intensity $ \kappa $ is:

(2.2.8) $ g_\kappa = g_K - g_Y = \left( \frac{s}{\kappa} - \delta \right) - \left( \theta g_{\kappa} + n + g \right) $

$ (1+\theta) g_\kappa = \frac{s}{\kappa} - \delta - n - g $

(2.2.9) $ g_\kappa = \frac{s/\kappa - (n+g+\delta)}{1+\theta} $

In [5]:
κ_0 = 16
κ = [κ_0]
s = 0.20
δ = 0.025
θ = 1

for t in range(T):
    κ = κ + [κ[t]*(1 + (s/κ[t] - (n+g+δ))/(1+θ))]

    
solow_df['κ'] = κ

solow_df.κ.plot()

plt.show()
In [7]:
Y = []
K = []
y = []

for t in range(T+1):
    Y = Y + [κ[t]**θ*E[t]*E[t]]
    K = K + [κ[t]*Y[t]]
    y = y + [Y[t]/L[t]]

solow_df['Y'] = Y
solow_df['K'] = K
solow_df['y'] = y


solow_df.plot()

plt.show()   
In [ ]: