103
Higher-Order Perturbation & Penalty Functions Wouter J. Den Haan with contributions by Joris de Wind & Ken Judd August 16, 2016

Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Higher-Order Perturbation& Penalty Functions

Wouter J. Den Haan with contributions by Joris de Wind &Ken Judd

August 16, 2016

Page 2: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Outline

1 Reasons why nonlinearities matter more when modellingidiosyncratic risk

2 Problems with higher-order perturbation solutions

3 Using penalty functions instead of inequality constraints

Page 3: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Non-linearities more important forindividual

Reasons:

1 Higher variance state variables

2 Frictions

3 Inequality constraints matter

Page 4: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Need for higher-order perturbationsolutions?

• for risk to matter =⇒ need at least 2nd-order• welfare comparison =⇒ need at least 2nd-order• for risk premiums to be cyclical =⇒ need at least 3th-order• idiosyncratic risk =⇒ need at least ?th-order• models with interesting frictions =⇒ need at least ?th-order• models about the financial crisis =⇒ need at least ?th-order

Page 5: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Problems of higer-order perturbation

• Well-known problem for lots of model solvers• Higher-order perturbation solutions are often explosive• Standard solution is pruning:

• this creates an ugly distortion of underlying perturbationsolution

• Perturbation solutions have more problems• for example weird shapes

• What can be done?

Page 6: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Outline

• Polynomial approximations and its problems• Pruning and its problems• Understanding what perturbation is• Understanding the flexibility of perturbation• Some ideas on how to exploit this flexibility

Page 7: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Polinomial approximations

x+1 = h(x) ≈ pN(x; αN)

How to find αN?

• Perturbation, Taylor series expansion around x• Projection method

Page 8: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Problems of higher-order polynomials

• oscillating patterns =⇒ not shape preserving• often explosive behavior

x+1 = h(x) ≈ pN(x)

limx→∞

∂pN(x)∂x

= ±∞

limx→+∞

∂pN(x)∂x

= +∞ =⇒ no global convergence

limx→+∞

∂pN(x)∂x

= −∞ =⇒ function must turn negative

Page 9: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Is convergence guaranteed?

• Projection methods:• even uniform convergence (with Chebyshev nodes)• of course only within the grid

• Taylor series expansion• limited radius of convergence• unless function is analytic

• Huge difference!!!• grid is controlled by model solver• radius of convergence is not

Page 10: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Couple examples

• sometimes you get great global approximations• Sometimes you do not. We will look at

• limited radius of convergence• problems with weird/undesirable shapes• stability problems

Page 11: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Example with simple Taylor expansion

Truth is a polynomial:

f (x) = −690.59+ 3202.4x− 5739.45x2

+4954.2x3 − 2053.6x4 + 327.10x5

defined on [0.7, 2]

Page 12: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

0.8 1 1.2 1.4 1.6 1.8 2­10

­5

0

5

10truth and level approximation of order: 1

0.8 1 1.2 1.4 1.6 1.8 2

0

20

40

60

80

100truth and level approximation of order: 2

Figure: Level approximations

Page 13: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

0.8 1 1.2 1.4 1.6 1.8 2

0

50

100truth and level approximation of order: 3

0.8 1 1.2 1.4 1.6 1.8 2

­300

­200

­100

0truth and level approximation of order: 4

0.8 1 1.2 1.4 1.6 1.8 2­10

0

10truth and level approximation of order: 5

Figure: Level approximations continued

Page 14: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Approximation in log levels

Truth is no a polynomial.Think of f (x) as a function of z = log(x). Thus,

f (x) = −690.59+ 3202.4 exp(z)− 5739.45 exp(2z)+4954.2 exp(3z)− 2053.6 exp(4z) + 327.10 exp(5z).

Page 15: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

0.8 1 1.2 1.4 1.6 1.8 2­10

0

10truth and log level approximation of order: 1

0.8 1 1.2 1.4 1.6 1.8 2

0

50

100truth and log level approximation of order: 3

0.8 1 1.2 1.4 1.6 1.8 2­100

­50

0

truth and log level approximation of order: 5

Figure: Log level approximations

Page 16: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

0.8 1 1.2 1.4 1.6 1.8 2­100

­50

0

truth and log level approximation of order: 7

0.8 1 1.2 1.4 1.6 1.8 2­20

­10

0

10

truth and log level approximation of order: 9

0.8 1 1.2 1.4 1.6 1.8 2­10

0

10truth and log level approximation of order: 12

Figure: Log level approximations continued

Page 17: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

ln(x) & Taylor series expansion

ln(x)− ln(x) ≈xx− 1

2!

(xx

)2

+2!3!

(xx

)3

− 3!4!

(xx

)4

+ · · ·+ (−1)N−1 (N− 1)!N!

(xx

)N

=

xx− 1

2

(xx

)2

+13

(xx

)3

− 14

(xx

)4

+ · · ·+ (−1)N−1 1N

(xx

)N

with x = x− x

For which x can we expect things to go wrong?

Page 18: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

ln(x) & Taylor series expansions at x = 1

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

ln(x)

1st

2nd

5th

25th

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

1st

2nd

ln(x) 1st 2nd 5th 25th

Page 19: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

ln(x) &Taylor series expansions at x = 1.51 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

ln(x)

1st

2nd

5th

25th

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

1st

2nd

ln(x) 1st 2nd 5th 25th

Page 20: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

ln(x) &Taylor series expansions at x = 1.51 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

ln(x)

1st

2nd

5th

25th

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

1st

2nd

ln(x) 1st 2nd 5th 25th

Page 21: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation verus projection

• Projection methods =⇒ uniform convergence within the grid• You control the grid

Page 22: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

ln(x) & projection approximation in [0,2]

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

ln(x)

1st

2nd

5th

25thU = 2

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

1st

2nd

U = 3

ln(x) 1st 2nd 5th 25th

Page 23: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

ln(x) & projection approximation in [0,3]1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

ln(x)

1st

2nd

5th

25thU = 2

1 1.5 2 2.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

1st

2nd

U = 3

ln(x) 1st 2nd 5th 25th

Page 24: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Problems with preserving shape

h(x) = 0.5xα + 0.5x

• α is an integer =⇒ h(x) is a polynomial• α is odd =⇒ ∂h(x)/∂x > 0

Page 25: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation approximation & preservingshape

0 0.5 1 1.50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

x

10th

2nd

true value 2nd 10th

Page 26: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Projection approximation & preservingshape

0 0.5 1 1.50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

x

true value 3 nodes 11 nodes

3 nodes

11 nodes

Page 27: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Problems with preserving shape

• nonlinear finite-order polynomials always have "weird" shapes• weirdness may occur close to or far away from steady state• thus also in the standard growth model

Page 28: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Standard growth model and odd shapesdue to perturbation (log utility)

0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55

0.16

0.18

0.2

0.22

0.24

0.26

2nd-order

45 degree

truth

Page 29: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Standard growth model and odd shapesdue to perturbation (log utility)

0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55

0.16

0.18

0.2

0.22

0.24

0.26

45 degree

truth

3rd-order

Page 30: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Problems with stability

h(x) = α0 + x+ α1e−α2x

x+1 = h(x) + shock+1

• Unique globally stable fixed point

Page 31: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation approximation & stability

0 0.5 1 1.5 2 2.5 3 3.5 4

0

0.5

1

1.5

2

2.5

3

3.5

4

x

2nd

true value 2nd 45-degree

x*

x**

Page 32: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Model

maxct,at∞

t=1

E∞

∑t=1

βt−1 c1−νt − 11− ν

− P(at)

s.t.

ct +at

1+ r= at−1 + θt

θt = θ + εt and εt ∼ N(0, σ2)

a0 given.

Page 33: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Penalty function

Standard inequality constraint

a ≥ 0

corresponds to

P(a) =

∞ if a < 00 if a ≥ 0

Flexible alternative:

P(a) =η1η0

exp(−η0a)− η2a.

Page 34: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Our penalty function

• can be approximated globally with Taylor series expansion• linear part, −η2a

• not necessary• steady state can be equal to the one without penalty function

Page 35: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Interpreting the penalty function

1 penalty function implements inequality constraint

• η0 must be very high

2 penalty function is alternative to penalty function

• η0 could be high or low

Page 36: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Calibrating the penalty function

• η0, η1, and η2 can be chosen to match data characteristics• Here:

• different values for curvature parameter, η0• η1 and η2 chosen to match mean and standard deviation of at

• many properties of this model similar to "a ≥ 0" model• but tail behavior is different

Page 37: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

FOC

c−νt

1+ r+

∂P(at)

∂at= βEt

[c−ν

t+1]

Page 38: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Penalty term in FOC; eta0=10

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-0.05

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

Page 39: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Penalty term in FOC; eta0=20

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-0.045

-0.04

-0.035

-0.03

-0.025

-0.02

-0.015

-0.01

-0.005

0

0.005

Page 40: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation solutions when η0 = 10

1 1.5 2 2.5

-0.2

0

0.2

0.4

0.6

0.8

x

a1st

3rd

5th

"Truth" 1st 2nd 3rd 4th 5th

1 1.5 2 2.50

200

400

600

800

1000

1200

Page 41: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation solutions when η0 = 20

1 1.5 2 2.5

-0.2

0

0.2

0.4

0.6

0.8

x

a 1st

2nd3rd

4th

5th

"Truth" 1st 2nd 3rd 4th 5th

1 1.5 2 2.50

200

400

600

800

1000

1200

Page 42: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation and higher uncertainty

• oscillations more problematic when σ ↑• (more likely to get into problematic part)

• but higher-order perturbation solution adjust when σ ↑• (problematic part may move away from steady state)

Page 43: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Fifth-order perturbation and uncertainty

1 1.5 2 2.5-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

x

a

5th = 0.3

= 0

Page 44: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Simulating

• 2nd & 3rd explode• 4th & 5th are inaccurate

Page 45: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - procedure

All steady states are set equal to 0 to simplify notation

Page 46: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - procedure

1. Split up perturbation solution into two partspN,pert(at−1, θt) =

linear part γN,kat−1 + γN,θθt

nonlinear part +pN,pert (at−1, θt)

Page 47: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - procedure

2. Simulate a∗t using

a∗t = γN,ka∗t−1 + γN,θθt

3. Simulate aprune,t using

aprune,t= γN,kaprune,t−1 + γN,θθt + pN,pert

(a∗t−1, θt

)

Page 48: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - procedure

aprune,t= γN,kaprune,t−1 + γN,θθt + pN,pert

(a∗t−1, θt

)• aprune,t is not a function of just the state variables

• aprune,t−1 and θt

• aprune,t also depends on a∗t−1 =⇒aprune,t is a correspondence of state variables

Page 49: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation principle• Objective of perturbation: If h(x) is such that

f (h(x)) = 0 ∀x

then we want to solve for

happrox(x) = h (x) +∂h(x)

∂x

∣∣∣∣x=x

(x− x) +∂2h(x)

∂x2

∣∣∣∣x=x

(x− x)2

2!

+ · · ·+ ∂nh(x)∂xn

∣∣∣∣x=x

(x− x)n

n!

• Pruning does not generate a function of the form

h(x)

• As a function of x you get a correspondence

Page 50: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Why don’t you get a policy function?

Additional state variables introduced by pruning procedure=⇒ hprune is not a function of x

Page 51: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Why don’t you get a policy function?

1 2 3 40.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

t

a

Modified 1st

2nd

Pruned 2nd

A

B

C

Page 52: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - graphs

Our model only has one state variable, xt = at−1 + θt

• Generate aprune,tTt=1

• plot aprune,t as function of xprune,t = aprune,t + θt

Page 53: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - second-order

Page 54: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - third-order

Page 55: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - fourth-order

Page 56: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Pruning - fifth-order

Page 57: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Improvements

• simple improvements• improvements based on alternative perturbation solutions

Page 58: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Measuring data

Data:length of observed data set Tnobs :

observed data yTnobs = yt,dataTnobst=1 :

moment of interest M(

yTnobsi

)

Page 59: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Original Kydland and Prescott approach:

Model:data generated in ith replication yTnobs

i = yt,iTnobst=1 :

mean of moment of interest MI =∑I

i=1 M(

yTnobsi

)I

st. dev. of moment of interest∑I

i=1

(M(

yTnobsi

)−MI

)I

Page 60: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Most common approach

Model:data generated in 1 replication yTlarge

i = yt,iTlarget=1 :

mean of moment of interest M(

yTlargei

)st. dev. of moment of interest 0

Page 61: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Differences

• In general:lim

Tlarge→∞M(

yTlargei

)6= lim

I→∞MI

except for first-order moments• KP approach deals with fact that small sample results maydifferent

Page 62: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Back to explosive perturbation solutions

• (perturbation) approximations explode =⇒use KP instead of the Tlarge approach

• But sharply diverging behavior still possible• Solution: simply exclude those replications• Drawbacks:

• need a criterion to exclude• need initial conditions

Page 63: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Exclusion criterion

• M1stI : moment according to first-order perturbation solution

• Exclude ith sample if

M(

yTnobsi

)> ΛM1st

I

• We experimented with Λ = 2, 3

Page 64: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Initial conditions

• Ideally: initial conditions drawn from ergodic distribution• One can approximate this using first-order solution (which isstable)

Page 65: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Understanding perturbation

Let

h(k) = truth

g(k; γ) = approximation

• Find coeffi cients γ such that

∂gn(k; γ)

∂kn

∣∣∣∣x=x

=∂hn(k)

∂kn

∣∣∣∣x=x

for n = 0, 1, · · · , N

Page 66: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Understanding perturbation’s flexibility

1 You are not restricted to use polynomials

2 Values of∂gn(k; γ)

∂kn

∣∣∣∣x=x

for n > N

are not restricted to be anything

Page 67: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Exploiting higher-order degrees of freedom• Suppose you are given

h(k),∂h(k)

∂k,

∂h2(k)∂k

and consider

g(k; η) = η0 + η1(k− k) + η2(k− k)2 + η3(k− k)3

• Standard perturbationη3 = 0

• But this is arbitrary• Derivatives have no information on this• You could use this additional degree of freedom to implementanother desired property

Page 68: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Exploit functional form flexibility• Suppose you are given

∂hn(k)∂kn

∣∣∣∣x=x

for n = 0, 1, · · · , N

• You would like to use

g(k; η) = η0g0(k) + η1g1(k) + · · ·+ ηNgN(k)

• Solve for the values of a from the following N+ 1 equations

∂hn(k)∂kn

∣∣∣∣k=k

=[η0, η1, · · · , ηN

]

∂gn0(k)

∂kn

∣∣∣k=k

...∂gn

N(k)∂kn

∣∣∣k=k

Page 69: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Simple example

1/x

• Fourth-order Taylor series expansion

1/x ≈ 1− (x− 1) + 2 (x− 1)2 − 6 (x− 1)3 + 24 (x− 1)4

• Alternative

1/x ≈ η0e−2(x−1) + η1e−2(x−1)(x− 1) + η2e−2(x−1)(x− 1)2

+η3e−2(x−1)(x− 1)3 + η4e−2(x−1)(x− 1)4

• note that this is not a transformation

Page 70: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Standard Taylor expansion

0.5 1 1.5 2 2.50

20

40

60

80

100

120

Page 71: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Alternative Taylor expansion

0.5 1 1.5 2 2.50.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Page 72: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Generate stable perturbation solutions

1 Use alternative basis functions

• trivial modification for 2nd-order perturbation

2 Use a perturbation-consistent weighted combination

Page 73: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Alternative basis functions

• Original model:F(k−1, k, k+1) ≡ 0

F (k−1, h(k−1), h(h(k−1))) ≡ 0

• From (say) Dynare you get

g(k; η) = η0 + η1k− k) + η2(k− k

)2

Page 74: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Alternative basis functions

• Instead of g(k; η) use g(k; η)

g(k; η) = η0 + η1(k− k

)+ η2

(k− k

)2 exp(−(k− k

)2)

• Globally stable for |η1| < 1

Page 75: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Alternative basis functions

• Implementing perturbation principle: solve η from

g(k; η) = h(k)

∂g(k; η)

∂k=

∂h(k)∂k

∂g2(k; η)

∂k2 =∂2h(k)

∂k2

• Amazing but true:η = η

Page 76: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Alternative basis functions

0 0.5 1 1.5 2 2.5 3 3.5−1.5

−1

−0.5

0

0.5

1

1.5

2

2.5

3

cash on hand

asse

tsPolicy function assets

1st−order2nd−order2nd−order alternative45−degree (shifted)

Page 77: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Alternative basis functions

• How to remain closer to underlying second-order perturbation?

• Useexp

(−α(k− k

)2)

and choose low value of α

Page 78: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

• Original model:F(k−1, k, k+1) ≡ 0

• add new variable y and new equation

k =y × exp−α(k−1 − k)2

+(

η1st,0 + η1st,1k−1

(1− exp−α(k−1 − k)2

)• α controls speed of convergence towards stable part

Page 79: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

• Solve for perturbation solutions of hk(k−1) and hy(k−1)

• Do not use hk(k−1), but use

k = hk(k−1) =

hy(k−1) × exp−α(k−1 − k)2

+(

η1st,0 + η1st,1k−1

(1− exp−α(k−1 − k)2

)

Page 80: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

• Approximation is a function not a correspondence• Derivatives of hy(k−1) correspond to true derivatives at k =⇒• Derivatives of hk(k−1) correspond to true derivatives at k• and k = hk(k−1) is globally stable

Page 81: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Note the difference with

k = hk(k−1) =

pkth(k−1) × exp−α(k−1 − k)2

+(

η1st,0 + η1st,1k−1

(1− exp−α(k−1 − k)2

)• Derivatives of hk(k−1) are not correct derivatives of h(k−1)

Page 82: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

1 1.5 2 2.5 3 3.5

-0.2

0

0.2

0.4

0.6

0.8

x

a

"Truth" 1st 2nd 3rd 4th 5th

1 1.5 2 2.5 3 3.50

200

400

600

800

1000

1200

x

Page 83: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

400 420 440 460 480 500−0.2

0

0.2

0.4

0.6

0.8

time

asse

tsSimulation assets

truth5th−order5th−order weighting

Page 84: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

400 420 440 460 480 500−0.2

0

0.2

0.4

0.6

0.8

time

asse

tsSimulation assets

truth3rd−order3rd−order weighting

Page 85: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

How to choose alpha?

How to choose α?

• Not that diffi cult if you can plot the policy function• Make estimated guess

• e.g., 3 standard deviations away from s, weight on first-ordershould be 0.28

• Try different values for α and use accuracy test (e.g. dynamicEuler equation test)

Page 86: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Perturbation consistent weighting

1 1.5 2 2.5 3 3.5

-0.2

0

0.2

0.4

0.6

0.8

x

a

"Truth" 5th-order = 0.5 = 1 = 2 = 5

1 1.5 2 2.5 3 3.50

200

400

600

800

1000

1200

x

Page 87: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Multi-dimensional problems

• Let s be the N× 1 vector of state variables• Solve first-order solution: k = a1st,0 + a′1st,1s• Calculate Ω, the variance covariance matrix of st

Page 88: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

How to choose alpha?

Use

k = hy(x) × exp− α

N (s−1 − s)′Ω−1(s−1 − s)

+(a1st,0 + a1st,1s

(1− exp

− α

N (s−1 − s)′Ω−1(s−1 − s))

or

k =hy(x) × exp

− α

N (s−1 − skth)′Ω−1(s−1 − skth)

+(

akth ,0 + akth ,1s)×

(1− exp

− α

N (s−1 − skth)′Ω−1(s−1 − skth)

)

Page 89: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Multidimensional problems

• Try different values for α and use accuracy test

• e.g. dynamic Euler equation test

Page 90: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Penalty functions

• to approximate inequality constraint• to describe feature in actual economy

Page 91: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Overview

• Example• How to choose parameters• Different from inequality constraint?• Blanchard-Kahn conditions• Functional form

• try to get them analytic• stay in space of perturbation approximation

Page 92: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Example

P(a) =η1η0

exp(−η0a)− η2a.

Page 93: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Calibrating the penalty function

• η0, η1, and η2 can be chosen to match data characteristics

• η0 clearly a key parameter

Page 94: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Penalty versus inequality

• different values for curvature parameter, η0

• η1 and η2 chosen to match mean and standard deviation of at• =⇒ these two properties "correct"• how different is tail behavior when no numerical errors aremade?

Page 95: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Lower tail

We look at

• Amin: minimum value of A attained• Q1: first quintile• D1: first decile• D2: second decile

Page 96: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

26

Lower-tail CDF errors

-0.3000

-0.2500

-0.2000

-0.1500

-0.1000

-0.0500

0.0000

0.0500

η0 =

1

η0 =

2

η0 =

5

η0 =

10

η0 =

20

η0 =

30

η0 =

40

η0 =

50

η0 =

60

η0 =

70

η0 =

80

η0 =

90

η0 =

100

η0 =

120

η0 =

150

η0 =

200

η0 =

300

η0 =

500

η0 =

1000

η0 =

2000

η0 =

10000

AminQ1 D1 D2

Figure 4.2 lower-tail CDF errors

In table 4.2a and 4.2b the relative deciles stand out as there seems to be no convergence

to the constraint model. Yet, this is only a matter of numerical difficulties. Small errors in

the lower-tail of the cumulative density function result in large errors in the relative

deciles. This amplification is caused by the steepness of the cumulative density function

around zero, that is the large mass around zero. Even if the errors in the cumulative

density function of the punishment model become very small, the large errors in the

relative deciles will not disappear, because the cumulative density function of the

constraint model is vertical at zero.

In figure 4.3, we present for a few correlations the percentage error in comparison with

the constraint model. It catches the eye that all correlations are too high. We brief on the

correlation that is the least off and the correlation that is the most off. First, the

correlation between consumption and income is the least off. This implies that

consumption smoothing is not too much affected by using a punishment function instead

of the borrowing constraint. The punishment function facilitates consumption smoothing

Page 97: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

First-order condition

c−νt

1+ r+ η1 exp

(−η0a

)− η2 = βEt

[c−ν

t+1]

Page 98: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Suppose there is no penalty function

Eigenvalues

λ+ = 1+ r

λ− =1

(1+ r)β

typical impatience assumption:

β <1

1+ r

=⇒BK conditions not satisfied

Page 99: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

How to satisfy Blanchard-Kahn conditions?

• Put in penalty function• Will Blanchard-Kahn condition be satisfied?

• possibly not for high value of η0• penalty term too flat at high η0 values

Page 100: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

How to satisfy Blanchard-Kahn conditions?

• Are local dynamics necessarily unstable for high η0?• NO

• with uncertainty:• higher-order perturbation change first-order term

• How to implement this with Dynare?

Page 101: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Functional forms used

• Preston and Roca (2007)

P(a) =η

(a− a)2

• Kim, Kollmann, and Kim (2010)

η

(ln

aass− a− ass

ass

)• Drawback of both:

• not analytic

Page 102: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Functional forms used

• Den Haan and De Wind (2010)

P(a) =η1η0

exp(−η0a)− η2a

• Advantage• analytic

• Drawback• not clear how perturbation solution will behave

Page 103: Higher-Order Perturbation & Penalty Functions · Calibrating the penalty function h 0, h 1, and h 2 can be chosen to match data characteristics Here: di⁄erent values for curvature

Introduction problems DSGE model perturbation solution pruning Alternatives to pruning Penalty functions

Possible fix

• Suppose you use second-order approximation• Let P(a) be such that

• ∂P(a)∂a = η0 + η1a+ η2a2

• problematic behavior far enough away from steady state