Chapter 9 Solow O. Afonso, P. B. Vasconcelos
Computational Economics: 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 capital 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 (investment) has on the long-run standard of living (per capita income). The model is built around two equations: a production function and a capital accumulation 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: Y (t) = F (K (t), L(t)) = K (t)α L(t)1−α (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)α L(t) L(t)
(2)
(t) (t) where y = YL(t) and k (t) = KL(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 ˙ K˙ (t) L(t) Y˙ (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 grows at rate
˙ L(t) 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 consumption
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:
∗
k =
∗
y =
s δ+n
s δ+n
1 1−α
(5)
α 1−α
.
(6)
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 written as s = y (t)−c(t) 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 k
gr
=
α δ+n
1 1−α
,
(7)
considering A = 1. Note that k ∗ > k gr whenever s > α.
O. Afonso, P. B. Vasconcelos
Computational Economics
11 / 27
Economic model
Golden rule
f(k)
(δ+n)k
sf(k) sgrf(k)
kgr
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 (t)) ∗ k˙ (t) ' φ(k ∗ ) + dφ(k (t) − k ∗ ) dk (t) |k (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 y˙ (t) =
dy (t) = f (t, y (t)) dt
(8)
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)). dt The solution of (8) (or (9)) is a family of functions determined by a constant.
O. Afonso, P. B. Vasconcelos
Computational Economics
(9)
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 . Then, we get the result that λ = a and thus y (t) = ce−at , 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 % N e o c l a s s i c a l growth model ( exogenous growth model ) % Implemented by : P . B . Vasconcelos and O. Afonso disp ( ’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’ ) ; disp ( ’ Solow model : exogenous growth model ’); disp ( ’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’ ) ; %% parameters s = 0 . 4 ; % savings r a t e A = 1 ; % t e c h n o l o g i c a l p r o g r e s s ( Hicks n e u t r a l ) alpha = 0 . 3 ; % c a p i t a l share i n p r o d u c t i o n delta = 0.1; % depreciation rate n = 0 . 0 1 ; % p o p u l a t i o n growth r a t e fprintf ( ’ s A alpha d e l t a n \ n ’ ) ; f p r i n t f ( ’ %6.2 f %6.2 f %6.2 f %6.2 f %6.2 f \ n ’ , s , A , alpha , d e l t a , n ) ;
O. Afonso, P. B. Vasconcelos
Computational Economics
20 / 27
Computational implementation
Solution
%% steady−s t a t e and n u m e r i c a l s o l u t i o n odesolow = @( t , k ) s∗A∗k ^ alpha −( d e l t a +n ) ∗k ; kss = f s o l v e (@( k ) odesolow ( [ ] , k ) , 1 0 ) ; [ t , y ] = my_euler ( odesolow , [ 0 , 1 0 0 ] , 0 . 5 ∗ kss , 0 . 0 1 ) ; plot ( t , y ) ; i f ~ e x i s t ( ’OCTAVE_VERSION ’ , ’ b u i l t i n ’ ) % l a b e l s f o r MATLAB x l a b e l ( ’ $ t $ ’ , ’ I n t e r p r e t e r ’ , ’ LaTex ’ ) ; y l a b e l ( ’ $k$ ’ , ’ I n t e r p r e t e r ’ , ’ LaTex ’ ) ; else % l a b e l s f o r 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 ) %( p r o g r e s s i v e ) E u l e r method w i t h tspan = [ t 0 t f ] and f i x e d % s t e p s i z e t o s o l v e t h e IVP y ’ = f ( t , y ) , y ( t 0 ) =y0 % input : % f : f u n c t i o n t o i n t e g r a t e ( f =@( t , y ) ) % tspan : i n t e g r a t i o n i n t e r v a l [ t0 , t f i n a l ] % y0 : i n i t i a l condition at t0 % h : ( constant ) step size % output : % t : s p e c i f i c t i m e s used % y : s o l u t i o n evaluated at t t 0 = tspan ( 1 ) ; t f = tspan ( 2 ) ; t = t 0 : h : t f ; y = zeros ( 1 , length ( t ) ) ; y ( 1 ) = y0 ; yn = y0 ; t n = t 0 ; f o r n = 1 : length ( t )−1 yn = yn+h∗ f ( tn , yn ) ; y ( n +1) = yn ; tn = t n +h ; end end O. Afonso, P. B. Vasconcelos
Computational Economics
22 / 27
Numerical results and simulation
6.5
6
5.5
k
5
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 1.6
δ=0.1 δnew=0.15
5.5
1.4 1.2
5 k˙
k
(δ+n)*k 1 (δnew+n)*k
4.5
0.8 0.6
4
0.4 3.5 0.2 3
0
50 t
100
0
0
5 k
10
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
1.5
k
k˙
A=1 Anew=1.1
5.5 5
1 sAnewkα
4.5 α
sAk 4
0.5
3.5 3
0 0
50 t
100
0
5
10
15
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