chapter 4 ad–as · overview 1 introduction 2 economic model 3 numerical solution 4 computational...

32
Chapter 4 AD–AS O. Afonso, P. B. Vasconcelos Computational Economics: a concise introduction O. Afonso, P. B. Vasconcelos Computational Economics 1 / 32

Upload: others

Post on 21-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Chapter 4AD–AS

O. Afonso, P. B. Vasconcelos

Computational Economics: a concise introduction

O. Afonso, P. B. Vasconcelos Computational Economics 1 / 32

Page 2: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Overview

1 Introduction

2 Economic model

3 Numerical solution

4 Computational implementation

5 Numerical results and simulation

6 Highlights

7 Main references

O. Afonso, P. B. Vasconcelos Computational Economics 2 / 32

Page 3: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Introduction

The AD–AS model, Aggregate Demand–Aggregate Supply is an aggregationof the elementary microeconomic demand-and-supply model.

The AD curve can be obtained from the IS–LM curves, by removing thefixed price level, representing the set of output and price levelcombinations that guarantee equilibrium of goods and services andmonetary markets.The AS curve represents the set of output and price level combinationsthat maximise profits of firms.The equilibrium levels of the main variables, GDP and price level, P, aredetermined by the interaction of the AD and AS curves.

MATLAB/Octave is used to solve the nonlinear model (Newton method andvariants).

O. Afonso, P. B. Vasconcelos Computational Economics 3 / 32

Page 4: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

The set-up of the typical AD–AS model specifies relationships amongaggregate variables.This model can be used to study the effect of changes either in policyvariables or in the specification of the interaction between endogenousvariables:

product equals aggregate demand, Y = C + I + G;consumption function, C = C + cY (1− t);investment function, I = I − bR;public spending function, G = G;income taxes function, T = tY ;money demand, L = L + kY − hR;money supply function, M

P ;production function, Y = A K

αH1−α.

O. Afonso, P. B. Vasconcelos Computational Economics 4 / 32

Page 5: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

Endogenous variables are:product, Y ;consumption, C;investment, I;interest rate, R;prices, P.

Exogenous variables are:government/public spending, G;independent/autonomous consumption, C;independent/autonomous investment, I;money supply, M;nominal wages, W ;Capital, K ;labour (which is given), H;total productivity of factors, A.

O. Afonso, P. B. Vasconcelos Computational Economics 5 / 32

Page 6: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

Parameters:0 < c < 1 is the propensity to consume;b > 0 is the interest sensitivity of investment;k > 0 is the output sensitivity of the demand for money;h > 0 is the interest sensitivity of the demand for money;t ≥ 0 is the tax rate;0 < α < 1 is the share of labour in production;1− α is the share of capital in production.

O. Afonso, P. B. Vasconcelos Computational Economics 6 / 32

Page 7: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

AD curve: aggregate demand

The AD curve represents the various amounts of real GDP, IS-LMequilibrium output, that buyers will desire to purchase at each possibleprice level.

Y =

1h

(L− M

P

)− 1

b

(C + I + G

)c(1−t)−1

b − kh

. (1)

Representing (Y ,P), respectively, in the x–axis and y–axis, it can bestated that:

the position of the AD curve is affected by any factor that affects the positionof IS and LM curves;∂Y∂P < 0 (negative slope);points on the left (right) side of the curve imply excess (scarcity) ofaggregate demand.

O. Afonso, P. B. Vasconcelos Computational Economics 7 / 32

Page 8: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

AS curve: aggregate supply

The AS curve represents the real domestic output level that is suppliedby the economy at different price levels, having three distinct segments

Horizontal range: the price level remains constant, P = P, with substantialoutput variation, and the economy is far from full employment – Keynesian(or short-run aggregate supply) curve (implicit in the IS–LM model).Intermediate (up sloping) range: the expansion of real output isaccompanied by a rising price level, near to a full employment level – thehybrid (or intermediate or medium-run aggregate supply) curve (ASmr ),

Y = A Kα

(WP

K−α

(1− α)A

)α−1α

. (2)

Vertical range: absolute full capacity is assumed and full employment occursat the ‘natural rate of unemployment’, Y = Y N – Classical AS (or long-runaggregate supply) curve.

O. Afonso, P. B. Vasconcelos Computational Economics 8 / 32

Page 9: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

AS curve: aggregate supply

It can be stated that:ASmr position depends on a change in input prices, change in productivityand change in legal institutional environment;∂Y∂P > 0 (positive slope).

O. Afonso, P. B. Vasconcelos Computational Economics 9 / 32

Page 10: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Economic model

Putting the AD and the AS curves together

Equilibrium price and quantity are found where the AD and AS curvesintersect.If the AD curve shifts right, in the intermediate and vertical AS curveranges it will cause demand-pull inflation, whereas in the horizontal it willonly cause output changes.The multiplier effect is weakened by price level changes in intermediateand vertical AS curve ranges: the more price level increases the smallerthe effect on real GDP is.

O. Afonso, P. B. Vasconcelos Computational Economics 10 / 32

Page 11: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Computing the zeros of a real function f , or equivalently the roots of theequation f (x) = 0, is a frequent problem in economy.

Contrary to linear systems, this computation cannot be accomplished in afinite number of operations; thus, one must rely on iterative methods.Iterative methods.

Starting from x0, build a sequence xk , k = 1, 2, ..., convergent to a zero of f .The quality of the solution can be measured by the residual, ‖f (xk )‖, or bythe error, ‖xk − x∗‖, where x∗ is the solution sought.The convergence rate r of the iterative process is linear, super-linear orquadratic, if

limk→∞

‖xk+1 − x∗‖‖xk − x∗‖r = c

for a nonzero constant c, respectively, r = 1, r > 1 or r = 2.

O. Afonso, P. B. Vasconcelos Computational Economics 11 / 32

Page 12: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Scalar nonlinear equations

Bisection method. If f on [a0,b0] satisfies f (a0)f (b0) < 0, then it has atleast one zero in the segment ]a0,b0[.Taking m0 = (a0 + b0)/2, new intervals can be iteratively defined byhalving the previous one according to

]ak+1,bk+1[ =

{]ak ,mk [ , f (mk )f (bk ) > 0]mk ,bk [ , f (mk )f (bk ) < 0 .

Advantage: independent of the regularity of f .Disadvantage: low rate of convergence.

O. Afonso, P. B. Vasconcelos Computational Economics 12 / 32

Page 13: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Scalar nonlinear equations

Newton method

xk+1 = xk − f ′(xk )−1f (xk ), f ′(xk ) 6= 0, k = 0,1,2, ...

computes the zero by locally replacing f by its tangent line.Advantage: rate of (local) convergence of this method is quadratic.Disadvantage: requires f ′, expensive to compute and often not explicitlyavailable.

O. Afonso, P. B. Vasconcelos Computational Economics 13 / 32

Page 14: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Scalar nonlinear equations

Secant method

xk+1 = xk −xk − xk−1

f (xk )− f (xk−1)f (xk ), k = 0,1,2, ... ,

where f (xk ) is approximated by finite differences using two successiveiterates.

(Local) super-linear convergence.Convergence can be improved by considering a higher order degreeinterpolation polynomial.

O. Afonso, P. B. Vasconcelos Computational Economics 14 / 32

Page 15: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Nonlinear system of equations

Compute the zeros of a system of n nonlinear equations, f (x) = 0 withf : lRn −→ lRn, xk a vector with n components, using

Newton method

xk+1 = xk − f ′(xk )−1f (xk ), k = 0,1,2, ...

f ′(xk ) = J(xk ) =

∂f1∂x1

(xk ) · · · ∂f1∂xn

(xk )...

. . ....

∂fn∂x1

(xk ) · · · ∂fn∂xn

(xk )

where the Jacobian matrix at xk (J(xk ) is nonsingular).

O. Afonso, P. B. Vasconcelos Computational Economics 15 / 32

Page 16: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Nonlinear system of equations

Variants of the Newton method:use the same Jacobian several iterations;updating factorisation methods rather than re-factorising the Jacobian matrix.

Disadvantage: Newton method (or variants) may not converge for x(0) farfrom the solution.

O. Afonso, P. B. Vasconcelos Computational Economics 16 / 32

Page 17: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical solution

Nonlinear (system) of equations in practice

MATLAB/Octave:zeros of a continuous function of one variable: fzero(f,x0), where f isthe function and x0 an initial approximation;system of nonlinear equations: fsolve(f,x0), where f is the vectorfunction and x0 an initial approximation.

O. Afonso, P. B. Vasconcelos Computational Economics 17 / 32

Page 18: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Computational implementation

The following baseline values are considered:c = 0.6, b = 1500, k = 0.2, b = 1500, h = 1000, t = 0.2, α = 0.5,A = 1, K = 30000, C = 160, I = 100, G = 200, M = 1000, W = 50 andL = 225.

O. Afonso, P. B. Vasconcelos Computational Economics 18 / 32

Page 19: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Computational implementation

Presentation and parameters

%% AD−AS model% Medium−run e q u i l i b r i u m% Implemented by : P .B . Vasconcelos and O. Afonso

function adasglobal C_bar I_bar G_bar M_bar W_bar L_bar A_bar K_bar . . .

c b t k h alpha auxdisp ( ’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’ ) ;disp ( ’AD−AS model ’ ) ;disp ( ’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’ ) ;

%% parametersc = 0 . 6 ; % marginal p ropens i t y to consumeb = 1500; % s e n s i b i l i t y o f the investment to the i n t e r e s t ra tek = 0 . 2 ; % s e n s i b i l i t y o f the money demand to the producth = 1000; % s e n s i b i l i t y o f the money demand to the i n t e r e s t ra tet = 0 . 2 ; % tax on consumptionalpha = 0 . 5 ; % c a p i t a l share i n produc t ion

O. Afonso, P. B. Vasconcelos Computational Economics 19 / 32

Page 20: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Computational implementation

Exogenous and endogeneous variables

%% exogenous v a r i a b l e s ( autonomous components )A_bar = 1; % exogenous p r o d u c t i v i t yK_bar = 30000; % stock o f c a p i t a lC_bar = 160; % autonomous consumptionI_bar = 100; % autonomous investmentG_bar = 200; % government spendingM_bar = 1000; % money supplyW_bar = 50; % wageL_bar = 225; % autonomous money demanddisp ( ’ exogenous va r i a b l e s ( autonomous components ) : ’ )f p r i n t f ( ’ G_bar = %d ; M_bar = %d ; W_bar = %d ; L_bar = %d \ n ’ , . . .

G_bar , M_bar , W_bar , L_bar ) ;%% endogenous v a r i a b l e s% Y, product% P, p r i ce

O. Afonso, P. B. Vasconcelos Computational Economics 20 / 32

Page 21: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Computational implementation

Compute, show and plot the solution

%% model s o l u t i o n : compute the endogenous v a r i a b l e sx0 = [500 5 ] ; % i n i t i a l approx imat ion f o r Y and P, resp .aux = ( c∗(1− t )−1) / b−k / h ; % a u x i l i a r y v a r i a b l e f o r AD curvex = f s o l v e (@ADAS_system, x0 ) ;

%% show the s o l u t i o ndisp ( ’ computed endogenous va r i a b l e s : ’ )f p r i n t f ( ’ product , Y : %6.2 f \ n ’ , x ( 1 ) ) ;f p r i n t f ( ’ p r ice , P : %6.2 f \ n ’ , x ( 2 ) ) ;

% show v a r i a b l e o f i n t e r e s tR = 1/ h∗ ( L_bar−M_bar / x ( 2 ) +k∗x ( 1 ) ) ;f p r i n t f ( ’ i n t e r e s t ra te (%%) , R: %6.2 f \ n ’ , R∗100) ;

%% p l o t the s o l u t i o nP = 0 : 0 . 1 : 1 . 5∗ x ( 2 ) ;AS = A_bar∗K_bar^ alpha ∗ (W_bar . / P ∗ . . .

K_bar .^(− alpha ) /((1− alpha ) ∗A_bar ) ) . ^ ( ( alpha−1) / alpha ) ;AD = 1/ h∗ ( L_bar−M_bar . / P) / aux−1/b∗ ( C_bar+ I_bar+G_bar ) / aux ;plot (AS,P, ’−−b ’ ,AD,P, ’ r ’ ) ; x l im ( [500 1200]) ;xlabel ( ’ product ’ ) ; ylabel ( ’ p r i ce ’ ) ; legend ( ’AS ’ , ’AD ’ ) ;

O. Afonso, P. B. Vasconcelos Computational Economics 21 / 32

Page 22: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Computational implementation

System of nonlinear equations

%% AD−AS systemfunction f = ADAS_system ( x )global C_bar I_bar G_bar M_bar W_bar L_bar A_bar K_bar b h alpha aux ;f = [

x ( 1 ) −1/h∗ ( L_bar−M_bar / x ( 2 ) ) / aux +1/b∗ ( C_bar+ I_bar+G_bar ) / aux ;x ( 1 )−A_bar∗K_bar^ alpha ∗ (W_bar / x ( 2 ) ∗ . . .K_bar^(−alpha ) /((1− alpha ) ∗A_bar ) ) ^ ( ( alpha−1) / alpha ) ;

] ;

O. Afonso, P. B. Vasconcelos Computational Economics 22 / 32

Page 23: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

---------------------------------------------------------AD-AS model---------------------------------------------------------exogenous variables (autonomous components):G_bar = 200; M_bar = 1000; W_bar = 50; L_bar = 225

computed endogenous variables:product, Y: 819.25price, P: 2.73interest rate (%), R: 2.27

O. Afonso, P. B. Vasconcelos Computational Economics 23 / 32

Page 24: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

500 600 700 800 900 1000 1100 12001.5

2

2.5

3

3.5

4

product

price

AS

AD

AD–AS diagram

O. Afonso, P. B. Vasconcelos Computational Economics 24 / 32

Page 25: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

Expansion of governmental spending (G increases20%)

G_bar from 200.00 to 240.00initial eq. eq. after shock

product, Y: 819.25 846.48price, P: 2.73 2.82interest rate, R (%): 2.27 3.99

O. Afonso, P. B. Vasconcelos Computational Economics 25 / 32

Page 26: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

500 600 700 800 900 1000 1100 1200−0.2

−0.1

0

0.1

0.2equilibrium after expansion of governamental spending

product

inte

rest ra

te

LM

IS

LMnew

ISnew

500 600 700 800 900 1000 1100 12001

2

3

4

product

price

AS

AD

ADnew

Increase in G

O. Afonso, P. B. Vasconcelos Computational Economics 26 / 32

Page 27: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

Expansion of money supply (M increases 20%)

M_bar from 1000 to 1200initial eq. eq. after shock

product, Y: 819.25 889.63price, P: 2.73 2.97interest rate, R (%): 2.27 6.57

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

Page 28: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

500 600 700 800 900 1000 1100 1200−0.2

−0.1

0

0.1

0.2equilibrium after expansion of governamental spending

product

inte

rest ra

te

LM

IS

LMnew

500 600 700 800 900 1000 1100 12001

2

3

4

product

price

AS

AD

ADnew

Increase in M

O. Afonso, P. B. Vasconcelos Computational Economics 28 / 32

Page 29: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

A positive supply shock (A increases 5%)

A_bar from 1 to 1.05initial eq. eq. after shock

product, Y: 819.25 856.11price, P: 2.73 2.59interest rate, R (%): 2.27 0.99

O. Afonso, P. B. Vasconcelos Computational Economics 29 / 32

Page 30: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Numerical results and simulation

500 600 700 800 900 1000 1100 1200−0.2

−0.1

0

0.1

0.2equilibrium after expansion of governamental spending

product

inte

rest ra

te

500 600 700 800 900 1000 1100 12001

2

3

4

product

price

LM

IS

LMnew

ISnew

AS

AD

ASnew

ADnew

Increase in A

O. Afonso, P. B. Vasconcelos Computational Economics 30 / 32

Page 31: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Highlights

The AD–AS model explains price level and output considering therelationship between aggregate demand and aggregate supply.The AD curve is defined by the IS–LM equilibrium and the AS curvereflects the labour market.Iterative numerical methods for nonlinear problems are introduced.Newton and quasi-Newton methods for the approximate solution ofnonlinear (system of) equation(s) are briefly explained.

O. Afonso, P. B. Vasconcelos Computational Economics 31 / 32

Page 32: Chapter 4 AD–AS · Overview 1 Introduction 2 Economic model 3 Numerical solution 4 Computational implementation 5 Numerical results and simulation 6 Highlights 7 Main references

Main references

M. Burda and C. WyploszMacroeconomics: a European textOxford University Press (2009)

G. Dahlquist and Å BjörckNumerical methods in scientific computingSociety for Industrial Mathematics (2008)

R. J. GordonMacroeconomicsPearson Education (2011)

C. T. KelleyIterative Methods for Linear and Nonlinear EquationsSociety for Industrial Mathematics (1995)

N. G. MankiwMacroeconomicsWorth Publishers (2009)

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