Chapter 9 Solow

O. Afonso, P. B. Vasconcelos

Computational : a concise introduction

O. Afonso, P. B. Vasconcelos Computational Economics 1 / 27 Overview

1 Introduction

2 Economic model

3 Computational implementation

4 Numerical results and simulation

5 Highlights

6 Main references

O. Afonso, P. B. Vasconcelos Computational Economics 2 / 27 Introduction

In 1956, Robert Solow published a seminal paper on economic growth and development. The proposed model, also known has the Solow–Swan, ignores some important aspects of macroeconomics, such as short-run fluctuations in employment, and makes several assumptions to describe the long-run path of the economy. It remains highly influential even today and despite its relative simplicity conveys a number of very useful insights about the dynamics of the growth process. It is also worth teaching from a methodological perspective. Numerical methods for solving differential equations will be introduced and the Euler method implemented to solve initial value problems (Dahlquist and Björck (2008) and Süli and Mayers (2003)).

O. Afonso, P. B. Vasconcelos Computational Economics 3 / 27 Economic model

This is a model of accumulation in a pure production economy. Countries produce and consume only a single, homogeneous good (output, GDP or real income). There are no prices because there is no need for money. Everyone works all the time, saves a fixed portion of income, invests and owns the firm (consumer side is not modelled). There is no government, thus no taxation nor subsidies. It is a closed economy model. This model captures the pure impact that savings () has on the long-run standard of living (per capita income). The model is built around two equations: a production function and a equation.

O. Afonso, P. B. Vasconcelos Computational Economics 4 / 27 Economic model Production function

The neoclassic production function is assumed to have the Cobb–Douglas form: α 1 α Y (t) = F(K (t), L(t)) = K (t) L(t) − (1) where K (t) is capital input, L(t) is labour input and α, between 0 and 1, is the capital share in production. This production function is neoclassic since it exhibits constant returns to scale, presents positive and diminishing marginal returns to factor accumulation, satisfies the Inada conditions.

O. Afonso, P. B. Vasconcelos Computational Economics 5 / 27 Economic model Production function

In per capita terms, the production function (1) is:

Y (t) K (t)αL(t)1 α = − ⇔ y(t) = k(t)α (2) L(t) L(t)

Y (t) K (t) where y = L(t) and k(t) = L(t) From (1), taking logs and differentiating with respect to time on both sides, denoting by Y˙ (t) and L˙ (t) the derivatives of Y and L with respect to t, the results is Y˙ (t) K˙ (t) L˙ (t) = α + (1 − α) . Y (t) K (t) L(t) The growth rate of per capita output is then simply

y˙ (t) k˙ (t) = α . y(t) k(t)

Thus, the source of increase in per capita output is the capital deepening.

O. Afonso, P. B. Vasconcelos Computational Economics 6 / 27 Economic model Capital accumulation

The second key equation describes the path of capital accumulation

K˙ (t) = Y (t) − C(t) − δK (t) (3)

i.e. the addition to the capital stock each period, K˙ (t), depends positively on savings and negatively on depreciation, which takes place at rate δ. Since a fraction s of output is saved, Y (t) − C(t) = sY (t), the labour input L˙ (t) grows at rate L(t) = n, the path of per capita capital accumulation is

k˙ (t) = sy(t) − (δ + n)k(t). (4)

Thus, the change in per capita capital each period is determined by three terms: per capita investment, sy(t); per capita depreciation, δk(t); and population growth, nk(t).

This is a differential equation and, for an initial stock of capital k0, it defines an initial value problem.

O. Afonso, P. B. Vasconcelos Computational Economics 7 / 27 Economic model Transitional dynamics: the Solow diagram The Solow diagram has two curves, plotted as functions of k(t), and can be used to understand per capita output evolves over time

f(k)

(δ+n)k

sf(k)

investment

k∗

Solow diagram

O. Afonso, P. B. Vasconcelos Computational Economics 8 / 27 Economic model Transitional dynamics: the Solow diagram

The curve y(t) = f (k(t)) = k(t)α is the production function, and the curve sy(t) = sk(t)α depicts the amount of per capita investment, which shifts y(t) down by the factor s. In turn, the line (δ + n)k(t) represents the amount of new per capita investment required to keep the amount of per capita capital constant. When the difference between the curve sy(t) and the line (δ + n)k(t) is positive (negative) the economy is increasing (decreasing) its per capita capital: capital deepening (widening) is occurring. when sy(t) = (n + δ)k(t), so that k˙ (t) = 0, the amount of per capita capital remains constant, and such a point is a steady state. To sum up, we have the following. From the diagram it is found the steady-state value of per capita capital. Then, from the production function, the also constant steady-state value of output per worker is obtained. In turn, the steady state per capita consumption is given by the difference between steady state per capita values of output and investment.

O. Afonso, P. B. Vasconcelos Computational Economics 9 / 27 Economic model Steady state

Since, in steady state, k˙ (t) = 0, (4) and (2) can be used to solve the steady-state values of per capita capital and per capita output; thus,

α α k˙ (t) = sk(t) − (δ + n)k(t) ⇒ 0 = sk ∗ − (δ + n)k ∗

and so the steady-state values are:

1  s  1−α k ∗ = (5) δ + n

α  s  1−α y ∗ = . (6) δ + n

Ceteris paribus, countries that have high savings/investment rates will tend to be richer since they accumulate more per capita capital and, as a result, have more per capita output. In turn, countries that have high population growth rates will tend to be poorer.

O. Afonso, P. B. Vasconcelos Computational Economics 10 / 27 Economic model Golden rule

The optimal capital accumulation leads to the golden rule savings rate that maximises the steady-state level of consumption. The per capita consumption c(t) is given by c(t) = (1 − s)y(t) and s can be y(t) c(t) written as s = y−(t) . ˙ At the steady state, k(t) = 0, that is, sy ∗ = (δ + n)k ∗. The latter can be written in terms of c(t), as c∗ = y ∗ − (δ + n)k ∗. dc To find k that maximises c, the first order condition, dk = 0, produces

1  α  1−α k gr = , (7) δ + n

gr considering A = 1. Note that k ∗ > k whenever s > α.

O. Afonso, P. B. Vasconcelos Computational Economics 11 / 27 Economic model Golden rule

f(k)

(δ+n)k

sf(k)

sgrf(k)

gr k k∗

Golden rule savings rate

O. Afonso, P. B. Vasconcelos Computational Economics 12 / 27 Economic model Linear approximation

The Solow model has a closed solution and can be demonstrated that the convergence process is (globally) stable. Taking (4), considering k˙ (t) = φ(k(t)), a first order Taylor approximation for k˙ (t), being φ(k(t)) at least twice differentiable, is given by

˙ dφ(k(t)) k(t) ' φ(k ∗) + dk(t) |k ∗ (k(t) − k ∗)   ' sf 0(k ∗) − (n + δ) (k(t) − k ∗)

since φ(k ∗) = 0. ˙ ˙ Thus, whenever k(t) < k ∗ (k(t) > k ∗) then k(t) > 0 (k(t) < 0) and physical capital will accumulate (diminish) towards the steady state.

O. Afonso, P. B. Vasconcelos Computational Economics 13 / 27 Economic model Differential equation

Since most differential equations are not analytically soluble, numerical solution of ordinary differential equations is a fundamental technique. A differential equation involves an unknown function, y(t), and its derivatives. A first–order ordinary differential equation, ODE, has the form

dy y˙ (t) = (t) = f (t, y(t)) (8) dt

where f : R × R → R and y(t):[t0, tT ] ⊂ R → R. Equation (8) is non-autonomous but often economic problems are time-autonomous dy y˙ (t) = (t) = f (y(t)). (9) dt The solution of (8) (or (9)) is a family of functions determined by a constant.

O. Afonso, P. B. Vasconcelos Computational Economics 14 / 27 Economic model Initial value problems

A particular solution is computed by requiring that it goes through a specific point, the initial condition, (t0, y0 = y(t0)). The problem specified both by (8) (or (9)) and the initial condition is called an initial value problem, IVP. Solving the IVP is to predict the path that a quantity will take during a certain time interval, given the initial quantity. Problems involving ODEs of a higher order can be reduced to a system of first ODE equations by introducing new variables. Seldom do these equations have solutions that can be expressed in a closed form or the analytical form is often too cumbersome; solution techniques are generally unable to deal with large and nonlinear systems of equations that arise in real problems.

O. Afonso, P. B. Vasconcelos Computational Economics 15 / 27 Economic model Initial value problems

To solve a continuous problem in a computer, a discretisation process is required. Initial value problems can be numerically solved using finite difference methods and recursive procedures.

The numerical procedures are based on approximations y0, y1, ··· , yT to the exact solution y(t0), y(t1), ··· , y(tT ) at the grid points: t0 < t1 < ··· < tT .

The distances hn = tn − tn 1, n = 1, ··· , T , are called step sizes and, for − simplicity, equal step sizes, that is, uniform grids, where h = (tT − t0)/T , are considered.

The aim is, starting with the initial value y0 = y(t0), to find yn, which approximates y(tn), by recurrence relations in such a way that the value of yn+1 could be stated as a function of yn.

O. Afonso, P. B. Vasconcelos Computational Economics 16 / 27 Economic model Euler method

From (8), the slope of the tangent line at (t0, y(t0)) can be computed;

taking a small step along the computed tangent, another point (t1, y1) is reached, from where again a tangent can be computed;

perform this process iteratively until (tT , yT );

a polygonal curve y0, ··· yT is computed, approximating the sought solution: y(t0), ··· y(tT ) at points t0, ··· tT . The approximation error can be reduced considering small step sizes, h. This is know as the Euler method

yn+1 = yn + hf (tn, yn), n = 0, 1, ··· , T . (10)

It is a first-order method since the error of the final result, global error, is proportional to h. The error in a single step, local error, is proportional to h2. High-order numerical methods will be explored in the following chapters.

O. Afonso, P. B. Vasconcelos Computational Economics 17 / 27 Economic model

It is relevant for the stability of (linearised) economic models to get some insight on the solution of linear differential equations. The solution of y˙ (t) = ay(t) + b can be obtained from the solution of the homogeneous equations (b = 0) and the particular solution. The stability behaviour is ruled by the former. Since et satisfies y˙ (t) = y(t), one should try eλt . at Then, we get the result that λ = a and thus y(t) = ce− , c constant (which can be determined for an initial value problem). The stability of the solution depends on the sign of λ: if λ < 0 then the solution converges to the steady state. It is worth mentioning that the behaviour is different from the discrete case (eλt vs λt ): for discrete time both sign and modulus of λ are relevant to understand the equations behaviour.

O. Afonso, P. B. Vasconcelos Computational Economics 18 / 27 Computational implementation

The following baseline values are considered: s = 0.4, A = 1, α = 0.3, δ = 0.1 and n = 0.01.

O. Afonso, P. B. Vasconcelos Computational Economics 19 / 27 Computational implementation Presentation and parameters

%% Solow model % Neoclassical growth model (exogenous growth model) % Implemented by: P.B. Vasconcelos and O. Afonso disp (’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’); disp (’Solowmodel: exogenousgrowthmodel ’); disp (’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’);

%% parameters s = 0 . 4 ; % savings rate A = 1; % technological progress (Hicks neutral) alpha = 0 . 3 ; % capital share in production d e l t a = 0 . 1 ; % depreciation rate n = 0 .01 ; % population growth rate f p r i n t f (’ s A alpha delta n\n’); f p r i n t f ( ’%6.2f %6.2f %6.2f %6.2f %6.2f\n’,s,A,alpha,delta ,n);

O. Afonso, P. B. Vasconcelos Computational Economics 20 / 27 Computational implementation Solution

%% steady−state and numerical solution odesolow = @(t,k) s∗A∗k^ alpha −( d e l t a +n ) ∗k ; kss = fsolve(@(k) odesolow([] ,k) ,10); [t ,y] = my_euler(odesolow,[0,100],0.5 ∗ kss , 0 . 0 1 ) ; plot ( t , y ) ; i f ~exist ( ’OCTAVE_VERSION ’ , ’ b u i l t i n ’ ) % l a b e l s f o r MATLAB xlabel ( ’$t$’,’Interpreter ’,’LaTex’); ylabel ( ’$k$’,’Interpreter ’,’LaTex’); else % labels for Octave xlabel ( ’ t ’ ) ; ylabel ( ’ k ’ ) ; end

O. Afonso, P. B. Vasconcelos Computational Economics 21 / 27 Computational implementation Euler method function [t ,y] = my_euler(f ,tspan,y0,h) %(progressive) Euler method with tspan=[t0 tf] and fixed % step size to solve the IVP y’=f(t,y), y(t0)=y0 % i n p u t : % f : function to integrate (f=@(t,y)) % tspan : integration interval [t0,tfinal] % y0 : initial condition at t0 % h : (constant) step size % output : % t : specific times used % y : solution evaluated at t

t0 = tspan(1); tf = tspan(2); t = t0:h:tf; y = zeros (1 , length ( t ) ) ; y(1) = y0; yn = y0; tn = t0; for n = 1: length ( t )−1 yn = yn+h∗ f ( tn , yn ) ; y ( n+1) = yn ; tn = tn +h ; end end

O. Afonso, P. B. Vasconcelos Computational Economics 22 / 27 Numerical results and simulation

6.5

6

5.5

5 k 4.5

4

3.5

3 0 20 40 60 80 100 t

Transition dynamics to steady state

O. Afonso, P. B. Vasconcelos Computational Economics 23 / 27 Numerical results and simulation Depreciation rate from 0.1 to 0.15

6.5 2

1.8 6 δ=0.1 1.6 δ =0.15 new 5.5 1.4

1.2 5 (δ+n)*k ˙ k k 1 (δ +n)*k 4.5 new 0.8

4 0.6

0.4 3.5 0.2

3 0 0 50 100 0 5 10 t k

Transition dynamics and Solow diagram: variation on δ

O. Afonso, P. B. Vasconcelos Computational Economics 24 / 27 Numerical results and simulation

Technology from A = 1 to Anew = 1.1

7.5 2.5

7

2 6.5

6

A=1 1.5 5.5 A =1.1 new ˙ k k 5 1 4.5 sA kα new sAkα 4 0.5

3.5

3 0 0 50 100 0 5 10 15 t k

Transition dynamics and Solow diagram: variation on A

O. Afonso, P. B. Vasconcelos Computational Economics 25 / 27 Highlights

The Solow model was developed in 1956 by the Nobel Laureate of 1987, Robert Solow. The Solow model shows how an economy changes over time until it gets to steady state. Savings rates determine the level of per capita capital (and output) level in steady state. The higher the savings rate, the higher the level of per capita capital (output) level. Population growth has a negative impact on capital accumulation. The higher the population growth rate, the lower level of capital (output) steady state. However, neither factors can explain sustained economic growth as observed in developed countries. In the current model, per capita capital (output) is invariant in steady state. This chapter introduces the Euler method, the simplest numerical method to solve initial value problems.

O. Afonso, P. B. Vasconcelos Computational Economics 26 / 27 Main references

G. Dahlquist, Å Björck Numerical methods in scientific computing, volume 1. Society for Industrial Mathematics, 2008 E. Süli, D. .F. Mayers An introduction to numerical analysis. Cambridge University Press, 2003. R. Solow A Contribution to the Theory of Economic Growth. Quarterly Journal of Economics, 70(1): 65–94, 1956.

O. Afonso, P. B. Vasconcelos Computational Economics 27 / 27