Notes on Difference Equations for Macroeconomics

Total Page:16

File Type:pdf, Size:1020Kb

Notes on Difference Equations for Macroeconomics

Notes on Difference Equations for Macroeconomics

- Many economic problems have an inter-temporal or dynamic element.

e.g. saving, investment, economic growth, inflation and price dynamics, debt dynamics, natural resource use, asset pricing, etc.

What are difference equations?

- Difference equations describe a discrete dynamic relationship: a sequence of values of some variable (y).

- Current values are defined recursively: there is a rule describing how current values (yt) are related to

previous numbers in the sequence (yt-1, yt-2 etc).

e.g. yt = a yt-1 + b

- Difference equations treat time as discrete t=1,2,3...T .

- Differential equations are their continuous time counterpart.

Some Difference Equation Terminology:

- Order: how many lags does the current value depend upon? - 1 lag is first-order (see the equation above) - 2 lags is second-order

e.g. yt= a1yt-1 + a2yt-2 +b - higher order difference equations: more lags! - our applications are all either 1st or 2nd order.

- Homogeneous or non-homogeneous:

- Homogeneous: RHS terms depend only on lags of the LHS variable.

e.g. yt= a1yt-1 + a2yt-2

- Non-homogenous: RHS also contains constants and/or terms that depend of values of other variables (x)

e.g. yt= a1yt-1 + a2yt-2 +b or yt= a1yt-1 + a2yt-2 +bxt-1

- Can often change non-homogeneous to homogeneous by expressing it as a deviation from its long-run value (see below).

1 - Some other distinctions? - Deterministic or stochastic: deterministic has no stochastic shocks. -macroeconomics: often stochastic but not in our applications.

- Time enters the equation explicitly (nonautonomous) or not (autonomous) t e.g. yt= a1yt-1 + a2yt-2 +b is non-autonomous

- Linear or non-linear: is the relationship between yt and past y non-linear? - non-linear relationships common in macroeconomic theory. - But: use of linear approximations is common when applying or analysing the models.

- Multivariate: could have systems of interdependent difference equations

e.g. xt= a1 xt-1 + a2yt-1 + b and yt= c1 yt-1 + c2xt-1 + d

First Order Difference Equations:

- Most cases in Wickens are linear (often by using a linear approximation of a non-linear equation).

- will talk mostly about linear versions.

- A simple case: yt = a yt-1 + b a, b constants.

- An “equilibrium”, “steady state” or “fixed point” is a value of y which remains unchanged over time (call this value y*).

i.e. yt=yt-1=y* once at that value you stay there.

What is y*?

yt = ayt-1 +b becomes y*= ay* +b if at the fixed point

y* = b/(1-a) (note: for a=1 no fixed point)

- Difference equations are often written in terms of deviations from y*: use : y* = ay* + b

subtracting from yt = ayt-1 +b gives:

yt –y* = a (yt-1 –y*) which is homogenous.

2 - A simple linear first-order difference equation in pictures:

- Let’s use yt = ayt-1 +b and set b=10.

- Given a starting value (y0=4 in the spreadsheet) and a value for ‘a’ can see dynamics (see spreadsheet).

a=0 y jumps from y0 to y=10 and is then constant.

a=1 y grows by b=10 each period (yt=y0+bt) a>1 y explodes exponentially 01 y cycles around y* but explodes.

a=-1 y cycles around y* (5 for a=-1 and b=10), i.e. either -y0+b and-y0+2b each period.

- Note the variety of dynamics possible even in this simple case.

3 - As the diagrams above illustrate the sequence converges to y* if 0<|a|<1.

- Plotting yt vs. yt-1 is a useful way of thinking about dynamics:

- Value of ‘a’ and whether it converges to y*. (yes if 0<|a|<1 no if |a|>1)

4 5

- Such diagrams can be useful for thinking about non-linear difference equations to:

6 Solving a linear first-order difference equation:

- Take a slightly more general case than above:

yt = ayt-1 +bxt-1 + d

so yt depends on past y, past x and a constant d.

- Solution? We want an equation expressing the current yt in terms of some “end” value of y, values of x (if any) and parameters (a,b,d).

- Backward solution: end value is starting value in the sequence (y0).

- Forward solution: end value is the terminal value (say T is last period) of the sequence (yT).

( think in terms of the diagrams with yt and yt-1 on the axes: backward – start with an initial y and ask how y will evolve; forward - start with some future y and work back to the present. )

7 Backward solution

- Substitute for yt-1 with yt-1 = ayt-2 +bxt-2 + d:

yt = a(ayt-2 +bxt-2 + d) +bxt-1 + d

2 = a yt-2 +abxt-2 + bxt-1 + ad+ d now substitute yt-2= ayt-3 +bxt-3 + d to get:

2 = a (ayt-3 +bxt-3 + d)+abxt-2 + bxt-1 + ad+ d

3 2 2 = a yt-3 +a bxt-3+abxt-2 + bxt-1 + a d+ ad+ d repeat for yt-3, then yt-4 etc. until reach the

starting value (call it y0)

t 2 t-1 2 t-1 yt = a y0 + b (xt-1 +axt-2 + a xt-3 +...+ a x0) +d (1+a+a +...+a )

t s-1 t yt = a y0 + b xt-s +d(1-a )/(1-a) using formula for geometric series: (1+a+a2+...+at-1)=(1-at)/(1-a)

- solution: describes the entire sequence of y in terms of starting value of y, past values of x and parameters.

- if |a|<1 (and term in x converges too) yt converges to: s-1 yt= b xt-s +d/(1-a) as t→∞

-If there are no x’s in equation (b=0) then the solution is:

t t yt= a y0+ d(1-a )/(1-a)

- consistency with diagrams above if |a|<1 converges to y*=d/(1-a) as t→∞ (monotonically if a>0 and via dampening oscillations if a<0)

- Expressed as a deviation from y*=1/(1-d) gives the homogenous difference equation: t yt-y*= a (y0-y*)

with |a|<1 and with t→∞ solution converges to y*

8 Forward solution:

- Solution where the current value is expressed in terms of current and future variables.

- Why? Some economic applications current decisions and outcomes do depend on future values. e.g. decision to buy something now depends on expected future prices.

- Can be useful when looking at unstable cases where |a|>1.

- Start with the same difference equation as above; assume it holds up to some final period T:

yt = ayt-1 +bxt-1 + d

- Put yt-1 on LHS: yt-1=(1/a)yt -(b/a)xt-1-d/a

or one period forward: yt=(1/a)yt+1 -(b/a)xt-d/a

- Solve forward, i.e. equation suggests:

yt+1=(1/a)yt+2 -(b/a)xt+1-d/a,

yt+2=(1/a)yt+3 -(b/a)xt+2-d/a etc.

substitution gives:

yt =(1/a)yt+1 -(b/a)xt-d/a

= (1/a)[ (1/a)yt+2 -(b/a)xt+1-d/a ] - (b/a)xt-d/a

= (1/a)[ (1/a)((1/a)yt+3 -(b/a)xt+2-d/a) ] - (b/a){(1/a)xt+1+ xt}- (d/a){(1/a)+1}

3 2 2 = [ (1/a) yt+3 ] - (b/a){(1/a) xt+2+(1/a)xt+1+ xt}- (d/a){( (1/a) +(1/a)+1} . . . T s s yt = (1/a) yt+T - (b/a) xt+s - (d/a)

this is the forward solution: gives yt in terms of end value

(yt+T), future x and parameters.

Last term is a geometric series, use this to rewrite the solution as:

T s T yt = (1/a) yt+T - (b/a) xt+s - (d/a)(1/a) ] / [1-(1/a)]}

T s or: yt= (1/a) (yt+T -y*) - (b/a) xt+s + y*

9 (this last step uses: d/(1-a) + (1/a)T)d/(1-a)= y*-(1/a)T)y* with y*=d/(1-a) )

With no x’s (b=0): T yt-y*= (1/a) (yt+T -y*)

- Convergence? possible if |a|>1

T Also need: limit of (1/a) yt+T must be 0 (so yt+T not exploding faster than than (1/a)T is imploding.

Then converges to: s yt= - (b/a) xt+s + y* (y* if b=0)

An Economic Example: The Cobweb Model

Demand for output: Dt = c1 –c2 Pt D = quantity demanded, P= price

Supply of output: St= b1 + b2 Pt-1 S= quantity supplied – depends on previous period price (may be so in agriculture).

c1,c2,b1,b2 all positive

Equilibrium: Dt = St Current price is where supply=demand

c1 –c2 Pt = b1 + b2 Pt-1

Solving for Pt: Pt= [(c1-b1)/c2 ]– (b2/c2)Pt-1 a linear first-order difference equation or: Pt=aPt-1 +d a=– (b2/c2) and d=(c1-b1)/c2

Solving the difference equation backwards gives: t t Pt= a P0+ d(1-a )/(1-a)

P* is the fixed point: P* =aP* +d so P*= d/(1-a) = (c1-b1)/(c2+b2)

The difference equation as a deviation from P* is: Pt-P*=a(Pt-1 -P*)

t the solution to this: Pt-P*= a (P0-P*)

Converges on P* if 0<|a|<1 if 0<|b2/c2|<1 : which is more responsive to price demand or supply?

10 Second-Order Difference Equations:

- Second order difference equation: current value depends on values one and two periods ago.

yt = a1 yt-1 + a2 yt-2 +d (assuming no x’s here)

- Equilibrium if it exists: y*= yt = yt-1 = yt-2

y*= a1 y* + a2 y*+d so: y* = d/(1-a1-a2)

- Subtracting y* gives the homogenous 2nd order difference equation:

yt–y*= a1 (yt-1–y*)+ a2 (yt-2 –y*) will look at this below.

- Solving a homogenous second-order difference equation:

- Iterative or recursive techniques do not give straightforward results.

- How usually solved?

- Assume the solution is similar to that of a first order homogenous difference equation: t yt = a y0

- Say the homogeneous 2nd order difference equation has the form:

yt + a1 yt-1 + a2 yt-2 = 0 (everything on LHS – following Goldberg)

t assume solution has the form: yt = Am (A and m are constants)

substitution gives: t t-1 t-2 Am + a1 Am + a2 Am = 0

divide by Amt-2:

t-2 2 Am (m +a1m+a2) = 0 must hold for a solution.

- Focus on non-trivial solutions (trivial? e.g. A=0) :

2 Need the roots m1, m2 of : (m +a1m+a2) = 0

(use quadratic formula: = with a=1,b=a1, c=a2)

t t Call solutions: Cm1 or Bm2 (constant will differ depending on root so C and B instead of just A)

11 t t - General solution: Cm1 + Bm2

t t i.e. if Cm1 or Bm2 are both solutions then:

t t-1 t-2 Cm1 + a1 Cm1 + a2 Cm1 =0 and t t-1 t-2 Bm2 + a1 Bm2 + a2 Bm2 =0

adding the last two equations:

t t t-1 t-1 t-2 t-2 [Cm1 + Bm2 ] + a1 [Cm1 + Bm2 ] + a2 [Cm1 + Bm2 ] = 0

t t so Cm1 + Bm2 is a solution too.

- Particular solution: constants C and B can be solved for given the start values

(yt-1 and yt-2)

i.e. set general solution equal to start value in the appropriate period – two eqns to solve for A and B.

Example: (Goldberg)

yt -5 yt-1 + 6 yt-2 = 0

2 so: m -5m+6 = 0 then roots: m1,m2=

m1=2, m2=3

t t t t General solution: Cm1 + Bm2 = C 2 + B 3

If initial values y0 and y1 are given C and B can be obtained: 0 0 y0=C 2 + B 3 =C+B (since t=0) 1 1 y1=C 2 + B 3 =2C+3B (since t=1)

2 equations : y0= C+B and y1= 2C+3B

solve for B=y1-2y0 , C=3y0-y1

t t t t Particular solution : C 2 + B 3 = (3y0-y1)∙2 + (y1-2y0)∙3

12 - Stability of the solution:

- Given the form of the solution what does it imply about the sequence of y’s? - does it converge on the equilibrium? does it explode?

- Similar to 1st order case: need absolute values of roots <1 for convergence; negative roots: oscillations.

2 - Specifically: m +a1m +a2=0

Roots (using quadratic formula: 2 1/2 2 1/2 –a1+(a1 -4a2 ) -a1-(a1 -4a2 ) 2 2

assuming real roots |m1|<1 and |m2|<1 requires:

1+a1+a2>0 and 1-a1+a2>0 this ensures stability.

- If one of the conditions is satisfied and the other is not: one stable root and one unstable root. - this gives a saddlepath:

-Then initial conditions that give the unstable root no weight give convergence – otherwise it explodes.

(Shone: |m1|<1 and |m2|>1 In the case of (iii) the system will generally be dominated by the largest root and will tend to plus or minus infinity depending on its sign. But given the fixed point is a saddle path solution, there are some initial points that will converge on the fixed point, and these are values that lie on the stable arm of the saddle point.)

13 A System of 1 st Order Difference Equations and Second-Order Difference Equations:

- Two interdependent 1st order difference equations (a’s coefficients, z, y variables):

zt = a11 zt-1 +a12yt-1

yt = a21 zt-1 +a22yt-1

(Wickens p. 29-30 Dynamics of the Ramsey model has this form)

- This can be transformed into a 2nd-order difference equation:

st - Use 1 eqn to eliminate yt-1 from second, this gives:

yt = (a22/a12)zt + [a21-(a22/a12)a11] zt-1 (so yt-1 gone!)

- Lag the result, i.e. in t-1:

yt-1 = (a22/a12)zt-1 + [a21-(a22/a12)a11] zt-2

- substitute this for yt-1 in first equation so it is now in terms of z only and collect terms to give:

zt = (a11 +a22) zt-1 + (a12a21–a11a22) zt-2

i.e. a second-order difference equation:

Some References:

Samuel Goldberg Introduction to Difference Equations

A. Chiang Fundamental Methods of Mathematical Economics (any edition: chapters on difference equations Ch. 16,17)

A. Siebert Lecture on Difference Equations (course website)

14

Recommended publications