economics and public policy master 2 interpreting ... · pdf fileeconomics and public policy...

82

Upload: trandan

Post on 07-Mar-2018

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Economics and Public Policy

Master 2

Interpreting Macroeconomic Time

Series

Teacher

Benoit Mojon

Teaching assistants

Aurélien Poissonnier Guillaume Cléaudaurelien.poissonnier(at)insee.fr guillaume.cleaud(at)insee.fr

School Years 2008-2013

Page 2: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

This le is a compilation of the exercises created for the classes, the exams and the home assignments ofthe course Interpreting Macroeconomic Time Series, given by Benoit Mojon in M2 Economics and PublicPolicies (Ecole Polytechnique, Sciences-Po, Ensae).

It covers a wide range of basic elements in the macroeconomist's toolbox, from ltering methods toDSGE models, using Matlab or Octave and Dynare.The topics covered throughout these exercises are :

lters (Hodrick Prescott, Baxter King, linear, quadratic, mobile average...)

time series models (AR, MA, RW...), estimation (OLS) and performance in and out of sample

factor extraction and factor models

VAR estimation and structuration (Choleski, Blanchard-Quah...)

DSGE model resolution, linearization, simulation and estimation (RBC and NeoKeynesian)

For more, see

Benoit MOJON's web page : http://www.benoitmojon.com/

Aurélien POISSONNIER's web page : https://sites.google.com/site/apoissonnierrandt/home/teachings

The master's web page : http://master.sciences-po.fr/contenu/economics-and-public-policy

There are two versions of this document : with and without corrections. Teachers may contact us viae-mail for corrections. In addition, many exercises have code corrections also available upon request.

Page 3: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Contents

1 Class exercises 1

1.1 Using Octave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Time Series Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Mobile average smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4 Hodrick-Prescott lter, JMCB 1997 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.5 The neo-Keynesian Phillips curve with Taylor contracts . . . . . . . . . . . . . . . . . . . . 5

1.6 The neo-Keynesian Phillips curve with Calvo contracts . . . . . . . . . . . . . . . . . . . . . 7

1.7 King and Rebelo's RBC Model : derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.8 King and Rebelo's RBC model : Dynare Implementation . . . . . . . . . . . . . . . . . . . . 10

1.9 Solving a NeoKeynesian model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.10 Dynare implementation of the NeoKeynesian model . . . . . . . . . . . . . . . . . . . . . . . 13

1.11 Estimations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.12 Forecasting horse race . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.13 Maximum (Conditional) Likelihood estimation . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.14 VAR Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.15 Cholesky Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.16 Structural Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.17 Blanchard-Quah Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.18 Estimating an RBC model with maximum likelihood . . . . . . . . . . . . . . . . . . . . . . 20

1.19 Estimation on simulated data of a basic neoKeynesian model . . . . . . . . . . . . . . . . . 21

2 Mid-term Exams 23

2.1 Basic data manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.2 Dynare : nd the 5 errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.3 An AR(1) is a MA(ª) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.4 Oil prices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

2.5 A long time ago, in a galaxy far far away... . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

ii

Page 4: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

2.6 Dynare : buggs and basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3 Final Exams 28

3.1 Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.2 Times series analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.3 VAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.4 The Blanchard-Perotti VAR structuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.5 DSGE modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.6 DSGE estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

3.7 Habit formation utility function à la Fuhrer 2000 AER . . . . . . . . . . . . . . . . . . . . . 43

3.8 The proper way to linearize a model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3.9 Consumption bundle with two goods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

3.10 A simulated neokeynesian model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

3.11 Applications of the class material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

4 Home Assignments 51

4.1 Computing : Linear lter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.2 Computing : Linear lter with OLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

4.3 Computing : Quadratic lter with OLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.4 Modelling: Linearizing a basic RBC model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4.5 Back to the data: Price stickiness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

4.6 Analyzing the business cycle of a theoretical model . . . . . . . . . . . . . . . . . . . . . . . 57

4.6.1 A real business cycle model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

4.6.2 A neo-Keynesian model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

4.7 Reading: RBC vs Neo-Keynesians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

4.8 Reading: The value of lambda in the HP-lter . . . . . . . . . . . . . . . . . . . . . . . . . . 60

4.9 Introducing capital market and investment into a general equilibrium model . . . . . . . . 61

4.10 Investment in a Neo-Keynesian model : Dynare implementation . . . . . . . . . . . . . . . 62

4.11 Forecasting monthly consumption in goods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

4.11.1 Step 1: Analysing the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

4.11.2 Step 2: Granger Causality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

4.11.3 Step 3: Univariate analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

4.11.4 Conclusion : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5 Recreations 66

6 Maths Helps 68

Page 5: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

6.1 Log Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

6.1.1 Brief Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

6.1.2 Examples and Basic Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

6.2 VAR structuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6.2.1 Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6.2.2 Demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6.3 Kalman Filter (unnished) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Page 6: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Chapter 1

Class exercises

1.1 Using Octave

Starting with Octave :Click File, Options, and set the GNU Octave Exectuable Files Directory to

C:\Octave\Octave3.4.3_gcc4.5.2\Octave3.4.3_gcc4.5.2\bin

Then restart Gui Octave.

Q. 1.1.1. What are the extension .m and .mat ?What is the editor ? What do you use CTRL+E for ?

Q. 1.1.2. Using the function help(), nd the use and syntax of the functions save and load.Use dlmread to upload the data le "TD1-data.csv".

Q. 1.1.3. What's a for or while loop ? How do you program such loops ?How do you test conditions in octave ?

Q. 1.1.4. Calculate the time series for the real interest rate in the US.Calculate the growth rate of GDP in the Euro Area. Calculate its mean value and standard error.

Q. 1.1.5. Using the commands plot, gure, subplot, hold, title, legend :

plot US GDP in level with a legend and a title.

plot US and Euro Area GDP on two graphs but in the same window with two titles and one legend.

plot on the same gaph US and EA ination

plot on two graphs but in the same window, the superposition of US and EA ination and interestrate (with legend and titles)

1

Page 7: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.2 Time Series Analysis

Some denitions

Covariance stationary or weakly stationary :A process Yt is said covariance stationary or weakly stationary if

EYt µ ¦t

EYt µYtj µ γj ¦t, jErgodicity :

A covariance stationary process is said to be ergodic for the mean if 1~T PTt1 yt (the time average ofthe observed values) converges in probability to EYt (the ensemble average) as T ª.A process will be ergodic for the mean provided that the autocovariance γj goes to zero suciently quicklyas j becomes large. (Hamilton Chatper 3 p46)

Some basic examples

White Noise :

Eεt 0 ¦t

Eε2t σ2

¦t

Covεt, εtj 0 ¦t, j x 0

We will denote εt BB0, σ2. A well known example is an independent identically distributed (i.i.d)process whose draws are taken from a centered Gaussian distribution.

AR(1) :

Ytt>Z is an AR(1) if

- Ytt>Z is stationary

- Ytt>Z veries an equation Yt µ φYt1 εt with εt BB0, σ2 and φ x 0

Q. 1.2.1. Calculate the rst and second moment of an AR(1) process. Are there any restrictions for thisprocess to be stationnary ?

MA(1) :

Ytt>Z is an MA(1) if it veries an equation Yt m εt θεt1 with εt BB0, σ2 and θ x 0

Q. 1.2.2. Calculate the rst and second moment of an AR(1) process. Are there any restrictions for thisprocess to be stationnary ?

Random walk :Without drift :

Yt Yt1 εt ¦t

Covεt, Ytj 0 ¦t, j x 0

2

Page 8: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Q. 1.2.3. Such a process is NOT stationary. Prove it by calculating its theoretical rst and secondmoments.

With drift :

Yt µ Yt1 εt ¦t

Covεt, Ytj 0 ¦t, j x 0

Q. 1.2.4. In this case calculate the theoretical rst and second moments. Conclude.

Trend stationary process :

Yt a bt Xt

with Xtt>Z a stationary process.

Q. 1.2.5. Simulate one of each example above and plot their graphs.

Q. 1.2.6. With your simulations, compute the autocorrelations of order 1 and 2 and compare with thetheoretical value.

3

Page 9: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.3 Mobile average smoothing

Q. 1.3.1. Code a octave-matlab function, using a number n and a vector X as arguments and returning,the mobile average of order n of vector X and the deviation of X from this mobile average.

Q. 1.3.2. Use your function to extract the cycle and the trend of the US and the Euro Area GDP. Plotthem and comment. Which important events of economic history can you identify on these graphs ?

Table 1.1: US Business CycleMA-ltering NBER Business Cycle Dating

Name Peak Trough Peak TroughFirst oil supply shock 1975Q2 November 1973 March 1975Second oil supply shock 1978Q4 1980Q3 January 1980 July 1980Volcker's disination 1981Q1 1982Q4 July 1981 November 1982Savings and Loans crisis 1990Q1 1991Q4 July 1990 March 1991Dot-com bubble 2000Q2 2003Q1 March 2001 November 2001Great recession December 2007

source : www.nber.org/cycles.html

Q. 1.3.3. Same questions with ination and interest rate.

1.4 Hodrick-Prescott lter, JMCB 1997

In this exercise, you will apply the canonical HP lter to typical macroeconomic time series.

Q. 1.4.1. Using either the hp function from the matlab econometric toolbox, the one available on theclass web page or the one available on repec (http://ideas.repec.org/c/dge/qmrbcd/166.html), extractthe cycle of the US and euro area GDP.

Q. 1.4.2. Plot and comment your results. Compare with the rst exercise.

Q. 1.4.3. Same questions with ination and interest rate.

Q. 1.4.4. What is potential output ? Plot it and comment. To what extend does it depend on yourltering method ?

4

Page 10: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.5 The neo-Keynesian Phillips curve with Taylor contracts

In this exercise, you will write and linearize the neo-Keneysian Phillips curve with Taylor contracts. Asit was exposed in class, this equation introduces price rigidities in an otherwise neo-classical model.

Preliminary

We suppose that a continuum of intermediate rms produce dierentiated good Y it . These goods areaggregated by a nal sector through a Dixit-Stiglitz aggregation into Yt. We note Pt (resp. P

it ) the price

of Yt (resp. Yit ).

Yt S Y it 11λt 1λt

(1.1)

Q. 1.5.1. How do you interpret this equation ? What is λ ? What is the nal sector good, what does itstand for ?

Q. 1.5.2. Write the maximization program which would lead you to the following results :

Y it P itPt

1λtλt

Yt (1.2)

Pt S P it 1λt λt (1.3)

Taylor contracts

In a Calvo process, each price is reset at each period with an exogenous probability. In Taylor contracts,the duration of a price is set in advance and constant. There is no stochastic dimension of price settingin this approach. Yet, not all the contracts being reset at each period, this introduces price rigidities.

We note k the duration of a contract.

Q. 1.5.3. Write Pt as a function of Pt1 and Pt the optimal price chosen by rms who can reset theirprice at date t.

Note: there is no indexation of prices if they are not reset.

Q. 1.5.4. Linearize this equation around Π 1, the steady state ination level.

Firms' maximization program

Q. 1.5.5. What it the prot of a rm (using the average production cost)? What is the rms' discountfactor ?

Firms discount factor is βtUct.Q. 1.5.6. Solve the rm's program when it resets its price.

Q. 1.5.7. Linearize this program.

5

Page 11: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

NKPC

Q. 1.5.8. Now you can write the neo-Keynesian Phillips curve.

Q. 1.5.9. Simplify this equation with k=2.

6

Page 12: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.6 The neo-Keynesian Phillips curve with Calvo contracts

In this exercise, you will write and linearize the neo-Keneysian Phillips curve with Calvo contracts. Asit was exposed in class, this equation introduces price rigidities in an otherwise neo-classical model.

Preliminary

We suppose that a continuum of intermediate rms produce dierentiated good Y it . These goods areaggregated by a nal sector through a Dixit-Stiglitz aggregation into Yt. We note Pt (resp. P

it ) the price

of Yt (resp. Yit ).

Yt S Y it 11λt 1λt

(1.4)

Q. 1.6.1. How do you interpret this equation ? What is λ ? What is the nal sector good, what does itstand for ?

Q. 1.6.2. Write the maximization program which would lead you to the following results :

Y it P itPt

1λtλt

Yt (1.5)

Pt S P it 1λt λt (1.6)

Calvo contracts

In a Calvo process, each price is reset at each period with an exogenous probability 1 ξ. This proba-bility is independant of the date of the previous price setting.

The average duration of a contract is thus :

EDt

ª

Qt1

PDt tt ª

Qt1

1 ξξt1t (1.7)

1 ξ ªQt0

tξt1 1 ξ d

dξªQt0

ξt (1.8)

1 ξ ddξ

1

1 ξ 1 ξ 1

1 ξ2

1

1 ξ(1.9)

Q. 1.6.3. Write Pt as a function of Pt1 and Pt the optimal price chosen by rms who can reset theirprice at date t.

Note: there is no indexation of prices if they are not reset.

Q. 1.6.4. Linearize this equation around Π 1, the steady state ination level.

7

Page 13: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Firms' maximization program

Q. 1.6.5. What it the prot of a rm (using the average production cost)? What is the rms' discountfactor ?

Q. 1.6.6. Solve the rm's program when it resets its price.

Q. 1.6.7. Linearize this program.

NKPC

Q. 1.6.8. Now you can write the neo-Keynesian Phillips curve.

8

Page 14: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.7 King and Rebelo's RBC Model : derivation

The model we describe in this section is from King and Rebelo (1999).

Preferences : The economy is populated by a large number of innitely lived agents whose expectedutility is dened as:

E0

ª

Qt0

btCtLηt 1σ

1 σ(1.10)

where b A 0 is the discount factor, σ A 0, σ x 1 is the intertemporal elasticity of substitution,η A 0, 1 ση @ σ is a calibration parameter, Ct represents consumption and Lt leisure.

Endowments : The fundamental endowment that individuals have is their time, which can be split be-tween work Nt and leisure activities Lt. We abstract from other endowments of resources. We normalizethe total amount of time in each period to one.

Technology : The output of the economy is assumed to depend on the amounts of capital Kt1 andlabour Nt according to a constant return to a Cobb-Douglas production function :

Yt AtK1αt1 XtNtα (1.11)

where α is the share of labour income in total output, At is a random productivity shock variable andXt represents the deterministic component of productivity assumed to expand at a constant rate :

Xt1 γXt, X0 1, γ A 0 (1.12)

The output of the economy can be used for consumption or investment. And the stock of capitalevolves according to :

Kt 1 δKt1 It (1.13)

where δ is the rate of depreciation.

We dene the stationnarized variables yt YtXt

, ct CtXt

, it ItXt

and kt KtXt

.

Q. 1.7.1. Write the expected utitity of the agents as a function of ct and Lt. We dene the modieddiscount factor β bγ1σ.

Q. 1.7.2. Write the time constraint, the resource constraint, the capital accumulation contraint and theproduction function as a function of Nt, Lt, yt, ct, it, kt and At. Combine them to prove the followingaggregated contraint :

ct kt γ1αAtk1α

t1 1 Ltα γ11 δkt1 (1.14)

Q. 1.7.3. Solve the maximization program of the agents, subject to the time constraint and the aggre-gated contraint.

Q. 1.7.4. We calibrate η so that N 0.2. Compute the steady state of the model (with A 1) :

9

Page 15: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

NB: Finding the constraint that the steady state imposes on the parameters is very important forthe calibration of a model. If not enforced in the programme of the model, one may compute a totalnonsense !

1.8 King and Rebelo's RBC model : Dynare Implementation

In this exercise, you will implement the model derived above in Octave-Matlab, using Dynare.

For this purpose, we assume that the exogenous stochastic productivity shock follows the process :

At At1ρa expεa (1.15)

Q. 1.8.1. Create a dynare le myrstmodel.mod :

var (list of endogenous variables) ;varexo e_a;

parameters alpha beta delta gamma sigma eta rho_a;

alpha = 0.6;

beta = 0.99;

delta = 0.03;

gamma = 1.005;

sigma = 1.5;

eta = alpha*(1-(1-alpha)*(gamma-1+delta)/(gamma/beta-1+delta))(-1)*(1-0.2)/(0.2);

rho_a = 0.74;

model;

(model equations)// AR(1) shock

A = A(-1)rho_a * exp(e_a);

end;

initval;

y = 1;

c = 1;

i = 1;

A = 1;

k = 1;

L = 0.5;

N = 0.5;

mul = eta*c(1-sigma)*L((1-sigma)*eta-1);

muc = c(-sigma)*L((1-sigma)*eta);

end;

shocks;

var e_a; stderr 1;

end;

steady;

check;

10

Page 16: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

stoch_simul(order=1);

Q. 1.8.2. Complete the .mod le and run dynare myrstmodel in the Octave-Matlab workspace.

Figure 1.1: Extract from King and Rebelo 1999, some statistics for the US business cycle

Q. 1.8.3. Compare your theoretical values with table 1 of King and Rebelo.

Show that the relative standard deviation of consumption is too small.

Show that the relative standard deviation of investment is too small as well.

Show that theoretical correlations with output are too high.

Comment on the relative standard deviation of hours worked.

Q. 1.8.4. Empiricaly, productivity is negatively correlated with hours worked. Do you replicate this fact?

Q. 1.8.5. Calibrate ρa 0, so that the productivity shock is a white noise. Comment on the propagationin this model.

11

Page 17: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.9 Solving a NeoKeynesian model

The model we describe in this section is from Galì, chapter 2.

It has been exposed in lecture 3 by Benoît Mojon.

Preferences : Household τ maximizes her expected utility:

E0

ª

Qt0

βtuCτt ,Nτt (1.16)

where β is the discount factor and u is her instantaneous utility at date t dened as:

uCτt ,Nτt C

τt hCt1

1 σNτt

1 ϕ(1.17)

under the budget constraint:

Bτt1 it

PtCτt Tt WtN

τt Dt B

τt1 (1.18)

where Cτt , Nτt , h, Ct, σ, ϕ, B

τt , it, Pt, Tt, Wt and Dt are her consumption, her labour, the habit for-

mation parameter, aggregate consumption, the intertemporal elasticity of substitution, the inverse of theFrisch elasticity of labour supply, her risk-free bonds, the interest rate, aggregate price index, lump-sumtaxes, aggregate wage index and dividends respectively.

Q. 1.9.1. Derive the log-linearized rst order conditions of the households' program.

Q. 1.9.2. We dene the discount rate ρ logβ. What is the steady state of the nominal interest rateit in this model without growth ?

Q. 1.9.3. Log-linearize the technology constraint and the real marginal cost of producing an additionalunit of good :

MCt 1

Pt

dQtdYt

dQtdNt

PtdYtdNt

(1.19)

where Qt WtNt is the total cost of production.

Q. 1.9.4. Write the equilibrium condition when prices are exible (ξ 0). What does it correspond to ?

Q. 1.9.5. Write the log-linearized goods market equilibrium. Government expenditures are assumed tofollow a purely exogenous AR(1) process.

Monetary Policy : Monetary policy is modelled with a Taylor rule

it ρ π rππt π ry y εit (1.20)

where πt pt pt1 is the ination rate and π is the Central Bank's ination target.

12

Page 18: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Parameters ValueCobb-Douglas parameter α 0.3discount factor β 0.995intertemporal elasticity of substitution σ 2inverse of the Frish elasticityϕ 2habit formation parameter h 0.6Calvo process parameter ξ 0.75Steady state mark-up λ 0.2

consumption share in total output CY

0.6monetary policy : reaction to ination rπ 1.5monetary policy : reaction to output gap ry 0.3monetary policy shock persistence ρi 0.4productivity shock persistence ρa 0.4cost-push shock persistence ρp 0.4government expenditures shock persistence ρg 0.4

Table 1.2: Parameters Calibration

1.10 Dynare implementation of the NeoKeynesian model

Q. 1.10.1. Write the model in Dynare, with the following standard calibration

Simulate the model.

Q. 1.10.2. Now calibrate rπ 0 and ry 0. What happens ? Comment the following extract of MiltonFriedman's paper : `The Role of Monetary Policy' (1968)

Pegging of Interest Rates

History has already persuaded many of you [that monetary policy cannot peg interest rates for morethan very limited periods]. The failure of cheap money policies (...) involved widespread recognition thatthe wartime and postwar pegging of bond prices was a mistake [and] that the abandonment of this policywas a desirable and inevitable step (...).

Let the Fed set out to keep interest rates down. How will it try to do so ? By buying securities (...).The initial impact of increasing the quantity of money at a faster rate than it has been increasing is tomake interest rates lower for a time than they would otherwise have been. But this is only the beginningof the process not the end. The more rapid rate of monetary growth will stimulate spending (...), income(...), demand for loans [and] raise prices, which would (...) reverse the initial downward pressure oninterest rates fairly promptly, say, in something less than a year (...).

Let the higher rate of monetary growth produce rising prices, and let the public come to expect thatprices will continue to rise. Borrowers will then be willing to pay and lenders will then demand higherinterest rates (...). These subsequent eects explain why every attempt to keep interest rates at a low levelhas forced the monetary authority to engage in successively larger and larger open market purchases.

These considerations (...) explain why monetary policy cannot peg interest rates.

13

Page 19: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Q. 1.10.3. Set h 0, ξ 0 and all the persistences to 0. Comment on the propagation mechanism of themodel. Introduce either habit formation or nominal rigidities and comment on the eect of the nominaland real rigidities.

Q. 1.10.4. In the light of Friedman's quotation, comment on the eect of a monetary policy shock.What happens in the particular case ξ 0 ? Why are DSGE models so widely used in Central Banks ?

14

Page 20: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.11 Estimations

OLS estimations

This exercise compare in sample the performance of dierent time series models.We compare univariate autoregressive models with simple VAR models with dierent lags.

For the Euribor 3 months and the 10 year bond rate estimate the following models :

1. AR(2), AR(3), AR(6), AR(12),

2. it c α12it12 α15it15 α18it18 α24it24 εt

Give two reasons why this second specication may be prefarable that the AR above when youwant to use the model for one year ahead forecasting?

3. Two alternative VARs including the 2 series, one of your choice and one with 6 lags, as follows

itlt

K A12 it12

lt12 A15 it15

lt15 A18 it18

lt18

A24 it24

lt24 εt

ξt

Factor extraction

Factor extraction allows to summarize a database in only a few time-series.The purpose is to look for the linear combination of the initial time-series that will account for the highestshare of the database variance.We do so by diagonalizing the covariance matrix or the correlation matrix and extracting its eigenvlauesand eigenvectors.Then, the factors will be used as regressors in forecasting models. (see Horse Race).

Q. 1.11.1. Using matlab functions (cov() and eig()), estimate a factor model of the 27 interest rates.

Q. 1.11.2. How many factors are necessary to account for, on average, 90%, 95%, 99% of the varianceof the 27 interest rates?

Q. 1.11.3. Experiment the extraction of factors from 27 simulated iid white noise processes of the samelength as the sample. Conclude.

Q. 1.11.4. Represent the graphs of the rst 3 factors together with various interest rates. Represent thecoecients of the initial time-series in the factors.How can you interpret the factor ?

Factors are linear combinations of the initial time series, but initail time series can also be writen aslinear combinations of factor.Factor can then be used as regressors for some particular times series in the data sample.

Q. 1.11.5. Compute the loadings (regression coecients) of the 3 months euribor and 10 years bonds'rate on the rst 3 factors.

15

Page 21: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.12 Forecasting horse race

We want to compare the forecasting abillity of dierent models (out of smple criteria). Let's put ourselves5 years ago and produce 1 year ahead forecast each month until from this date to the end of the samplefor the Euribor 3 months and the 10 year bond rate.

1. A random walk in levels

2. A random walk in rst dierence

3. an AR(3), an AR(12)

4. it c α12it12 α15it15 α18it18 α24it24 εt

5.

itlt

K A12 it12

lt12 A15 it15

lt15 A18 it18

lt18

A24 it24

lt24 εt

ξt

6. A factor model with 2 factors and with 4 factors.

Q. 1.12.1. Using an out of sample RMSE criteria, nd which of the previous models is the best toforecast ?

Q. 1.12.2. Bonus question : updating and rolling windowsEach month you can reestimate your model using the additionnal point, you can also shift on monthahead your estimation sample (rolling windows). Using the AR(3) and VAR models, implement thesemethods. What are your new out of sample RMSE ?Is it worth the pain to update your estimation to improve your forecast ?

16

Page 22: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.13 Maximum (Conditional) Likelihood estimation

In this exercise we will use simulated AR(1) and MA(1) and estimate the model by which they weregenerated.

AR(1)

We suppose that the process we want to estimate is an AR1 :Yt µ φYt1 εt.We also suppose that the process εt BB0, σ2 is Gaussian and iid.

We then have that YtYYt1 Nµ φYt1, σ2

Q. 1.13.1. What is the density function of a Gaussian white noise ? What can you conclude about thedensity function of YtYYt1 ?Q. 1.13.2. What is the likelihood of the sample conditional on the rst value ? And its log ?

Q. 1.13.3. The estimation of µ and φ found with the maximum likelihood is identical to the ordinaryleast square method. Why ?With µ and φ estimated, what is the corresponding value of σ2 ?

Q. 1.13.4. Estimate your simulated AR(1) (compute the likelihood function and maximize it usingfminsearch or fminunc()). Do you nd your initial parameters ?

MA(1)

We now suppose the estimated process is of the following form : Yt m εt θεt1 with εt N0, σ2(iid) and θ B 0.

We suppose that ε0 0.

Q. 1.13.5. What is the value of εt knowing the values of yt, m, θ, εt1? Iterate this equation backwardto nd εt as a function of m, θ and the set of observables yj0Bj@t.

Q. 1.13.6. What is the expression of the log likelihood of the model ? Write it as a function of theparameters m, θ, σ2 and the εt0BtBT

Q. 1.13.7. Estimate your simulated MA(1). Do you recover your initial parameters ?

Comparison

Q. 1.13.8. Estimate your simulated AR(1) under an MA(1) hypothesis (and vice versa). Comparing thelikelihoods with that of questions 1.13.4 , does the AR(1) hypothesis best ts the AR(1) data ? Samequestion for the MA(1) comparing with question 1.13.7.

17

Page 23: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.14 VAR Estimation

Q. 1.14.1. Estimate the following VAR(1) using OLS method :

dYt πt rrt µ dYt1 πt1 rrt1 A εt (1.21)

where dYt is the quarterly growth rate, πt is the quarterly ination rate and rrt is the Euribor 3 monthreal interest rate of the euro area.

Q. 1.14.2. Compute and plot the estimated residuals εt. Do they seem stationnary ? Compute theestimated covariance matrix Σ Eεtεt of the shocks. Are they independent ?

Q. 1.14.3. Explain why computing the impulse response to innovations that are correlated to one anotheris not straightforward.

We now suppose that the estimated shocks εt are a function of orthogonal shocks ηt :

εt ηtR (1.22)

I3 Eηtηt (1.23)

Q. 1.14.4. What is the necessary and sucient condition that R must satisfy ?

There are many matrices R that satisfy such a condition. So the choice of one particular method isnot innocuous.

1.15 Cholesky Factorization

The standard orthogonalization method is the Choleski. Given a positive-denite symmetric matrix Σ,there is one and only one factorization into RR such that R is upper triangular with positive elementson the diagonal. This is the Choleski factorization.

This matrix is computed in Matlab using function chol.

Q. 1.15.1. In the Choleski decomposition, what does it mean that the monetary policy shock is in thethird place ? Can you interpret the rst and second shocks ?

Q. 1.15.2. Using the Choleski factorization, compute and plot the Impulse Response Function to amonetary policy shock.

Q. 1.15.3. What is the sensibility of your structural decomposition to a permutation of the variables inyour VAR(1) ?

1.16 Structural Decomposition

Q. 1.16.1. Compute the likelihood of the sample in the model :

εt ηtR (1.24)

ηt N0, I3 (1.25)

Q. 1.16.2. Create a lklhd.m function which computes the likelihood-based function :

logdetR2 trace R1ΣR1 (1.26)

18

Page 24: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

There are three1 free parameters when you minimize the likelihood-based function.

Q. 1.16.3. Using minimization program fminunc, nd the matrix R which maximizes the likelihood ofthe sample under the following constraints :

The second shock is a cost-push shock, and has no initial impact on GDP growth (R21 0).

The third shock is a monetary policy shock, and has no initial impact on the economy (R31

0 and R32 0) : monetary policy only impacts the economy with a lag.

Instead of using the fmincon function (available on Matlab), which computes maximization underlinear constraints, we modify the optimization to include the constraint because we know that the solutionexists which veries the said constraints.

1.17 Blanchard-Quah Decomposition

In the Blanchard-Quah decomposition, we include economic priors on the long-term impact of shocks tohelp identify the orthogonal shocks ηt.

We now assume that cost-push shocks and monetary policy shocks only aect GDP in the short-runand have no long-term impact on the level of GDP.

Q. 1.17.1. Compute the long-term eect on GDP of a given combination of shocks ε0 R01 R02 R03 .Q. 1.17.2. What is the necessary and sucient linear condition on the second and third rows of matrixR to identify the cost-push and monetary policy shocks ?

Q. 1.17.3. Under the assumption that the monetary policy shock does not aect ination instantaneously,identify the three orthogonal shocks ηt. Comment.

Q. 1.17.4. Bonus question : Same questions with ltered data before you estimate the VAR(1).

1The number of free parameters is equal tonn1

2, where n is the number of shocks

19

Page 25: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.18 Estimating an RBC model with maximum likelihood

In this exercise, you will estimate using dynare the King and Rebelo model seen in class.The mod-les for dynare is kingrebelo.mod.For a theoretical approach to the computation of the likelihood, you may refer to the chapter on KalmanFilter in Hamilton's textbook.

To estimate a model, you must declare the observable variables (no more than your shocks); theparameters to be estimated; and use the estimation command.

varobs y;

estimated_params;

stderr ee_a, 1 ;

alpha, 0.3;

beta, 0.9;

rho_a, 0.74;

end;

estimation(datafile=$$$$, mode_check);

Q. 1.18.1. Use the le krsimul.mat in the estimation command to estimate some parameters used tosimulate the data. We will suppose that the other parameters are calibrated with a good precision. Youcan add the option mode_check in the estimation command to plot the prole of your likelihood.

Q. 1.18.2. Now try to estimate all the parameters... what can you conclude ?

Maybe the estimation diculties are due to the sample size...

Q. 1.18.3. Simulate another sample of data, with 10000 observations. Which parameters are easily orhardly identied ?

Note : to generate simulated data use the option periods=1000 in the stoch_simul command inyour mod le. Then save the data with e_a=oo_.exo_simul; save krsimul.mat y c i k L N A mul

muc e_a ;

Maybe the estimation diculties are due to the choice of observed data...

Q. 1.18.4. Using one of the samples you have generated, try to estimate the model with dierentobservable variables.Try with the shock ea. What can you conclude in that case ?

Q. 1.18.5. You can add boundaries to ease the estimation. For instance :

estimated_params_bounds;

alpha, 0, 1;

c_cons , 0, 1;

c_inv , 0, 1;

beta, 0.5, 1;

delta, 0, 0.2;

gamma, 1, 1.2 ;

end;

Q. 1.18.6. Bonus : you can do the same estimations with the neoKeynesian model (neoK.mod and thecorresponding data neoKsimul.mat)

20

Page 26: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

1.19 Estimation on simulated data of a basic neoKeynesian model

We simulated the model neoK.mod, developped during a previous class and available athttps://sites.google.com/site/apoissonnierrandt/home/teachings/epp-2010 , with unknown parameter val-ues for r_pi, r_y, sig_c, phi, h, xi, rho_r, rho_a, rho_p, rho_g and the standard deviations ofthe four shocks.

The simulated data have been stored in the neoKsimul.mat le. The purpose of this class is to ndback the parameters we used for this simulation thanks to bayesian estimation.

Maximum likelihood estimation

Q. 1.19.1. Using the usual dynare code, try to estimate all those parameters at once using maximumlikelihood:

estimated_params;

r_pi, 1.5;

r_y, 0.3;

sig_c, 2;

phi, 2;

h, 0.6;

xi, 0.75;

rho_a, 0.4;

rho_r, 0.4;

rho_g, 0.4;

rho_p, 0.4;

stderr ee_a, 1;

stderr ee_r, 1;

stderr ee_g, 1;

stderr ee_p, 1;

end;

varobs y n r pie;

estimation(datafile=neoKsimul, mode_compute=5, mode_check);

stoch_simul(periods=1000) y n r pie;

In order to guide the estimation of the parameters, we would like to incorporate economic informationabout the values of the parameters. First, you can add boundaries to ease the estimation :estimated_params_bounds;

r_pi, 1.25,2.25;

(...)

end;

Q. 1.19.2. Look into the dynare Manual (available on http://www.dynare.org/documentation-and-support or directly in the dynare directory installed on your computer). What are the option mode_computeand mode_check ?

Q. 1.19.3. What parameters are necessarily bounded between 0 and 1 ? Try to nd the parametersusing bounded maximum-likelihood estimation.

21

Page 27: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Bayesian estimation

More than bounderies, you can add priors to your estimation. A prior is a distribution of probabilitiesfor the values of a parameter. To dene a prior, replace the initial value in the estimated_params block,with the following dynare code :estimated_params;

r_pi, normal_pdf, 2, 0.25;

(...)

stderr ee_a, uniform_pdf, , , 0, 2;

stderr ee_r, uniform_pdf, , , 0, 2;

stderr ee_g, uniform_pdf, , , 0, 2;

stderr ee_p, uniform_pdf, , , 0, 2;

end;

For all parameters bounded between 0 and 1, use the standard half-circle prior:xi, beta_pdf, 0.5, 0.25;

Q. 1.19.4. Choose appropriate priors for all parameters and nd the parameters used in the simulationusing bayesian estimation.

If the estimation still doesn't converge, you can help the estimation procedure further using appropri-ate initial values for the search:estimated_params_init;

r_pi, 1.7;

(...)

end;

Note : In order to avoid plotting the priors, a useful command is options_.plot_priors=0;

Q. 1.19.5. Instead of varobs y n r pie;, use the AR shocks as observed variables. You should notbe abble to estimate any structural parameter of the model, only the autocorrelations of the AR shocks.Can you explain why ?

The bayesian estimation goes further than estimating a value for each parameter. Using a Metropolis-Hastings algorithm it is possible to draw the ex-post likelihood of the parameters and compare it tothe priors of these parameters to see if the estimation has improved your knowledge on the value of theparameters.

Q. 1.19.6. Compute and plot the posterior distribution of the parameters, using:

estimation(datafile=neoKsimul, mh_replic=10000, mh_nblocks=2, mh_jscale=1, mode_compute=5,

mode_check, mode_file=neoK_mode);

Q. 1.19.7. Calibrate the mh_jscale parameter in order to nd an acceptation rate of 0.25 in theMetropolis-Hastings algorithm.

22

Page 28: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Chapter 2

Mid-term Exams

WARNING

Students will work in twos. They are assigned a partner and a computer by the teacher.Each pair must send by e-mail its programs before the end of the exam (with the name of both students).The e-mail must contain all your programs usefully and clearly commented.The use of classmaterial is tolerated, but emails and webpages (other than that of the class and exam)must remain closed at all times during the exam (for fear of seeing your score signicantly scaled down).

2.1 Basic data manipulations

Each month the French Quarterly National Accounts publish an extract of households' consumption inmonthly frequency. The corresponding data, household's consumption in chained linked volumes, areavailable athttp://www.insee.fr/en/themes/info-rapide.asp?id=19&date=20110930Download the xls le of historical data.

Using matlab, code a program that will :

1. Uploading: Load and save the data in "levels" and "evolutions" from the xls le, in variables levand evol respectively.

2. Simple graph: Plot household's total consumption in goods since April 2002 (the graph mustinclude a title, mention the source and include dates)

3. Simple calculation: Compute in matlab the growth rate of households' total consumption ingood.

4. Superposed graphs: Plot on the same graph, the growth rate you calculated and the one fromthe "evolutions" sheet in the xls le. (the graph must start in 1987 and end in 1995, include a title,mention the source and include dates). Use dotted lines for one series to see if the series coincide.

5. Multiple graphs: Plot on 4 dierent graphs but on the same gure (i.e. same window) households'consumption in food products, durables, energy and manufactured goods. (the graphs must start in2000, include a title, mention the source and include dates)

23

Page 29: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

6. Simple calculation: Households consumption in Durables is the aggregation of households' con-sumption in Automobiles, Household Durables and Other Durables.Calculate the sum of households' consumption in the three components (Automobiles, HouseholdDurables and Other Durables).Calculate the dierence of this sum with households' consumption in Durables. (Indeed, chained-linked volumes are not additive !)Compute the mean absolute error you do when adding directly the chained-linked volumes of thethree components.Compute this mean absolute error expressed in % of the properly chained-linked consumption indurables. In comparison, compute the mean absolute growth rate of consumption in durables.

2.2 Dynare : nd the 5 errors

Q. 2.2.1. In the model 1, there are 5 errors. Correct them so as to be able to run the program withdynare

Q. 2.2.2. Bonus : Modify the calibration of the standard error of the shocks to match King and Rebelo'sestimation of the standard deviation of output (1.8) and interest rate (0.3).

Q. 2.2.3. In the model 2, there are 5 errors. Correct them so as to be able to run the program withdynare.

Q. 2.2.4. Bonus : Add the proper command to verify the uniqueness of the solution to this model.Modify the calibration of one parameter to ensure this uniqueness.

2.3 An AR(1) is a MA(ª)

We consider the standard AR(1) process :

Yt µ φYt1 εt

where εt BB0, σ2, 1 @ φ @ 1 and φ x 0.

Q. 2.3.1. Simulate 200 draws of an AR(1) process with parameters µ 14and φ 3

4. Keep only the last

100 draws.

We denote by L the lag operator (LXt Xt1). Then, we can write:

Yt µ φLYt εt

1 φLYt µ εt1 φL Yt µ

1 φ εt

24

Page 30: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

because Lµ µ

Yt µ

1 φ 1 φL1εt

ª

Qi0

φLi εt

ª

Qi0

φiLiεt

ª

Qi0

φiεti

Hence, we obtain the MA(ª) expression of the AR(1) process:

Yt µ

1 φ

ª

Qi0

φiεti

A good approximation of this MA(ª) process can be obtained by truncating the innite sum, andkeeping only the MA(n) process dened by the rst n 1 terms of this sum:

Yt µ

1 φ

n

Qi0

φiεti

Q. 2.3.2. Simulate the MA(10) approximation corresponding to the original AR(1) process (with pa-rameters µ

14and φ

34), using the same innovation draws. Plot the last 100 draws of the AR(1)

simulation and of its approximation on the same graph. Comment.

Q. 2.3.3. Now simulate the MA(20) approximation of this same AR(1) process and check that it matchesalmost perfectly the original AR(1) process.

Q. 2.3.4. Same questions with µ 110

and φ 910.

Q. 2.3.5. What value of n do we need to get a correct MA(n) approximation of this last AR(1) ?

25

Page 31: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

WARNING

Each student must send by e-mail his-her programs before the end of the exam, each student must alsosend a doc le with the answer to each question (graphs included).The e-mail must contain all your programs usefully and clearly commented.The use of classmaterial is tolerated, but emails and webpages (other than that of the class and examand Octave-Matlab help) must remain closed at all times during the exam (for fear of seeing your scoresignicantly scaled down).

2.4 Oil prices

In the Diesel&Brent.csv le, you will nd monthly averages of diesel and Brent euro-denominatedprices, in France from January 1992 to September 2012 taken from the Insee.fr prices database. Theycorrespond respectively to the price of a litre of diesel on the domestic retail market and of a barell (ca.159 L) of sweet light crude oil on the London SE.

Using Octave-Matlab, code a script that will :

Q. 2.4.1. Uploading: Load and save the price levels from the csv le, in variables _diesel and p_brent

respectively.

Q. 2.4.2. Simple graph: Plot diesel and Brent prices since January 1992 on two separate graphs (eachgraph must include a title and include dates).

Q. 2.4.3. Simple calculation: Compute in matlab the monthly (gm_diesel and gm_brent) and theyear-on-year (gyoy_diesel and gyoy_brent) growth rates of diesel and Brent prices and plot them onthe same graph (the graph must include a legend).

Q. 2.4.4. Filtering: Compute in matlab the HP-trend component (trend_diesel and trend_brent)and the HP-cycle component (cycle_diesel and cycle_brent) of the diesel and Brent prices in leveland plot them on the same graph (the graph must show both series clearly !).

Q. 2.4.5. Basic descriptive statistics: Compute the correlation between the monthly and the yeay-on-year growth rates, as well as between the cycle components of the diesel and Brent prices.

Q. 2.4.6. Economic intuition: Interpret these results.

2.5 A long time ago, in a galaxy far far away...

After the dissolution of the Seante by Palpatine, Coruscant Statistical Institute kept collecting price dataon most of the planets in the galaxy. In the StarWarsInationRates.csv le, you will nd monthlyination rates in dierent places, (see the StarWarsInflationRates.xls le for more details on theplanets).Data are monthly recorded, a month being dened by the rotation of the largest of the three moons ofDrexel. There are 10 months in an imperial year.

Q. 2.5.1. Load and plot the data. What can you see ?

Factor Extraction

Q. 2.5.2. Using matlab functions (cov() and eig()), estimate a factor model of the 23 ination rates.

26

Page 32: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Q. 2.5.3. What is the share of the total variance explained by the rst, the second, the third, the fourthand the fth factor (each individually) ? How many factors will you choose to correctly describe the23 ination rates ? What is the share of the total variance you might explain with those factors (takentogether) ?

Q. 2.5.4. Represent the graphs of the chosen factors together with selected ination rates. Representthe coecients of the initial time-series in the factors.How can you interpret the factors ?

OLS Estimation

Q. 2.5.5. Plot the chosen factors. Among those factors, there is an AR(2) process. Which one is it ?

Q. 2.5.6. Using OLS estimation, nd the autoregressive coecients generating the AR(2) process andcompute the standard deviation of the corresponding innovation.

Q. 2.5.7. What is the generating process of the other chosen factor(s) ? Compute the standard deviationof the corresponding innovation(s).

2.6 Dynare : buggs and basics

Q. 2.6.1. In the mod1, mod2, mod3 and mod4 les, there are some errors. Correct them so as to beable to run the programs with dynare. Document the errors found in your answer sheet and send backyour programs corrected.

Q. 2.6.2. Name the following linearized equations

rt rr π ζπt π ψQt εt ct

h1h

ct1 1

1hct1

1hσ1hit Etπt1

πt βπt1 1φ1βφ

φQt λt

Qt 1 αht αkt εatEconomically comment each of them.

Q. 2.6.3. In dynare, what is the purpose of the following commands

check

steady

end

stoch_simul

What is the dierence between var and varexo ?

27

Page 33: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Chapter 3

Final Exams

3.1 Filtering

1. Why does one lter an economic time series? (1 sentence)

2. (2011) Baxter and King propose to build time series lters in the frequency domain. What rangeof frequencies one should extract to focus on business cycle uctuations? Are these ranges preciselydened?

3. (2011) Figure (3.2) of Baxter and King shows the quality of approximation in the frequency domainof a BK lter with various truncation length. (give telegraphic/texto style answers)

What is this truncation?

What is the dierence between a 4 and a 8 truncation in the high frequencies (high numberof cycle per period)?

What is the dierence between a 8 and a 12 truncation in the low frequencies? Which one isbetter at detrending?

What is the practical cost of larger truncation?

4. Comment on gure 3.1 (see end of exercises sheet) from Baxter and King: what are the pros andcons of rst dierence ltering? In what sense is the Baxter and King lter superior to the HPlter?

5. Comment on the charts from Agresti Mojon (gure 3.3): how does the spectral density of US GDPchanges when the sample includes additional years 1996 to 1999? What does it mean?

6. Among graphs from gure 3.4 , say which one is US GDP, the business cycle frequency componentof US GDP, US ination, US interest rate?

7. (2011) In gure XX, identify the growth rates of US consumption and GDP, the interest rate andination.

The period from 1984 onward was rst described as the "Great Moderation" in 2001. Whatdo you think it means?

When do you think the Great Moderation is "over"?

What descriptive statistic would you use to make your point?

Is the Great Moderation as obviously over for nominal and real variables?

28

Page 34: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

What does this imply for the hypothesis that the Great Moderation resulted from bettermonetary policy?

8. Why could an economist be reluctant to lter out the trend of ination and the nominal interestrate before modeling them? (1 sentence)

29

Page 35: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.1: The eect of alternative lters on GDP (from Baxter and King)30

Page 36: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.2: Constrained approximate high-pass lter (from Baxter and King 1995)

31

Page 37: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.3: Spectral density of GDP from Agresti Mojon

32

Page 38: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.4: Graphs of US times series

33

Page 39: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.2 Times series analysis

1. Give the equation for Xt when it follows :

a an AR(1), an MA(2), an ARMA(1,2), an ARMA(2,1)

b a random walk, a random walk with drift,a random walk in rst dierence

(note εt a white noise)

2. In each of the previous cases, what is the best forecast of the process one and two steps ahead(EXt1SXt,Xt1... and EXt2SXt,Xt1...)?

3. Write the state space representation of the MA(2), ARMA(1,2), ARMA(2,1) with an observationequation and an equation describing the evolution of the unobservable of each model.

4. Among the graphs of gure 4 , which one is a stationary autocorrelated process, a white noise andan integrated process ?

Figure 3.5: Graphs of simulated time series

5. For each example says if they are a priori stationnary time series or not :

a Mexican log GDP

b German ination (since 1995)

c HP ltered US GDP

d French price index for beer

34

Page 40: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

e Ination of the European Harmonized Consumption Price Index HCPI

f Euro area real interest rate (Euribor) since the foundation of the ECB

g nominal interest rate (Euribor)

h euro area consumption / GDP ratio

6. Consider two processes

Model 1 is an ARMA (2,2), yt φ1yt1 φ2yt2 θ1εt1 θ2εt2 εt, where εt N 0;σ2 Model 2 is an AR(4), xt µ1xt1 µ2xt2 µ3xt3 µ4xt4 c ηt; where ηt N 0;ω2;

(a) Dene the expressions of the 4 period ahead forecasts of Etyt4and Etxt4(b) Write the state space representation of each process

(c) How could these state space representations help you dene the maximum likelihood estimationof the models parameters (be brief) ?

(d) Assume you have to forecast core ination, i.e. the ination of all goods and services exceptenergy and unprocessed food. You have a database that comprises 169 sub-prices of theconsumption basket for shoes, bread, pasta, airline tickets, metro, cinema tickets, rents ....Can you use this very rich information to forecast core ination and if so how? An alternativewould be to t model 1 and model 2 to core ination. What would be the benets of eachapproach ? How would you compare their forecasting performance ?

35

Page 41: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.3 VAR

1. Which one is the formula to estimate β with OLS the equation Y βX ε ?

a X Y X X1

b X X1Y

c X X1X Y

d XX 1XY

2. Write the cannonical form (one lag) of the following VAR

ytzt

a bc d

yt1

zt1 e f

g h yt3

zt3 εt

εt

3. Use the MA form of a the following VAR of quarterly interest rate and monetary aggregate growthrate to write the variance decomposition of each variable into each shock (the share of the varianceof each variable explained by each shock)? Why is this variance decomposition easier to performeand more meaningful if the shocks are orthogonalized?

Yt AYt εt,with εt N0,Ω rt

∆mt a b

c d rt1

∆mt1 εrt

εmt

P εrtεmt

uMSt

uMDt

with ut N0,D, D diagonal

4. What is an impulse response function ? Using intuitive matrix notation, express the eect of uMSt

a on rt after one year,

b on ∆mt after 2 quarters,

c on mt after 2 quarters.

5. What pattern of this VAR impulse responses would comfort you in interpreting this P identicationmatrix as dening money supply and money demand shocks?

6. Explain the idea of Blanchard and Quah to disentangle productivity from demand shocks ? (3sentences max).

7. (2011) Bayesian VARs can be estimated by adding dummy observations to a sample of data. In athe case of a the following VAR, we assume that the rst four observations of xt are 1, 2, 0 and 3,and the rst four observation of yt are 3, 2, 1 and 2.5.

xtyt

A1 xt1

yt1 A2 xt2

yt2 A2 xt3

yt3 µ

τ εt

ηt

Recall that dummy observations that would be equivalent to imposing a single unit root prior aresuch that

xtyt

xt1

yt1 xt2

yt2 xt3

yt3 λ meanx

meany Assuming that λ 5 write down the dummy observations that would be equivalent to imposinga single unit root prior.

36

Page 42: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Write these dummy observations as a function of µτ

the ols estimates of A1, A2,A3 and

the ols residuals εtηt

. Explain why these dummy observation constrain the maximum likelihood estimation of theparameters of the model.

37

Page 43: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.4 The Blanchard-Perotti VAR structuration

We estimate a VAR with three variables and four lags, on a quarterly basis, including governmentspendings, net public revenues and GDP. Let us dene Xt gt tt yt, where gt is the growth rate ofthe deated government spendings, tt is the growth rate of the deated net public revenues and yt is thegrowth rate of the real GDP :

Xt µ Xt1A1 Xt1A2 Xt1A3 Xt1A4 εt (3.1)

where εt εgt εtt εyt is the vector of reduced-form shocks.

Q. 3.4.1. How can we estimate such a VAR ? How many explanatory variables are there in the equationdening current net public revenues as the dependent variable ? What is the total number of coecientsthat we estimate ?

The covariance matrix Σ of the reduced-form shocks is estimated to:

Σ cov εgt εtt εyt

0.6690 0.1467 0.07960.1467 28.8037 0.26000.0796 0.2600 0.0891

(3.2)

Q. 3.4.2. In your opinion, are the reduced-form shocks highly correlated ? Does this mean that theestimated coecients of the matrices A1, A2, A3 and A4 are biased ? Does this mean that we caninterpret the Impulse Response Functions to the reduced-form shocks ? (see gure 3.6)

We now use a Cholesky decomposition to structure the reduced-form shocks:

εt εgt εtt εyt ηgt ηtt ηyt R ηtR (3.3)

where R is un upper-triangular matrix such that Σ RR.

Q. 3.4.3. What are the three economic assumptions underlying the Cholesky decomposition in thisparticular VAR. How could we justify them ?

Q. 3.4.4. In gure 3.7, you will nd the Impulse Response Function to the structural governmentspendings shock. Comment.What about public debt sustainability in this VAR model ?

In a seminal paper by Blanchard and Perotti, the authors describe a new way of identifying threestructural shocks in this VAR. They estimate an out-of-the-model elasticity of net public revenues tocurrent GDP (α) and use it directly in the identication matrix R.

Q. 3.4.5. Which coecient in the matrix R represents the instantaneous elasticity of net public revenuesto current GDP ?

Blanchard and Perotti assume that this coecient is equal to α. They also assume that R2,1 0 andR3,1 0.

Q. 3.4.6. Interpret those two last assumptions.

Q. 3.4.7. (bonus) How could we nd the unique matrix R satisfying Σ R R under the three

above-mentioned constraints ?

38

Page 44: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.6: Impulse Response Function to a 1$ reduced-form shock to government spendings on the levelsin $

39

Page 45: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.7: Impulse Response Function to a 1$ structural shock to government spendings on the levelsin $

40

Page 46: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.5 DSGE modeling

1. What is the dierence between an RBC model and a neo-Keynesian model ? (1 sentence)

2. What does TFP stands for ? How can you construct a TFP time series from yt, nt, it quarterlytime series of GDP, labor and investment, assuming that the depreciation rate of capital is δ and aCobb-Douglas technology with a labor share of 66 %.

3. Name ways to introduce price stickiness in a business cycle model. Why does price stickiness impliesthe non neutrality of money?

4. Why would one introduce habit formations in a business cycle model ?

5. How can one account for long term growth in a general equilibrium model ? (2 reasons)

6. Dene the steady state of a business cycle model.

7. Write the Taylor rule equation.In a calibration exercise, this equation is key to ensure the uniqueness of the solution to yourneoKeynesian model. Why ?

8. Why would an economist introduce a cash in advance constraint in his model ? What is anotherway to do so ?

9. (2011) Recall how one construct the Solow residual from the time series of the capital stock, hoursand GDP. What assumptions are needed in this construction?

10. (2011) European data do not have hours but employement. How does this change the constructionof the Solow residual?

41

Page 47: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.6 DSGE estimation

1. Give an interval for the value of your priors on

a the habit formation parameter

b the reaction to ination of the Central Banker

c the discount factor

2. Dene each dynare command in a sentence

a model(linear);

b estimation(...);

c stoch-simul(...);

d mode_check

3. How do you check the robustness of a maximum likelihood estimation ? (1 check) What test do youadd if your estimation is Bayesian ? (2 checks) What is the interest of Bayesian estimation insteadof maximum-likelihood ? (2 sentences max)

4. Why does one run a metropolis-Hastings after the rst round estimation ? (1 sentence)

42

Page 48: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.7 Habit formation utility function à la Fuhrer 2000 AER

In a paper in 2000, Jerey Fuhrer introduces habit formations in the utility function of households withthe following form

UCt, Zt1 1

1 σ CtZγt1

(3.4)

with Zt an external reference.

Q. 3.7.1. Write the objective function of an innitely lived household with discount factor β and thisutility function.

We denote wt the total wages received by the household, At its total asset at the end of period t, rtthe return on At and Pt the price of consumption (and Πt the corresponding ination rate).

Q. 3.7.2. Write the budget constraint of the household.

Q. 3.7.3. Maximize the program of the household and nd following Euler equation.

β Ct1

Ctσ Zt1

Ztγ1σ 1 rt

Πt1 1 (3.5)

Q. 3.7.4. Characterize the steady state of equation (3.5)

Q. 3.7.5. Log-linearize equation (3.5)

43

Page 49: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.8 The proper way to linearize a model

Preliminary

In this exercise, we assume that production technology is described by the following function.

Yt Kαt AtLt1α (3.6)

Q. 3.8.1. Name this function. Dene the variables Y, K, L & A.

Let's assume that At A0eat is a deterministic trend.

Q. 3.8.2. Dene the stationnary variables of the model.

We will denote x the steady state value of these variables.

The easy way : the log-dierence

A rst approach to linearize the model is to dene yt logyt~y.We then have yt yt y~y in rst order approximation.

Q. 3.8.3. Using this denition of the Y operator, linearize the equation (3.6).

A rst order convinient approximation of the growth rate is here :

dXt Xt Xt1

Xt1 log Xt

Xt1 (3.7)

Q. 3.8.4. Linearize the log-approximation of the growth rate of Y.

The complexityproof way: the deviation rate

We now dene yt ytyy

.

We then have yt y1 yt without approximation.

Q. 3.8.5. Using this new denition of the Y operator, linearize the equation (3.6).

Q. 3.8.6. Linearize the growth rate of Y.

Q. 3.8.7. How dierent are the two methods ?

Conclusion : The rst method may be easy to implement (sometimes without approximation) onsome basic models.However, the second one can be implemented on any model.

44

Page 50: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.9 Consumption bundle with two goods

In an open economy, households can buy two types of goods : domestic Dt and imported It. Theyaggregate these goods through the following technology into a consumption bundle Ct from which theyderive their utility.

Ct DγtM

1γt

γγ1 γ1γ(3.8)

Optimum bundle composition To dene the optimal share of Dt and It in Ct, households solvethe following program :

MaxDt,Mt

DγtM

1γt

γγ1 γ1γ(3.9)

s.t. P dt Dt Pmt Mt B Resources (3.10)

Q. 3.9.1. Solve the maximization program (3.9) to write the ratio of Mt and Dt as a function of their

relative prices (Tt PdtPmt

).

Q. 3.9.2. Bonus Write the symmetric program (minimization) that households could solve to derivethe exact same result.

Demand and prices

Q. 3.9.3. Write the demand forD andM as functions of total demand C and the relative price (Tt PdtPmt

).

Deduce the price P ct of the consumption bundle Ct.

Steady state and linearisation

Q. 3.9.4. At steady state, we assume that the purchasing power parity holds. What does this imply onthe terms of trade T ?What are the demand for domestic and imported good at the steady state ? What is your interpretationof the parameter γ ?

Q. 3.9.5. Linearise the 4 equations linking C, D, M and T (equation (3.8), the answer to the rst andthird questions).Show the over identication of the system of these 4 equations. What does this imply for your use of themodel.

45

Page 51: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.10 A simulated neokeynesian model

In the following exercise you will be asked to comment on the outputs of a simulated neokeynesian model.With respect to the one from the class, this model includes capital.

Small buggs

Q. 3.10.1. When you run the model for the rst time you get the following message:

Starting Dynare (version 4.3.1).

Starting preprocessing of the model file ...

ERROR: essai.mod:57.1-3: syntax error, unexpected NAME

Error using dynare (line 114)

DYNARE: preprocessing failed

What should you do to solve this problem ?

Q. 3.10.2. When calibrating the Taylor rule, you run one simulation which returns :

EIGENVALUES:

Modulus Real Imaginary

3.504e-18 3.504e-18 0

0.4 0.4 0

0.4 0.4 0

0.6 0.6 0

0.6 0.6 0

0.9 0.9 0

0.9924 0.9924 0

Inf Inf 0

There are 1 eigenvalue(s) larger than 1 in modulus

for 2 forward-looking variable(s)

Explain this message. What should you do in your calibration to solve this issue ?

IRFs and propagation mechanisms

Q. 3.10.3. In gure 3.8, the irfs of consumption to a monetary policy shock only dier in the calibration.What is this dierence ? Comment on the propagation mechanisms of the model under these twocalibrations (from an economic perspective).

Q. 3.10.4. You have tested 2 calibrations. One where the autocorrelation of the shocks is null, one whereit is positive.

Comment on these results1.

1in the tables, i stands for investment not interest rate which is r

46

Page 52: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Figure 3.8: IRF of consumption with 2 calibrations of the model

47

Page 53: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Order 1 2 3 4 5

y 0.1041 0.1037 0.1034 0.1029 0.1024c 0.9674 0.9403 0.9176 0.8983 0.8819i 0.0611 0.0585 0.0564 0.0546 0.0531r 0.4785 0.4753 0.4721 0.4691 0.4660π 0.8780 0.8727 0.8673 0.8620 0.8566

Table 3.1: Coecients of autocorrelation (white noise shocks)

Order 1 2 3 4 5

y 0.6742 0.4990 0.4017 0.3462 0.3136c 0.9803 0.9465 0.9099 0.8751 0.8438i 0.5913 0.3902 0.2859 0.2289 0.1961r 0.8930 0.8444 0.8203 0.8067 0.7977π 0.9122 0.8587 0.8253 0.8035 0.7887

Table 3.2: Coecients of autocorrelation (AR(1) shocks)

Moments

y c i n (hours) π TFPσx 1.72 0.86 8.24 1.59 0.57 0.90σxσy

1 0.50 4.79 0.92 0.33 0.52

Corrx, y 1 0.77 0.91 0.77 0.34 0.41Corrx,n -0.10

Table 3.3: Empirical moments on HP Filtered US data from 1954Q1 to 1992Q2 (source: Frédérique Bec,Cylces réels et monétaires, ENSAE)

std. dev. Corr(y,x) Corr(n,x)y 1.7422 1.0000 0.4595c 0.4082 0.0073 -0.3936i 6.9577 0.8477 0.4297n 1.0911 0.4595 1.0000TFP 1.2500 0.7652 0.0000r 0.8800 -0.3993 0.3761π 0.9174 -0.7336 0.0761

Table 3.4: Theoretical moments of the neokeynesian model

Q. 3.10.5. Comment on your theoretical moments.

48

Page 54: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

3.11 Applications of the class material

1. You work at Bercy. The cabinet asks you for normative elements to prepare a European summitabout a new status for the ECB. Which model do you simulate, an RBC model or neo-Keneysianmodel ?

2. You work for Natixis. Patrick Artus asks you to forecast one year ahead Indonesian quaterly growthrate. You have tested two models.An ARMA(3,2) gives you an out-of-sample RMSE of 0.32 and in sample 0.12.An ARMA(5,1) model gives you an RMSE of 0.21 out-of-sample and 0.39 in-sample. Which onedo you choose ?

3. You supervise a group of students working on ecometric methods applied to macroeconomic times-series.As any good students would do, they began their study by analyzing the database.To anticipate over the next meeting with your students, for each example, say if they are a priori2

stationnary time series or not :

a Mexican log GDP

b Italian ination (since 1970)

c HP ltered US GDP

d French price index for frozen sh

e Ination of the European Harmonized Consumption Price Index HCPI since the foundationof the ECB

f Nominal interest rate (Euribor) since 1999

g Euro area consumption / GDP ratio

i French IPPI (import and production prices index) growth rate since 1998

j Consumption to total nal demand ratio in the Euro Area

k Greek 10 year bond rate

4. Your PhD advisor gives you the three following time series : HICP ination πt, the unemploymentrate ut, survey based ination expectations St1St. You assume that the true ination expectationsEt πt1 that enter the following hybrid Philips curve, though not observed, are correlated withSt1St.

πt αEt πt1 1 απt1 γut εt

Et πt1 βSt1St δπt εta Write the state space representation of this model.

b Use the Kalman lter to dene the likelihood of this model

5. Your PhD advisor is interested in the impact of a change in VAT rate on consumption and prices.It is unclear how much of an increase in the VAT rate will be reected in prices or absorbed by theprot share of rms.You have been suggested to estimate a VAR model using nal consumption of housholds (C), con-summer price index (P ), and the VAT rate (T ).

∆Tt ∆logPt ∆logCt µ

A ∆Tt1 ∆logPt1 ∆logCt1 ε1

t ε2t ε3

t

2a priori meaning prior to any statistical test

49

Page 55: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

with ∆ the rst dierence operator.What is your strategy to identify the structural shocks of demand, of ination and tax rate ?

50

Page 56: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Chapter 4

Home Assignments

4.1 Computing : Linear lter

In this exercise, you will create a lter function and apply it to typical macroeconomic time series. Alinear trend is the linear function of time which describes best the long term evolution of an economictime series. If we note the raw data (for instance US GDP -in log-) X, the linear trend T, the businesscycle C and the time t, we have :

Xt Tt Ct

Tt at b

Xt Xt1 a Ct Ct1

where a and b are constant parameters.

Q. 4.1.1. We make the assumption that on average, the cycle (ECt) and its rst dierence (ECt Ct1) are equal to zero. Express a as a function of EXt Xt1 and b as a function of a and EXt.Q. 4.1.2. Code a matlab function, using a vector X as argument and returning, the trend T of vector Xand cycle C.

Q. 4.1.3. Use your function to extract the cycle and the trend of the US and the Euro Area GDP (seeTD1-data.xls). Plot on the same graph the trend and the raw data. Plot on the same graphs the USand EA GDP's cycle. Add legends, titles and dates to all these graphs (and other options to make themeasier to read and comment).

Q. 4.1.4. Use your function to extract the cycle and the trend of the US and the Euro Area interestrate and ination (see TD1-data.xls). Plot the same graphs as question 3. Conclude on the relevance ofthe linear de-trending method for nominal variables.

Q. 4.1.5. Comment your graphs, identify the booms and busts. Which important events of economichistory can you identify on these graphs ? (no more than half a page)

Q. 4.1.6. For the Euro-Area, we want to compare the cycles extracted with the linear and hp-lter. Plotthe cycles extracted from the GDP time series with both methods on the same graph. Would you modifyyour answer to question 5 ?

Q. 4.1.7. Compute the rst order auto-correlation of US GDP's cycle extracted with a linear trend orHP-lter. What can you conclude on the characteristics of both methods in terms of extracted information?

51

Page 57: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.2 Computing : Linear lter with OLS

In this exercise, you will create a lter function and apply it to typical macroeconomic time series. Alinear trend is the linear function of time which is one way to describe the trend of an economic timeseries. If we note the raw data (for instance US GDP -in log-) X, the linear trend T, the business cycleC and the time t, we have :

Xt Tt Ct

Tt at b

Xt Xt1 a Ct Ct1

where a and b are constant parameters.

We compute the linear trend thanks to OLS estimation :

a

b Z Z1Z X

where Z 1 1 11 2 n

Q. 4.2.1. Code a matlab function, using a vector X as argument and returning, the trend T of vector Xand cycle C.

Q. 4.2.2. Use your function to extract the cycle and the trend of the US and the Euro Area GDP (seeTD1-data.xls). Plot on the same graph the trend and the raw data. Plot on the same graphs the USand EA GDP's cycle. Add legends, titles and dates to all these graphs (and other options to make themeasier to read and comment).

Q. 4.2.3. Use your function to extract the cycle and the trend of the US and the Euro Area interest rateand ination (see TD1-data.xls). Plot the same graphs as question 3. Conclude on the relevance of thelinear de-trending method for nominal variables. Why would a HP lter or a Band Pass lter be moreappropriate ?

Q. 4.2.4. Comment your graphs, identify the booms and busts of the real variables. Which importantevents of economic history can you identify on these graphs ? (no more than 50 words, lists of bulletpoints are welcome)

Q. 4.2.5. For the Euro-Area, we want to compare the cycles extracted with the linear and hp-lter. Plotthe cycles extracted from the GDP time series with both methods on the same graph. Would you modifyyour answer to question 5 ?

Q. 4.2.6. Compute the rst order auto-correlation of US GDP's cycle extracted with a linear trend orHP-lter. What can you conclude on the characteristics of both methods in terms of extracted information?

52

Page 58: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.3 Computing : Quadratic lter with OLS

In this exercise, you will create a lter function and apply it to typical macroeconomic time series. Aquadratic trend is the quadratic function of time which best discribes an economic time series. If we notethe raw data (for instance US GDP -in log-) X, the quadratic trend T, the business cycle C and the timet, we have :

Xt Tt Ct

Tt at2 bt c

where a, b and c are constant parameters.

We compute the quadratic trend thanks to OLS estimation :

a

bc

Z Z1Z X

where Z

1 4 n2

1 2 n1 1 1

Q. 4.3.1. Code an octave-matlab function, using a vector X as argument and returning, the trend T ofvector X and cycle C.

Q. 4.3.2. Use your function to extract the cycle and the trend of the US and the Euro Area GDP (seeTD2-data.xls). Plot on the same graph the trend and the raw data. Plot on the same graphs the USand EA GDP's cycle. Add legends, titles and dates to all these graphs (and other options to make themeasier to read and comment).

The OLS estimator is not exact. Its value converges toward the true value of the parameters (a,b,c)as the sample of data grows -provided that your model is correct, see Hamilton Time Series Analysischapter 8 for more-. On nite samples, with usual assumptions, one can evaluate the uncertainty overthe estimated parameters using the Student statistics.We denote s2 the sample variance of the residual of the regression, and ξi the i

th diagonal element of thematrix Z Z1.

The Student statistic is computed as follows : T a, b or c»s2ξ1, 2 or 3

.

Q. 4.3.3. Modify your quadratic lter function, to return the sample's variance of the residual (s2) andthe vector of Student's statistics for the parameters.At the 5% condence level, are the parameters from your lters on US and EA GDP signicantly dierentfrom 0 ? (It is the case with large enough samples if the absolute Student's statistics is larger than 1.96).

Q. 4.3.4. Use your function to extract the cycle and the trend of the US and the Euro Area interestrate and ination (see TD2-data.xls). Plot the same graphs as question 3. Conclude on the relevance ofthe quadratic de-trending method for nominal variables. Why would a HP lter or a Band Pass lter bemore appropriate ?

Q. 4.3.5. Comment your graphs, identify the booms and busts of the real variables. Which importantevents of economic history can you identify on these graphs ? (no more than 50 words, lists of bulletpoints are welcome)

53

Page 59: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Q. 4.3.6. For the Euro-Area, we want to compare the cycles extracted with the quadratic and hp-lter.Plot the cycles extracted from the GDP time series with both methods on the same graph. Would youmodify your answer to question 5 ?

Q. 4.3.7. Compute the rst order auto-correlation of US GDP's cycle extracted with a quadratic trend orHP-lter. What can you conclude on the characteristics of both methods in terms of extracted information?

54

Page 60: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.4 Modelling: Linearizing a basic RBC model

In this exercise, you will linearize by yourself the RBC model used for the simulation in TD3. Indeed,even if programs such as dynare can linearize for you such models, doing so by yourself is very informative.Moreover, the linear version of a model is much easier to read and comment.

DSGE models are usually "log-linearized". This means that the model is put in a linear form wherevariables are expressed in percentage of deviation from their steady state value. In TD3 we have derivedthe following model with de-trended variables (y, c, k, i instead of Y, C, K, I see TD3):

¢¨¨¨¨¦¨¨¨¨¤

1 Nt Lt

yt ct it

kt 1 δγ1kt1 it

yt γ1αAtk1α

t1 Nαt

λt cσt L

1σηt

ωt ηc1σt L

1ση1t

λt βλt1 1 αγ1αAt1kαt Nα

t1 γ11 δ

ωt λtαγ1αAtk1α

t1 Nα1t

At At1ρa expεa

(4.1)

Let's note xt, x and xt xtxx

, a de-trended variable, its steady state value and its deviation from thesteady state.

Q. 4.4.1. First, simply linearize the models equations using the rst order approximation : fxt

fx f xxt x. (there shouldn't be in the result any xφt or x1t x2t)

Q. 4.4.2. To these equations substract the steady state equations. Simplify and express the model interms of xt instead of xt.

55

Page 61: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.5 Back to the data: Price stickiness

Q. 4.5.1. Go to Insee.fr consumption prices data, and exemplify the stickiness or full exibility of priceswith less than 4 graphs.(You may also use rst class programs to analyse the prices cycle and trend.)

56

Page 62: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.6 Analyzing the business cycle of a theoretical model

4.6.1 A real business cycle model

Fitting Ouput

Q. 4.6.1. Use the mod.le from TD2 (with the calibration from the exercise). Calibrate the standarddeviation of the productivity shock to reproduce the volatility of GDP from King and Rebelo's table.What is the value of the standard deviation you take ? (no need to be more precise than one gure afterthe comma)

Q. 4.6.2. Keeping the result from the previous question, adjust the autocorrelation of the productivityshock (ρa) to match the autocorrelation of the GDP in King and Rebelo's table. (no need to be moreprecise than one gure after the comma)

Fitting Consumption and investment

Q. 4.6.3. With your new calibration, what is the variance of consumption and investment compared toKing and Rebelo's table ?What are the correlations of consumption and investment with output (compared to King and Rebelo) ?

Q. 4.6.4. Dene the parameter σ. How do you expect the volatility of consumption to change when youincrease this parameter ? Check this result with your model and justify it.

And the labor market ?

Q. 4.6.5. Comment on the relative standard deviation of hours worked. Empirically, productivity isnegatively correlated with hours worked. Do you replicate this fact ?What kind of modications would you make to better t labor market data within this framework ?

Figure 4.1: Extract from King and Rebelo 1999, some statistics for the US business cycle

57

Page 63: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.6.2 A neo-Keynesian model

Q. 4.6.6. Use the mod.le from TD5 (with the calibration from the exercise). Use for the standarddeviation and the autocorrelation of the productivity shock the values from the previous exercise ? Doyou replicate the volatility and the autocorrelation of output form King and Rebelo's table ?

Using the calibration from TD5 answer the following questions.Real rigidities

Q. 4.6.7. Compare h 0 with h 0.8 (impulse response functions, standard deviation of consumptionand other variables, autocorrelation). In the previous exercise, we have seen that the standard deviationand the correlation of consumption with output did not t the data. Do they do now ?

Nominal rigidities

Q. 4.6.8. Calibrate ξ 0, ξ 0.7, ξ 0.99. In which case is there a link between real and nominaleconomy ? How can the central banker can increase output by 1% in the three cases ?

The role of monetary policy

Q. 4.6.9. Now calibrate ry 0 and rπ 0, 0.5, 1. What happens when you simulate your model or usethe command check;?What can you conclude on the role of monetary policy ?In the light of Friedman's citation, comment on the eect of a monetary policy shock. Why are DSGEmodels so widely used in Central Banks ?

Pegging of Interest Rates

History has already persuaded many of you [that monetary policy cannont peg interest rates for more thanvery limited periods]. The failure of cheap money policies (...) involved widespread recoginition that the wartimeand postwar pegging of bond prices was a mistake [and] that the abandonment of this policy was a desirable andinevitable step (...).

Let the Fed set out to keep interest rates down. How will it try to do so ? By buying securities (...). The initial

impact of increasing the quantitiy of money at a faster rate than it has been increasing is to make interest rateslower for a time than they would otherwise have been. But this is only the beginning of the process not the end.The more rapid rate of monetary growth will stimulate spending (...), income (...), demand for loans [and] raiseprices, which would (...) reverse the initial downward pressure on interest rates fairly promptly, say, in somethingless than a year (...).

Let the higher rate of monetary growth produce rising prices, and les the public come to expect that prices willcontinue to rise. Borrowers will then be willing to pay and lenders will then demand higher interest rates (...).These subsequent eects explain why every attempt to keep interest rates at a low level has forced the monetaryauthority to engage in successively larger and larger open market purchases.

These considerations (...) explain why monetary policy cannot peg interest rates.

58

Page 64: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.7 Reading: RBC vs Neo-Keynesians

Q. 4.7.1. What is Chari, Kehoe and Mc Grattan critic on the mark-up shocks ?("New Keynesian Models: Not Yet Useful for Policy Analysis," NBER Working Papers, 2008 )

59

Page 65: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.8 Reading: The value of lambda in the HP-lter

Q. 4.8.1. If the value for lambda in a standard HP-lter on quarterly data is 1600, to which value shouldit be set on annual data ? On monthly data ?(`On Adjusting the Hodrick-Prescott Filter for the Frequency of Observations', The Review of Economicsand Statistics, 2002 )Give a specic example of how this new parameter changes the results of Backus and Kehoe (1992).(`International Evidence on the Historical Properties of Business Cycles', American Economic Review,1992 )

60

Page 66: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.9 Introducing capital market and investment into a generalequilibrium model

In class, you have seen a general equilibrium neo-Keynesian model without capital. In this exercise youwill develop the dierent equations and programs to introduce investment into the model in its simplestway (non PhD tracks) or with rigidities (PhD tracks).

Warm up : Capital Dynamic

Kt is the capital at the end of period t,It the investment,τzt the depreciation rate which depends on the utilization rate of capital zt.

You will suppose that It units of investment are transformed into εIt 1 s2 ItIt1

It12 It units of capital.

For both tracks, εIt will be a (log-normal) shock on investment eciency (called investment specic shock).For non PhD tracks, s 0 and zt 1.For PhD tracks, s A 0.

Q. 4.9.1. Write the capital evolution equation. Linearize this equation.

Q. 4.9.2. PhD Tracks: Comment on the function of transformation of investment into capital and theinvestment specic shock.

Capitalists program

We suppose that capital is owned by households who rent this capital to the rms. At time t house-holds receive interest on the eective capital rent last period rKt Kt.Note that the eective capital at time t is Kt ztKt1.Investment good is the same as the consumption good. Households will then face an arbitrage betweenconsumption today which yields utility and investment which yields future income.

Q. 4.9.3. Add investment to the household's budget constraint. Write their new maximization program.List the state and control variables of this program.

Q. 4.9.4. Derive the maximization program and dene Tobin's Q in this context (with both an equationand a sentence)?

Q. 4.9.5. Smartly linearize this program using the results found in the maximization program of con-sumers (who happen to be the same agents as capitalists).

Collateral Damages of investment and capital introduction

Now that we have introduced investment and capital through new equations, we must change some equa-tions in the neo-Keynesian model seen in class.

By assumption, G X M ∆S (government expenditure, trade balance and stock variation) is ashock.

Q. 4.9.6. Write the new equation of market clearing and linearize it.

61

Page 67: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Q. 4.9.7. Production function is Yt AtKαt L

1αt , where At is TFP. TFP is a log-normal shock. Linearize

this equation.

Q. 4.9.8. Apart from price setting, other decisions of the rm are made at each period. Show that theratio of labor and capital remuneration is constant.

WtLt

rKt Kt

1 α

α(4.2)

Q. 4.9.9. Show that the marginal cost of production is equal to

MCt rKtα

α

Wt1 αAt 1α

(4.3)

Q. 4.9.10. PhD Tracks : Show that the marginal cost of production is equal to the mean cost ofproduction.

Q. 4.9.11. Linearize the marginal cost of production.

The Phillips Curve now reads....à donner

4.10 Investment in a Neo-Keynesian model : Dynare implemen-tation

Q. 4.10.1. List and dene the endogenous and exogenous variables of the new neo-Keynesian model youhave completed with the rst exercise.

Q. 4.10.2. List the linearized equations you have for this model.

Q. 4.10.3. How would you modify the priors compared to the ones from TD12 ? What do you chooseas priors for the new parameters ? Do you calibrate some of them ?

Q. 4.10.4. Use HP-ltered data to estimate the model for the US using dynare.

Q. 4.10.5. How do you check the robustness of your estimation ? Are you satised with it ?

You can nd inspiration in Christiano Eichenbaum and Evans, 2005. "Nominal Rigidities and the Dy-namic Eects of a Shock to Monetary Policy," Journal of Political Economy, or Smets and Wouters,2003. "An Estimated Dynamic Stochastic General Equilibrium Model of the Euro Area," Journal of theEuropean Economic Association.

62

Page 68: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

4.11 Forecasting monthly consumption in goods

The purpose of this home assignment is to use monthly data to forecast the over the year growthrate of French household's consumption in goods, using univariate models. In the attached data set,you have a subset monthly consumption series, and series for unemployment rate, interest rates (loansand deposits of households), consumer price index, a subset household's condence survey and weatherconditions (rain and temperature).

4.11.1 Step 1: Analysing the data

This rst step is mandatory every time you work with data. Before jumping into regressions, estimationsand other calculations, a good researcher or analyst must take time to read, analyse, plot... get to knowthe data. (You should also read the documentations associated with each publication.)

Denition

Q. 4.11.1. What is the group of products for which you try to forecast household's consumption ? (nojibber jabber, we want a real systematic answer)

Graphs

Q. 4.11.2. Plot the time series to be modelled (in level and growth rates) : total households' consumptionin goods in million euros (in chained linked volumes). Identify the most specic events and explain themusing sub series and publications of that month (see web links below).

Q. 4.11.3. Plot the rest of the data set. You should perform the most appropriate transformations beforerepresenting the data (over the year growth rate, qoq growth rate, rst dierence, ratio...). 6 gures top,gather time series depending on their denition and prole. (this constraint is not only for presentation,but should help make a selection of variables)

Q. 4.11.4. Dress a descriptive table of the data : denition, source, time period, stationarity (state thisproperty a priori).In this data set, which time series should be good regressors for households consumption ?Which regressors are linked to economic theory ?What commonly used regressors are missing ?

Q. 4.11.5. Bonus question : In the data set, you can nd unemployment and ination objectivemeasures and also households' answers to questionnaires about unemployment and ination.Are households good forecasters of unemployment ? Ination ? (extra care must be given to the timelinesswhen answering this question)

Statistics

Q. 4.11.6. Households' monthly expenditure in goods is also detailed between foods products, energy,durables, textile and leather, manufactured goods. Compare these sub series in m-o-m growth rate(average growth, standard error, correlation).Having in mind the dierent economic theories for households' consumption, what can you say aboutthese data ?

63

Page 69: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Q. 4.11.7. Before estimating an univariate model, compute the variance covariance matrix of yourregressors.From this matrix, what are your "intuitions" on the ability of your time series to forecast consumptionand on the redundancy of your regressors ?

SelectionIn the data le you were given, you had many time series. Actually too many. The analysis you just ran,should enable you to select a sub sample, representative of the all data set, which you will use to run theestimations.

Q. 4.11.8. What is your data selection ? Justify your choice and the number of series selected.

Q. 4.11.9. Have you reconsidered your selection after step 2 and 3 ? If so explain how and why ?

4.11.2 Step 2: Granger Causality

A time series is said to Granger cause another if it signicantly improves the t of a model describingthe latter. Here we will perform a simple test of Granger causality by comparing the best autoregressivemodel with this model including an additional regressor.How to do so ?Let M1 denote the model without the additional regressor (i.e. the best AR model), also called therestricted model. Let M2 denote the model with the additional regressor of which you want to assessthe Granger causality, also called the unrestricted model. One will perform a Fischer's test for the nullhypothesis that M2 does not signicantly improve the model describing the variable of interest. Letn, p, RSSEi denote the length of the variable of interest, the number of lags in the AR model, and theroot sum square error of model i respectively.

Fstat RSSE1 RSSE2

RSSE2

np1

(4.4)

follows a F-distribution with 1, n p 1 degrees of freedom1.The null hypothesis is rejected if the F-stat is greater than the 5% critical value of F-distribution of thecorresponding degrees of freedom.

Q. 4.11.10. Find the best autoregressive model to t the monthly data for households' consumption ingoods (in y-o-y growth rate). Justify the autoregressive structure of your regression.To properly answer this question, you must give the equation you estimated with the value of the coef-cients, their Student's statistics (cf rst HA), the root mean square error of your model and plot thedata against the equation without its residuals.

Q. 4.11.11. Granger Causality : Using Fischer's statistics, test the Granger causality of each regressorin the data set. Collect the results in a table.

4.11.3 Step 3: Univariate analysis

Q. 4.11.12. Using your selected time series, estimate an univariate regression of consumption on yourselected regressors ? Justify the autoregressive structure of your regression.To properly answer this question, you must give the equation you estimated with the value of the coef-cients, their Student's statistics (cf rst HA), the root mean square error of your model and plot the

1Note that by construction RSSE1 A RSSE2 so that the F statistics is always positive : adding one regressor can only

improve the t to the data.

64

Page 70: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

data against the equation without its residuals.

4.11.4 Conclusion :

Q. 4.11.13. Compare your best AR model with your last regression : plot on the same graph the dataagainst both equations without their residuals, plot another graph with the residuals of both equations.Compare the t in sample (RMSE) of both models. Which model is the best one or are they equivalent ?

All these data, and related informations are available on the internet

Monthly consumption

Consummer Price Index

Monthly consumer condence survey

Unemployment

Interest rates

Weather conditions

65

Page 71: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Chapter 5

Recreations

Reading

Filtering

Extensions HP-Filter is one solution to stationarize the data. It is not without criticisms.

Timothy Cogley and James M. Nason. Eects of the hodrick-prescott lter on trend and dierencestationary time series implications for business cycle research. Journal of Economic Dynamics andControl, 19(1-2):253-278, 1995

Fabio Canova. Detrending and business cycle facts. Journal of Monetary Economics, 41(3):475-512,May 1998

Fabio Canova. Does detrending matter for the determination of the reference cycle and the selectionof turning points? Economic Journal, 109(452):126-50, January 1999

66

Page 72: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Economic Web Surng

Business clocks

Click to access:the OECD business cycle clockhttp://www.oecd.org/document/42/0,3343,en_2649_34349_42612074_1_1_1_1,00.htmlor the one by eurostathttp://epp.eurostat.ec.europa.eu/cache/BCC2/group1/xdis_en.htmland have a look at the business cycle by yourself !

I wanna be a Central Banker

You can try to become the best Central Banker on the ECB website :http://www.ecb.int/ecb/educational/economia/html/index.en.htmlYou can be an analyst looking for signs of ination :http://www.ecb.int/ecb/educational/inationisland/html/index.en.html

What about me ?

What's your own ination ? Find out thanks to Insee :http://insee.fr/fr/indicateurs/indic_cons/sip/sip.htm How much CO2 do you emit ? Find out withSwedish Statistical Institutehttp://www.mirdata.scb.se

67

Page 73: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Chapter 6

Maths Helps

6.1 Log Linearization

6.1.1 Brief Presentation

Motivations :

Many modern economic models are hard to solve due to non-linearities

Even in Dynare, steady state convergence is not always easy...

Basic Idea : Use a rst-order Taylor approximation around the steady state to replace the equationswith approximations which are linear in the log-deviations of the variables.

Taylor Approximation : A function fx can be approximated around the point x by the followingso-called Taylor polynomial of order 1:

fx fx f xx x (6.1)

Log-deviations : When X A 0, we dene:

xt Xt X

X(6.2)

Log-deviations can be interpreted as percentage deviations from the steady state.

6.1.2 Examples and Basic Formulas

fX

fX fX f XX X (6.3)

fX Xf Xx (6.4)

68

Page 74: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

fgXLet us dene Y gX:

fgX fY fY Y f Y y (6.5)

And:

Y Y y Y gX gX XgXx (6.6)

¢¦¤

Y gXy

XgXgX x

(6.7)

Hence:fgX fgX XgXf gXx (6.8)

fX,Y

fX,Y fX, Y ∂f

∂XX, Y X X ∂f

∂YX, Y Y Y (6.9)

fX, Y X ∂f

∂XX, Y x Y ∂f

∂YX, Y y (6.10)

If fX,Y XYXY XY 1 x y (6.11)

If fX,Y X~YX

YX

YX X

YXY Y

Y 2(6.12)

X

Y1 X Y (6.13)

More generally, if fX,Y XσY η

XσY η XσY η1 σx ηy (6.14)

If fX,Y XY

XY X Y

Y X Y 1X X lnX X Y Y Y (6.15)

X Y 1 Y x Y lnX y (6.16)

Pt utAtBt Ct 0

Qt

ut AtBt Ct Qt

ut A1 atB1 bt C1 ct (6.17)

where At, Bt and Ct are stationary processes.

69

Page 75: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

At the Steady State :

Qt

utAB C 0 (6.18)

OR

RRRRRRRRRRRRRRRRRR

0 A

B C

0 Qt

ut

(6.19)

Let us assume:

0 x A (6.20)

0 xQt

ut (6.21)

Hence,B C (6.22)

And:

Qt

utbt ct 0 (6.23)

70

Page 76: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

6.2 VAR structuration

6.2.1 Theorem

We consider a random vector εt ε1,t ε2,tεn,t, independent and identically distributed, followinga Gaussian distribution with zero mean and covariance matrix Σ. Let us assume that the correlatedstochastic process εt can be expressed as a function of orthogonal shocks ηt, an independent standardnormal vector :

εt ηtR (6.24)

ηt N0, In (6.25)

We know that a necessary and sucient condition that R must satisfy to replicate the covariancematrix Σ of the correlated shocks is :

Σ Eεtεt (6.26)

Σ RR (6.27)

We also know from previous computation (cf. TD7) that the maximization of the likelihood of thismodel is equivalent to the following minimization program :

minR

log detR2 trace R1ΣR1 (6.28)

The purpose of this mathematical appendix is to underline the link between those two conditions. Thefollowing theorem illustrates the mathematical grounds of VAR structuration.

Theorem : A matrix R is solution to the likelihood-based minimization program if and only if:

Σ RR (6.29)

6.2.2 Demonstration

Let R0 be a solution of the equation Σ RR (for instance, the Choleski decomposition).We dene S RR0

1. Then, R is solution to the minimization program if and only if S minimizes :

log detSR02 trace SR01ΣSR01 (6.30)

log detS2 detR02 trace R

0S1ΣSR01 (6.31)

log detS2 log detR02 trace S1R

01

ΣR01S1 (6.32)

Using the fact that Σ R

0R0 (and detΣ detR02):

log detR2 trace R1ΣR1 (6.33)

log detS2 logdetΣ trace S1R

01R

0R0R01S1 (6.34)

log detS2 logdetΣ trace S1S1 (6.35)

We now use the QR decomposition of the matrix S1. Given any nonsingular matrix S1, there exists aunique orthogonal matrix Q (QQ In), and an upper-triangular matrix T with positive diagonal entries,

71

Page 77: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

such that S1 QT (using the Gram-Schmidt orthonormalization process). Then:

log detR2 trace R1ΣR1 (6.36)

log det QT 12 logdetΣ trace QT QT (6.37)

log detQ2 detT 2 logdetΣ trace T QQT (6.38)

log detT 2 logdetΣ trace T T , using QQ In (6.39)

Hence, R is solution to the minimization program if and only if T minimizes :

trace T T log detT 2 (6.40)

Let us denote :T αi,j¢

¦¤

1 B i B n

1 B j B n

(6.41)

T being upper-triangular with positive diagonal entries:

¦1 B i B n, 1 B j B n, i A j αi,j 0 (6.42)

and ¦1 B i B n, αi,i A 0 (6.43)

Thus,

trace T T n

Qj1

j

Qi1

αi,j2 (6.44)

And,

detT n

Mi1

αi,i (6.45)

log detT 2 n

Qi1

logαi,i2 (6.46)

Finally,

trace T T log detT 2 n

Qj1

j

Qi1

αi,j2 n

Qi1

logαi,i2 (6.47)

Which leads to the following rst order conditions :

¢¦¤

¦i @ j, 0 2αi,j

¦1 B i B n, 0 2αi,i 2

αi, i

(6.48)

¦i @ j, 0 αi,j

¦1 B i B n, 1 αi,i(6.49)

Hence,

T In (6.50)

S1 Q (6.51)

R QR0 (6.52)

RR R

0QQR0 R

0InR0 R

0R0 (6.53)

RR Σ (6.54)

72

Page 78: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Thus, if R minimizes the likelihood-based program, then RR Σ.

Reciprocally, is RR Σ R

0R0, then RR01RR0

1 In. So, S RR01 is orthogonal. Hence,

log detR2 trace R1ΣR1 (6.55)

log detS2 logdetΣ trace S1S1 (6.56)

log1 logdetΣ trace In (6.57)

logdetΣ n (6.58)

As demonstrated above, this value corresponds to the attained minimum of the likelihood-based pro-gram.

73

Page 79: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

6.3 Kalman Filter (unnished)

State Space representation

A linear state space representation reads as follows1:

yt Axt H

ξt wt (6.59)

ξt Fξt1 vt (6.60)

with F,A,H matrices of size r r, n k and n r respectively.yt is the n 1 vector of observable variables at time t; xt is a k 1 vector of predetermined variablesat time t (one can think of them as regressors); ξt is the r 1 vector of unobservable variables at timet (so called state vector or variables).v and w are two vectors of white noises, non autocorrelated and independant from one another.

A more general form of the state space representation allows for predetermined variables in the stateequation ((6.60)) and for time varying matrices in both the state equation and the observation equation((6.59))

Examples

MA(q)

yt εt θ1εt1 . . . θqεtq (6.61)

Can be written

yt 1 θ1 . . . θq <@@@@@@@>

εtεt1

εtq

=AAAAAAA?(6.62)

<@@@@@@@>

εtεt1

εtq

=AAAAAAA?

<@@@@@@@@@>

0 0 . . . 0 01 0 . . . 0 00 1 . . . 0 0

0 0 . . . 1 0

=AAAAAAAAA?

<@@@@@@@>

εt1

εt2

εtq1

=AAAAAAA?

<@@@@@@@>

εt0

0

=AAAAAAA?(6.63)

but can also be written

yt θ1 . . . θq <@@@@@@@>

εt1

εt2

εtq

=AAAAAAA? εt (6.64)

<@@@@@@@>

εt1

εt2

εtq

=AAAAAAA?

<@@@@@@@@@>

0 0 . . . 0 01 0 . . . 0 00 1 . . . 0 0

0 0 . . . 1 0

=AAAAAAAAA?

<@@@@@@@>

εt2

εt3

εtq1

=AAAAAAA?

<@@@@@@@>

εt1

0

0

=AAAAAAA?(6.65)

1We borrow from Hamilton chapter 13 the notations

74

Page 80: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

A Phillips Curve

We denote HICP ination πt, the unemployment rate ut, survey based ination expectations St1St. Weassume that the true ination expectations Et πt1 that enter the following hybrid Philips curve, thoughnot observed, are correlated with St1St.

πt αEt πt1 1 απt1 γut εt

Et πt1 βSt1St δπt εt

We can write this system in a state space representation denoting yt πt, ξt Et πt1, wt εt, vt εt.There are predetermined variables in both equations : xt ut πt1 in the observation equation ((6.59))and we note zt St1St in the state equation ((6.60)).We can write :

yt γ 1 αxt αξt εt (6.66)

ξt βzt εt (6.67)

Note that in this case, F 0 in addition to having predetermined variables in the state equation.

A basic DSGE model

We borrow Galí 's Basic New Keynesian Model. Equation 12 gives :

ytπt

A Et yt1Et πt1 Brnt vt (6.68)

with A a 2 2matrix and B a 2 1 matrix.

75

Page 81: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

Bibliography

Agresti, A. M., and B. Mojon (2001): Some stylised facts on the Euro area business cycle, .

Backus, D., and P. Kehoe (1992): International evidence on the historical properties of businesscycles, The American Economic Review, 82(4), 864888.

Baxter, M., and R. G. King (1999): Measuring Business Cycles: Approximate Band-Pass FiltersFor Economic Time Series, The Review of Economics and Statistics, 81(4), 575 593.

Blanchard, O., and C. Kahn (1980): The solution of linear dierence models under rational expec-tations, Econometrica: Journal of the Econometric Society, 48(5), 13051311.

Blanchard, O., and D. Quah (1989): The dynamic eects of aggregate demand and supply distur-bances, 79(4), 655673.

Calvo, G. A. (1983): Staggered prices in a utility-maximizing framework, Journal of Monetary Eco-nomics, 12(3), 383 398.

Canova, F. (1998): Detrending and business cycle facts, Journal of Monetary Economics, 41(3),475512.

(1999): Does Detrending Matter for the Determination of the Reference Cycle and the Selectionof Turning Points?, Economic Journal, 109(452), 126 50.

Chari, V. V., P. J. Kehoe, and E. R. McGrattan (2009): New Keynesian Models: Not Yet Usefulfor Policy Analysis, American Economic Journal: Macroeconomics, 1(1), 242 66.

Christiano, L. J., M. Eichenbaum, and C. L. Evans (2005): Nominal Rigidities and the DynamicEects of a Shock to Monetary Policy, Journal of Political Economy, 113(1), 1 45.

Cogley, T., and J. M. Nason (1995): Eects of the Hodrick-Prescott lter on trend and dierencestationary time series Implications for business cycle research, Journal of Economic Dynamics andControl, pp. 253 278.

Diron, M., and B. Mojon (2008): Are ination targets good ination forecasts?, Economic Perspec-tives, pp. 33 45.

Dixit, A. K., and J. E. Stiglitz (1977): Monopolistic Competition and Optimum Product Diversity,American Economic Review, 67(3), 297 308.

Friedman, M. (1968): The role of monetary policy, American Economic Review, (March).

Fuhrer, J. (2000): Habit formation in consumption and its implications for monetary-policy models,American Economic Review, (1996).

Gali, J. (1999): Technology, Employment, and the Business Cycle: Do Technology Shocks ExplainAggregate Fluctuations?, American Economic Review, 89(1), 249 271.

76

Page 82: Economics and Public Policy Master 2 Interpreting ... · PDF fileEconomics and Public Policy Master 2 Interpreting Macroeconomic Time Series Teacher Benoit Mojon Teaching assistants

(2008): Monetary Policy, Ination, and the Business Cycle: An Introduction to the NewKeynesian Framework., .

Gordon, D. B., and E. M. Leeper (1994): The Dynamic Impacts of Monetary Policy: An Exercisein Tentative Identication, Journal of Political Economy, 102(6), 1228 47.

Hamilton, J. D. (1994): Time Series Analysis, .

Hodrick, R. J., and E. C. Prescott (1997): Postwar U.S. Business Cycles: An Empirical Investi-gation, Journal of Money, Credit and Banking, 29(1), 1 16.

King, R. G., and S. T. Rebelo (1999): Resuscitating real business cycles, in Handbook of Macroe-conomics, chap. 14, pp. 927 1007.

Klein, P. (2000): Using the generalized Schur form to solve a multivariate linear rational expectationsmodel, Journal of Economic Dynamics and Control, 24, 14051423.

Leeper, E. M., C. A. Sims, and T. Zha (1996): What Does Monetary Policy Do?, Brookings Paperson Economic Activity, 27(2), 1 78.

Ravn, M., and H. Uhlig (2002): On adjusting the Hodrick-Prescott lter for the frequency of obser-vations, Review of Economics and Statistics, 84(2), 371376.

Sims, C. (2002): Solving linear rational expectations models, Computational Economics, (iii), 120.

Stock, J. H., and M. W. Watson (1999): Business cycle uctuations in us macroeconomic timeseries, in Handbook of Macroeconomics, chap. 1, pp. 3 64.

Stock, J. H., and M. W. Watson (2002): Macroeconomic Forecasting Using Diusion Indexes,Journal of Business & Economic Statistics, 20(2), 147 62.

Taylor, J. (1980): Aggregate dynamics and staggered contracts, The Journal of Political Economy,88(1), 123.

77