{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Solow-Swan growth model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Interactive version available at https://mybinder.org/v2/gh/marcinbielecki/Advanced_Macroeconomics/master as `Solow-Swan.ipynb`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us start the lecture by taking a look at the differences in GDP per capita across countries. Throughout this lecture we will mostly use the data from the 9th version of the [Penn World Table](https://www.rug.nl/ggdc/productivity/pwt/) database." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Make graphs appear within notebook\n", "%matplotlib inline\n", "\n", "# Import numerical computations library\n", "import numpy as np\n", "\n", "# Import dataframe management library\n", "import pandas as pd\n", "\n", "# Import statistics library\n", "import statsmodels.api as sm\n", "\n", "# Import statistics library, allows R-like regression syntax\n", "import statsmodels.formula.api as smf\n", "\n", "# Import plotting library\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Restore old behavior of rounding default axis ranges\n", "import matplotlib as mpl\n", "\n", "mpl.rcParams['axes.autolimit_mode'] = 'round_numbers'\n", "mpl.rcParams['axes.xmargin'] = 0\n", "mpl.rcParams['axes.ymargin'] = 0" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Read dataset\n", "pwt = pd.read_stata('data/PWT/pwt90.dta')\n", "\n", "# Modify the dataset so that it is easier to work with\n", "\n", "# Store country names and codes for later use\n", "countries = pwt['country']\n", "countries = countries.drop_duplicates()\n", "\n", "countrycodes = pwt['countrycode']\n", "countrycodes = countrycodes.drop_duplicates()\n", "\n", "# Set MultiIndex\n", "pwt.set_index(['country', 'year'], inplace=True)\n", "# pwt.tail()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Extract data for GDP per capita in 2014\n", "gdp_pc_2014 = (pwt.xs(2014, level='year')['rgdpe']/\n", " pwt.xs(2014, level='year')['pop'])\n", "\n", "# Plot histogram\n", "plt.hist(gdp_pc_2014)\n", "\n", "plt.title('Histogram of GDP per capita in 2014')\n", "plt.xlabel('GDP per capita (2011 \\$)')\n", "plt.ylabel('Number of countries')\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Data is highly skewed -- maybe better display in logarithms of base 10\n", "\n", "log10_bins_2014 = np.logspace(np.log10(np.min(gdp_pc_2014)),\n", " np.log10(np.max(gdp_pc_2014)),\n", " num=1+10, base=10)\n", "\n", "plt.hist(gdp_pc_2014, bins=log10_bins_2014, histtype='bar', rwidth=0.8)\n", "\n", "plt.xscale('log')\n", "\n", "plt.xlim(500, 200000)\n", "\n", "plt.xticks([500, 1000, 2000, 5000, 10000, 20000, 50000, 100000], \n", " [500, 1000, 2000, 5000, 10000, 20000, 50000, 100000])\n", "\n", "plt.title('Histogram of GDP per capita in 2014')\n", "plt.xlabel('GDP per capita (2011 \\$)')\n", "plt.ylabel('Number of countries')\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# List countries with very high GDP per capita\n", "gdp_pc_2014[gdp_pc_2014 > 50000]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Plot the population-weighted distribution of GDP per capita in given years\n", "\n", "plt.subplots(figsize = (7, 4))\n", "\n", "for i, year in enumerate([1960, 1985, 2014]):\n", " sl = pwt.xs(year, level='year').dropna(subset=['rgdpe','pop'])\n", " pop_tot = np.sum(sl['pop'])\n", "\n", " weighted = sm.nonparametric.KDEUnivariate(np.log(sl['rgdpe']/sl['pop']))\n", " weighted.fit(bw=0.3, fft=False, weights=sl['pop'])\n", " plt.plot(np.exp(weighted.support), \n", " weighted.density/np.sum(weighted.density), \n", " lw=2, label='{0}'.format(year))\n", "\n", "plt.xscale('log')\n", "\n", "plt.xticks([200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000], \n", " [200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000])\n", " \n", "plt.legend(frameon=False)\n", "\n", "plt.xlim(2e2, 2e5)\n", "\n", "plt.title('GDP per capita population-weighed density')\n", "plt.xlabel('GDP per capita (2011 \\$)')\n", "plt.ylabel('Population density')\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Plot the histogram of average growth rates\n", "\n", "x_70 = pwt.xs(1970, level='year')['rgdpe']/pwt.xs(1970, level='year')['pop']\n", "\n", "x_14 = pwt.xs(2014, level='year')['rgdpe']/pwt.xs(2014, level='year')['pop']\n", "\n", "g = 100*((x_14/x_70)**(1/(2014-1970))-1)\n", "\n", "plt.hist(g.dropna(), np.arange(1.5, 2.5, 0.5), histtype='bar', rwidth=0.8, fc='darkgrey', label='Developed countries')\n", "plt.hist(g.dropna(), np.arange(-10, 2, 0.5), histtype='bar', rwidth=0.8, fc='C3', label='Lagging behind')\n", "plt.hist(g.dropna(), np.arange(2, 10, 0.5), histtype='bar', rwidth=0.8, fc='C2', label='Catching up')\n", "\n", "plt.xlim(-4, 8)\n", "\n", "plt.title('Histogram of GDP per capita growth rates')\n", "plt.xlabel('Annual GDP per capita growth rate, 1970-2014 (%)')\n", "plt.ylabel('Number of countries')\n", "\n", "plt.legend(frameon=False)\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "What want to explain the following set of facts:\n", "\n", "- There is high dispersion in GDP per capita across countries\n", "- The developed countries keep growing\n", "- Some (but not all) developing countries (notably China and India) are catching up to the developed countries" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Recall that in the course we have assumed that production depends on capital and workers\n", "\n", "gdp_pw_2014 = (pwt.xs(2014, level='year')['rgdpna']/\n", " pwt.xs(2014, level='year')['emp'])\n", "\n", "k_pw_2014 = (pwt.xs(2014, level='year')['rkna']/\n", " pwt.xs(2014, level='year')['emp'])\n", "\n", "pop_2014 = pwt.xs(2014, level='year')['pop']\n", "\n", "plt.scatter(k_pw_2014, gdp_pw_2014, s=pop_2014, alpha=0.5)\n", "\n", "plt.xscale('log')\n", "plt.yscale('log')\n", "\n", "plt.xlim(1e3, 1e6)\n", "plt.ylim(1e3, 3e5)\n", "\n", "# Add a simple trend line\n", "fit = np.polyfit(np.log(k_pw_2014.dropna()), np.log(gdp_pw_2014).dropna(), deg=1)\n", "plt.plot(k_pw_2014.dropna(), np.exp(fit[1]) * k_pw_2014.dropna()**fit[0], color='C3', lw=2)\n", "\n", "plt.title('Capital per worker vs GDP per worker in 2014')\n", "plt.xlabel('Capital stock per worker (2011 \\$)')\n", "plt.ylabel('GDP per worker (2011 \\$)')\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The model\n", "\n", "Authors: [Robert Solow (1956)](https://www.jstor.org/stable/1884513) and [Trevor Swan (1956)](http://onlinelibrary.wiley.com/doi/10.1111/j.1475-4932.1956.tb00434.x/abstract)\n", "\n", "Assumptions and simplifications:\n", "- One sector economy: produces a single good that can be either consumed or invested\n", "- Complete information, no externalities\n", "- Markets for the final good and factors of production are perfectly competitive\n", "- Closed economy and no government\n", "- Two types of representative agents: firms and households\n", "- Firms optimize, while households do not\n", "- Households own capital and labor and rent them to the firms\n", "- Households save a fixed fraction of their income\n", "- Output is produced according to a neoclassical production fuction\n", "\n", "A consequence of the (Closed economy and no government) assumption is that private savings are equal to private investment. This is an accounting identity and says nothing about any causal relationships between savings and investment.\n", "\n", "Start from the national accounting identity and assume no government ($G=0$) and no international trade ($NX=0$):\n", "\n", "\\begin{align}\n", "Y=C+I+\\underbrace{G}_{0}+\\underbrace{NX}_{0}\\quad\\to\\quad Y=C+I\n", "\\end{align}\n", "\n", "Then consider the disposition of households' disposable income $Y^{d}$ between consumption and savings. If there is no government, taxes $T=0$ and disposable income is equal to the economy's output:\n", "\\begin{align}\n", "Y^{d}=C+S\\quad\\text{and}\\quad Y^{d}=Y-\\underbrace{T}_{0}\\quad\\to\\quad Y=C+S\n", "\\end{align}\n", "\n", "Together those two accounting exercises yield the result that savings are equal to investment:\n", "\\begin{align}\n", "Y=C+I\\quad\\text{and}\\quad Y=C+S\\quad\\to\\quad S=I\n", "\\end{align}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Three core equations\n", "\n", "1. Capital accumulation (accounting identity)\n", "\n", "\\begin{align}\n", "\\dot{K}_{t} = I_{t} - \\delta K_{t}\n", "\\end{align}\n", "\n", "2. Output is produced using capital $K$ and labor $L$, using technology $A$, and the production function $F$ is neoclassical (functional restriction)\n", "\n", "\\begin{align}\n", "Y_{t} = F \\left( K_{t}, L_{t}, A_{t} \\right)\n", "\\end{align}\n", "\n", "3. Investment / saving decisions: households save a constant fraction $s$ of their income (behavioral assumption)\n", "\n", "\\begin{align}\n", "I_{t} = S_{t} = s \\cdot Y_{t}\n", "\\end{align}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Fundamental equation of the Solow-Swan model\n", "\n", "By combining the three core equations of the model, we get the following relationship:\n", "\n", "\\begin{align}\n", "\\dot{K}_{t} = s F \\left( K_{t}, L_{t}, A_{t} \\right) - \\delta K_{t}\n", "\\end{align}\n", "\n", "Next we will use the properties of the neoclassical production function to simplify the above equation." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Neoclassical production function\n", "\n", "A production function describes how capital $K$ and labor $L$, using technology $A$, is transformed into output $Y$:\n", "\n", "\\begin{align}\n", "Y = F \\left( K, L, A \\right)\n", "\\end{align}\n", "\n", "A neoclassical production function $F$ has the following properties:\n", "\n", "- Continuous and at least twice differentiable\n", "\n", "- Constant returns to scale in $K$ and $L$. Multiplying both capital and labor inputs by a certain proportion $z$ translates to multiplying produced output by that same proportion $z$:\n", "\n", "\\begin{align}\n", "F\\left(z \\cdot K, \\cdot z \\cdot L, A \\right) = z \\cdot F \\left( K, L, A \\right) = z \\cdot Y \\quad \\text{for all } z > 0\n", "\\end{align}\n", "\n", "- Positive but diminishing marginal products of $K$ and $L$:\n", "\n", "\\begin{align}\n", "\\frac{\\partial F \\left( K, L, A \\right)}{\\partial K} \\equiv F_{K} \\left( K, L, A \\right) > 0 \\quad &\\text{and} \\quad \n", "\\frac{\\partial^{2} F \\left( K, L, A \\right)}{\\partial K^{2}} \\equiv F_{KK} \\left( K, L, A \\right) < 0 \\\\\n", "\\frac{\\partial F \\left( K, L, A \\right)}{\\partial L} \\equiv F_{L} \\left( K, L, A \\right) > 0 \\quad &\\text{and} \\quad \n", "\\frac{\\partial^{2} F \\left( K, L, A \\right)}{\\partial L^{2}} \\equiv F_{LL} \\left( K, L, A \\right) < 0\n", "\\end{align}\n", "\n", "- (Optional) [Inada (1963)](https://www.jstor.org/stable/2295809) conditions:\n", "\n", "\\begin{align}\n", "\\lim_{K \\to 0} F_{K} \\left( K, L, A \\right) = \\infty \\quad &\\text{and} \\quad \n", "\\lim_{K \\to \\infty} F_{K} \\left( K, L, A \\right) = 0 \\quad \\text{for all } L > 0 \\\\\n", "\\lim_{L \\to 0} F_{L} \\left( K, L, A \\right) = \\infty \\quad &\\text{and} \\quad \n", "\\lim_{L \\to \\infty} F_{L} \\left( K, L, A \\right) = 0 \\quad \\text{for all } K > 0\n", "\\end{align}\n", "\n", "- (Optional) Necessity of both inputs:\n", "\n", "\\begin{align}\n", "F \\left( 0, L, A \\right) = F \\left( K, 0, A \\right) = 0\n", "\\end{align}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Solow-Swan model with population growth\n", "First let us consider the following case. Population $N$ (and thus labor force $L$) grows at a constant (possibly negative) rate $n$, while technology is constant at a level $\\bar{A}$:\n", "\n", "\\begin{align}\n", "\\frac{\\dot{L}_{t}}{L_{t}} = \\frac{\\dot{L}_{t}}{N_{t}} = n\n", "\\end{align}\n", "\n", "It is very convenient to define output per worker $y$ and capital per worker $k$:\n", "\n", "\\begin{align}\n", "y_{t} \\equiv \\frac{Y_{t}}{L_{t}} \\quad \\text{and} \\quad k_{t} \\equiv \\frac{K_{t}}{L_{t}}\n", "\\end{align}\n", "\n", "Use the constant returns to scale property of the neoclassical production function:\n", "\n", "\\begin{align}\n", "y_{t} = \\frac{Y_{t}}{L_{t}} = \\frac{1}{L_{t}} \\cdot F \\left( K_{t}, L_{t}, \\bar{A} \\right) = \n", "F \\left( \\frac{1}{L_{t}} \\cdot K_{t}, \\frac{1}{L_{t}} \\cdot L_{t}, \\bar{A} \\right) = \n", "F \\left( k_{t}, 1, \\bar{A} \\right) \\equiv f \\left( k_{t} \\right)\n", "\\end{align}\n", "\n", "where $f$ is called the production function in the intensive (per worker) form.\n", "\n", "We'll need the time derivative of capital per worker:\n", "\n", "\\begin{align}\n", "\\dot{k}_{t}=\\frac{\\mathrm{d}k_{t}}{\\mathrm{d}t}=\\frac{\\mathrm{d}\\left(K_{t}/L_{t}\\right)}{\\mathrm{d}t}=\\frac{\\left(\\mathrm{d}K_{t}/\\mathrm{d}t\\right)\\cdot L_{t}-K_{t}\\cdot\\left(\\mathrm{d}L_{t}/\\mathrm{d}t\\right)}{L_{t}^{2}}=\\frac{\\dot{K}_{t}}{L_{t}}-\\frac{K_{t}}{L_{t}}\\frac{\\dot{L}_{t}}{L_{t}}=\\frac{\\dot{K}_{t}}{L_{t}}-nk_{t}\n", "\\end{align}\n", "\n", "Therefore:\n", "\n", "\\begin{align}\n", "\\frac{\\dot{K}_{t}}{L_{t}}=\\dot{k}_{t}+nk_{t}\n", "\\end{align}\n", "\n", "Recall the fundamental equation of the model:\n", "\n", "\\begin{align}\n", "\\dot{K}_{t} = s F \\left( K_{t}, L_{t}, A_{t} \\right) - \\delta K_{t}\n", "\\end{align}\n", "\n", "We can now express it in terms of variables per worker:\n", "\n", "\\begin{align}\n", "\\dot{K}_{t} &= s F \\left( K_{t}, L_{t}, \\bar{A} \\right) - \\delta K_{t} \\qquad | \\quad : L_{t} \\\\\n", "\\frac{\\dot{K}_t}{L_{t}} &= s \\frac{F \\left( K_{t}, L_{t}, \\bar{A} \\right)}{L_{t}} -\\delta \\frac{K_{t}}{L_{t}} \\\\\n", "\\dot{k}_{t}+nk_{t} &= s f \\left( k_{t} \\right) -\\delta k_{t} \\\\\n", "\\dot{k}_{t} &= s f \\left( k_{t} \\right) - \\left( \\delta+n \\right) k_{t}\n", "\\end{align}\n", "\n", "Finally, we get a forward equation that determines the \"next period\" level of capital stock per worker as a function of current period level of capital per worker and model parameters:\n", "\n", "\\begin{align}\n", "k_{t+\\mathrm{d}t} \\equiv \\dot{k}_{t} + k_{t} = s f \\left( k_{t} \\right) - \\left( \\delta+n \\right) k_{t} + k_{t}\n", "\\end{align}\n", "\n", "Let us draw an example plot below, assuming that the production function is of the following Cobb-Douglas form:\n", "\n", "\\begin{align}\n", "F \\left( K, L \\right) = \\bar{A} K^{\\alpha} L^{1-\\alpha} \\quad \\to \\quad f \\left( k \\right) = \\bar{A} k^{\\alpha}\n", "\\end{align}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Parameter values (some of them are exaggerated to make the plot easier to read)\n", "A = 1\n", "α = 1/3\n", "δ = 0.75\n", "n = 0.05\n", "s = 0.8\n", "\n", "# Production function in intensive form\n", "def f(k):\n", " return k**α\n", "\n", "# Function for k_dot\n", "def k_dot(k):\n", " return s*A*f(k) - (δ+n)*k\n", "\n", "# Plot range\n", "k_star = ((s*A)/(δ+n))**(1/(1-α))\n", "kk = np.linspace(0, 2*k_star, 1000)\n", "\n", "# Make \"square\" plot\n", "plt.subplots(figsize = (5, 5))\n", "\n", "# Plot k_next function as well as k_next=k line\n", "plt.plot(kk, kk+k_dot(kk), lw=2)\n", "plt.plot(kk, kk)\n", "\n", "plt.hlines(k_star, 0, k_star, linestyle='dashed', lw=0.5)\n", "plt.vlines(k_star, 0, k_star, linestyle='dashed', lw=0.5)\n", "\n", "plt.title('\"Next period\" vs current period level of capital per worker')\n", "plt.xlabel('$k_{t}$')\n", "plt.ylabel('$k_{t+dt}$')\n", "\n", "plt.show()\n", "\n", "print('')\n", "print('Steady state level of capital per worker =', k_star)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "From the plot we can easily see that there is a level of $k$ for which the \"next period\" and current period level of capital are the same. We will call this level a **steady state** level of capital per worker, and we will denote it with $k^{*}$. The properties of the neoclassical production function guarantee that there is only one, positive level of $k^{*}$.\n", "\n", "Let us find the expression for the steady state level of capital per worker under the Cobb-Douglas production function, by setting $\\dot{k}=0$:\n", "\n", "\\begin{align}\n", "0 &= s \\bar{A} k^{\\alpha} - \\left( \\delta+n \\right) k\n", "\\end{align}\n", "\n", "\\begin{align}\n", "\\left( \\delta+n \\right) k &= s \\bar{A} k^{\\alpha} \\qquad | \\quad : k^{\\alpha} \\\\\n", "k^{1-\\alpha} &= \\frac{s \\bar{A}}{\\delta+n} \\\\\n", "k^{*} &= \\left( \\frac{s \\bar{A}}{\\delta+n} \\right)^{1/(1-\\alpha)}\n", "\\end{align}\n", "\n", "We can also obtain the steady state level of output per worker:\n", "\n", "\\begin{align}\n", "y^{*} = f \\left( k^{*} \\right) = \\bar{A} \\left( k^{*} \\right)^{\\alpha} = \n", "\\bar{A} \\left( \\frac{s \\bar{A}}{\\delta+n} \\right)^{\\alpha/(1-\\alpha)}\n", "\\end{align}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "It is also useful to take a look at the dynamics of capital per worker, to see how a steady state can be reached:\n", "\n", "\\begin{align}\n", "\\dot{k}_{t} &= s f \\left( k_{t} \\right) - \\left( \\delta+n \\right) k_{t} \\qquad | \\quad : k_{t} \\\\\n", "\\frac{\\dot{k}_{t}}{k_{t}} &= \\frac{s f \\left( k_{t} \\right)}{k_{t}} - \\left( \\delta+n \\right)\n", "\\end{align}\n", "\n", "The above formula gives the expression for the rate of growth of capital per worker. Let us plot the result below (again assuming Cobb-Douglas production function)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Plot k_dot/k function\n", "\n", "plt.plot(kk[1:], k_dot(kk[1:])/kk[1:], lw=2)\n", "plt.hlines(0, 0, 2*k_star, lw=0.5)\n", "plt.vlines(k_star, -2, 0, linestyle='dashed', lw=0.5)\n", "\n", "plt.ylim(-2, 10)\n", "\n", "plt.title('Rate of growth of capital per worker')\n", "plt.xlabel('$k_{t}$')\n", "plt.ylabel('$\\dot{k} / k$')\n", "\n", "plt.show()\n", "\n", "# Plot k over time, assuming that k_0 < k_ss\n", "T = 14\n", "dt = 0.01\n", "T_range = np.arange(0, T, dt)\n", "k_t = np.zeros(len(T_range))\n", "k_0 = 0.1 * k_star\n", "k_t[0] = k_0\n", "\n", "for t in range(len(T_range)-1):\n", " k_t[t+1] = k_t[t] + k_dot(k_t[t]) * dt\n", " \n", "plt.plot(T_range, k_t, lw=2)\n", "\n", "plt.hlines(k_star, 0, T, linestyle='dashed', lw=0.5)\n", "\n", "plt.ylim(0, 1.2)\n", "\n", "plt.title('Capital per worker over time')\n", "plt.xlabel('Time')\n", "plt.ylabel('Capital per worker')\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Model predictions\n", "\n", "Recall the expression for the steady state level of output per worker (assuming Cobb-Douglas production function):\n", "\n", "\\begin{align}\n", "y^{*} = f \\left( k^{*} \\right) = \\bar{A} \\left( k^{*} \\right)^{\\alpha} = \n", "\\bar{A} \\left( \\frac{s \\bar{A}}{\\delta+n} \\right)^{\\alpha/(1-\\alpha)}\n", "\\end{align}\n", "\n", "As can be easily seen above, the model predicts that:\n", "- countries with high saving / investment rate $s$ and technology level $\\bar{A}$ will have higher levels of steady state capital and output per worker\n", "- countries with high depreciation rate $\\delta$ and population growth rate $n$ will have lower levels of steady state capital and output per worker\n", "\n", "Let us now take a look at the data to see whether the model's predictions are verified." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Construct average values for investment and population growth rates\n", "s = np.zeros(len(countries))\n", "n = np.zeros(len(countries))\n", "y = np.zeros(len(countries))\n", "N = np.zeros(len(countries))\n", "\n", "for i, country in enumerate(countries):\n", " s[i] = 100*np.mean(pwt.loc[country]['csh_i'])\n", " n[i] = 100*np.mean(pwt.loc[country]['pop'].pct_change())\n", " y[i] = pwt.loc[country, 2014]['rgdpo']/pwt.loc[country, 2014]['emp']\n", " N[i] = pwt.loc[country, 2014]['pop']\n", "\n", "d = {'y': y, 's': s, 'n': n, 'N': N}\n", "dta = pd.DataFrame(data=d, index=countries)\n", "dta.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Investment rate vs GDP per worker\n", "plt.scatter(s, y, s=N, alpha=0.5)\n", "\n", "plt.yscale('log')\n", "\n", "plt.yticks([1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000],\n", " [1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000])\n", "\n", "plt.xlim(0, 50)\n", "plt.ylim(1e3, 2e5)\n", "\n", "plt.title('Investment rate vs GDP per worker')\n", "plt.xlabel('Average investment share of GDP, 1950-2014 (%)')\n", "plt.ylabel('GDP per worker in 2014 (2011 \\$)')\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Population growth rate vs GDP per worker\n", "plt.scatter(n, y, s=N, alpha=0.5)\n", "\n", "plt.yscale('log')\n", "\n", "plt.yticks([1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000],\n", " [1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000])\n", "\n", "plt.xlim(-2, 5)\n", "plt.ylim(1e3, 2e5)\n", "\n", "plt.title('Population growth rate vs GDP per worker')\n", "plt.xlabel('Average population growth rate, 1950-2014 (%)')\n", "plt.ylabel('GDP per worker in 2014 (2011 \\$)')\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So it seems that the model correctly predicts the sign of the relationships. \n", "\n", "However, at this stage the model cannot explain the continued increase in GDP per capita in the developed countries, as in the steady state, by definition, the rate of growth of capital per worker, as well as output per worker, is exactly 0.\n", "\n", "This actually has profound consequences for growth theory: capital accumulation cannot be the mechanism responsible for long-run growth! Therefore, to explain the continued growth in GDP per capita of developed countries (see below), we need to expand our analysis and allow for improvements in technology." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Plot of GDP per capita of selected developed countries\n", "\n", "(pwt.loc['United States']['rgdpe']/pwt.loc['United States']['pop']).plot(lw=2, label='United States')\n", "(pwt.loc['United Kingdom']['rgdpe']/pwt.loc['United Kingdom']['pop']).plot(lw=2, label='United Kingdom')\n", "(pwt.loc['France']['rgdpe']/pwt.loc['France']['pop']).plot(lw=2, label='France')\n", "(pwt.loc['Switzerland']['rgdpe']/pwt.loc['Switzerland']['pop']).plot(lw=2, label='Switzerland')\n", "(pwt.loc['Germany']['rgdpe']/pwt.loc['Germany']['pop']).plot(lw=2, label='Germany')\n", "\n", "plt.xlim(1950, 2014)\n", "\n", "plt.yscale('log')\n", "plt.ylim(5000, 10000)\n", "\n", "plt.yticks([5000, 10000, 20000, 50000, 100000],\n", " [5000, 10000, 20000, 50000, 100000])\n", "\n", "plt.legend(frameon=False)\n", "\n", "plt.title('GDP per capita in developed countries')\n", "plt.xlabel('Year')\n", "plt.ylabel('GDP per capita (2011 \\$)')\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Balanced growth path\n", "\n", "Consider the fundamental equation of a one-sector closed economy:\n", "\n", "\\begin{align}\n", "\\dot{K}_{t}=I_{t}-\\delta K_{t}=Y_{t}-C_{t}-\\delta K_{t}\\label{eq:capital_accumulation}\n", "\\end{align}\n", "\n", "It turns out that this equation generates a lot of interesting results.\n", "\n", "**Definition: balanced growth path (BGP)**\n", "\n", "A balanced growth path is a path $\\left\\{ Y_{t},K_{t},C_{t}\\right\\} _{t=0}^{\\infty}$ along which the quantities $Y_{t}$, $K_{t}$ and $C_{t}$ are positive and grow at constant (possibly 0) rates, which we denote $g_{Y}$, $g_{K}$ and $g_{C}$, respectively.\n", "\n", "**Proposition: equivalence of balanced growth and constancy of key ratios**\n", "\n", "Let $\\left\\{ Y_{t},K_{t},C_{t}\\right\\} _{t=0}^{\\infty}$ be a path along which $Y_{t}$, $K_{t}$, $C_{t}$ and $I_{t}=Y_{t}-C_{t}$\n", "are positive for all $t\\geq0$. Then, given the capital accumulation equation, the following holds:\n", "\n", "(1) If there is balanced growth, then $g_{Y}=g_{K}=g_{C}=g_{I}$ and the ratios $K/Y$, $C/Y$ and $I/Y$ are constant.\n", "\n", "(2) If $K/Y$ and $C/Y$ are constant, then $Y$, $K$, $C$ and $I$ all grow at the same constant rate, i.e. there is not only balanced growth, but balanced growth where $g_{Y}=g_{K}=g_{C}=g_{I}$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Proof of (1)**\n", "\n", "Consider an economy on a balanced growth path. Then, by definition, $g_{Y}$, $g_{K}$ and $g_{C}$ are constant. If we use the capital accumulation equation, we get the result that $g_{I}=g_{K}$:\n", "\n", "\\begin{align}\n", "\\Delta K_{t+1} & =I_{t}-\\delta K_{t}\\quad|\\quad:K_{t}\\\\\n", "g_{K}=\\frac{\\dot{K}_{t}}{K_{t}}&=\\frac{I_{t}}{K_{t}}-\\delta\\\\\n", "\\frac{I_{t}}{K_{t}} & =g_{K}+\\delta\n", "\\end{align}\n", "\n", "Since the right hand side of the above equation is constant, then the $I/K$ ratio is constant and that means that the rates of growth of $I$ and $K$ have to be identical.\n", "\n", "Focus now on the national accounting relationship:\n", "\n", "\\begin{align}\n", "Y_{t}=C_{t}+I_{t}\\quad\\to\\quad\\frac{\\mathrm{d}Y_{t}}{\\mathrm{d}t}=\\frac{\\mathrm{d}C_{t}}{\\mathrm{d}t}+\\frac{\\mathrm{d}I_{t}}{\\mathrm{d}t}\\quad\\to\\quad\\dot{Y}_{t}=\\dot{C}_{t}+\\dot{I}_{t}\n", "\\end{align}\n", "\n", "\\begin{align}\n", "g_{Y}&=\\frac{\\dot{Y}_{t}}{Y_{t}}=\\frac{\\dot{C}_{t}}{Y_{t}}+\\frac{\\dot{I}_{t}}{Y_{t}}=\\frac{\\dot{C}_{t}}{C_{t}}\\frac{C_{t}}{Y_{t}}+\\frac{\\dot{I}_{t}}{I_{t}}\\frac{I_{t}}{Y_{t}}=g_{C}\\frac{C_{t}}{Y_{t}}+g_{I}\\frac{Y_{t}-C_{t}}{Y_{t}}=\\frac{C_{t}}{Y_{t}}\\left(g_{C}-g_{I}\\right)+g_{I}\\\\g_{Y}&=\\frac{C_{t}}{Y_{t}}\\left(g_{C}-g_{K}\\right)+g_{K}\n", "\\end{align}\n", "\n", "where in the last line the equality between growth rates of $I$ and $K$ was used.\n", "\n", "We have now two possibilities: either $g_{C}=g_{K}$ (and in consequence $g_{Y}=g_{K}$) or $g_{C} \\neq g_{K}$.\n", "\n", "Let us assume that $g_{C} \\neq g_{K}$. Then we can rewrite the above expression as:\n", "\n", "\\begin{align}\n", "\\frac{C_{t}}{Y_{t}}=\\frac{g_{Y}-g_{K}}{g_{C}-g_{K}}\n", "\\end{align}\n", "\n", "The right hand side contains only growth rates, which are constant by the definition of the BGP. That means that the $C/Y$ ratio is constant as well, and $g_{C}=g_{Y}$. But this implies that the right hand side is equal to 1 and $C_{t}=Y_{t}$, which contradicts our assumption that $I_{t}=Y_{t}-C_{t}$ is positive.\n", "\n", "That means that the assumption $g_{C} \\neq g_{K}$ was wrong and $g_{C}=g_{K}$. This also implies that $g_{Y}=g_{K}=g_{I}=g_{C}$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Proof of (2)**\n", "\n", "Suppose that $K/Y$ and $C/Y$ are constant. Then $g_{Y}=g_{K}=g_{C}$ and as a consequence ($I/Y=1-C/Y$) $g_{Y}=g_{I}=g_{K}$. Now we need to show that the growth rates are also constant. To that end we use the capital accumulation equation:\n", "\n", "\\begin{align}\n", "\\dot{K}_{t}&=I_{t}-\\delta K_{t}\\quad|\\quad:K_{t}\\\\\n", "g_{K} & =\\frac{I_{t}}{K_{t}}-\\delta\n", "\\end{align}\n", "\n", "Since $g_{I}=g_{K}$ then $I/K$ is constant and in consequence $g_{K}$ and all other key growth rates are constant." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that (1) means that any economy on a balanced growth path has to generate constant key ratios. \n", "(2) ensures that if we observe constant ratios, the economy is on a balanced growth path.\n", "\n", "Let us now check whether the United States economy is on its balanced growth path." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Capital to GDP ratio in the United States\n", "(pwt.loc['United States']['rkna']/pwt.loc['United States']['rgdpna']).plot(lw=2)\n", "\n", "plt.xlim(1950, 2014)\n", "plt.ylim(2, 4.5)\n", "\n", "plt.title('Capital to GDP ratio in the United States')\n", "plt.xlabel('Year')\n", "plt.ylabel('$K/Y$ ratio')\n", "\n", "plt.show()\n", "\n", "# Investment to GDP ratio in the United States\n", "pwt.loc['United States']['csh_i'].plot(lw=2)\n", "\n", "plt.xlim(1950, 2014)\n", "plt.ylim(0, 0.5)\n", "\n", "plt.title('Investment to GDP ratio in the United States')\n", "plt.xlabel('Year')\n", "plt.ylabel('$I/Y$ ratio')\n", "\n", "plt.show()\n", "\n", "# Consumption to GDP ratio in the United States\n", "pwt.loc['United States']['csh_c'].plot(lw=2)\n", "\n", "plt.xlim(1950, 2014)\n", "plt.ylim(0.5, 1)\n", "\n", "plt.title('Consumption to GDP ratio in the United States')\n", "plt.xlabel('Year')\n", "plt.ylabel('$I/Y$ ratio')\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the United States, both the $K/Y$ and $I/Y$ ratios were stable since 1950, but the $C/Y$ ratio exhibits since the 1980s an increasing trend, probably linked with an increasing trade deficit." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Net exports to GDP ratio in the United States\n", "(pwt.loc['United States']['csh_x']+pwt.loc['United States']['csh_m']+pwt.loc['United States']['csh_r']).plot(lw=2)\n", "plt.hlines(0, 1950, 2014, lw=0.5)\n", "\n", "plt.xlim(1950, 2014)\n", "\n", "plt.title('Net exports to GDP ratio in the United States')\n", "plt.xlabel('Year')\n", "plt.ylabel('$(X-M)/Y$ ratio')\n", "\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Technological progress\n", "\n", "There are at least three possibilities in how technological progress might manifest itself in our production function. Let $\\tilde{F}$ denote the \"true\" production function and $\\tilde{A}$ the \"true\" form of technological progress:\n", "\n", "- Hicks-neutral: technology acts as a multiplicative constant: $\\tilde{F}\\left(K_{t},L_{t},\\tilde{A}_{t}\\right)=A_{t}\\cdot F\\left(K_{t},L_{t}\\right)$\n", "\n", "- Solow-neutral: technology increases productivity of capital: $\\tilde{F}\\left(K_{t},L_{t},\\tilde{A}_{t}\\right)=F\\left(A_{t}\\cdot K_{t},L_{t}\\right)$\n", "\n", "- Harrod-neutral: technology increases productivity of labor: $\\tilde{F}\\left(K_{t},L_{t},\\tilde{A}_{t}\\right)=F\\left(K_{t},A_{t}\\cdot L_{t}\\right)$\n", "\n", "Obviously the technological progress might manifest itself as a combination of the above possibilities: $\\tilde{F}\\left(K_{t},L_{t},\\tilde{A}_{t}\\right)=A_{F,t}\\cdot F\\left(A_{K,t}\\cdot K_{t},A_{L,t}\\cdot L_{t}\\right)$\n", "\n", "Despite all of the above forms seem ex ante plausible, balanced growth requires that the \"true\" production function has a representation of the Harrod-neutral form. Note that it does not mean that literally all technological progress directly increases labor productivity, just that the \"true\" production function can be rewritten in the required functional form." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Theorem: [Uzawa's (1961)](http://www.jstor.org/stable/2295709) balanced growth path theorem**\n", "\n", "Let $\\left\\{ Y_{t},K_{t},C_{t}\\right\\} _{t=0}^{\\infty}$, where $0