vars and factors

38
VARs and factors Lecture to Bristol MSc Time Series, Spring 2014 Tony Yates

Upload: drake

Post on 25-Feb-2016

59 views

Category:

Documents


1 download

DESCRIPTION

VARs and factors. Lecture to Bristol MSc Time Series, Spring 2014 Tony Yates. What we will cover. Why factor models are useful in VARs Static and dynamic factor models ‘VAR in the factors’ Factor augmented VAR. Estimation of factors by principal components. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: VARs and factors

VARs and factors

Lecture to Bristol MSc Time Series, Spring 2014Tony Yates

Page 2: VARs and factors

What we will cover

• Why factor models are useful in VARs• Static and dynamic factor models• ‘VAR in the factors’• Factor augmented VAR.• Estimation of factors by principal components.• Identification in Var in the factors or FAVAR: sign

restrictions. • Application : Stock and Watson’s ‘Disentangling...’

paper

Page 4: VARs and factors

Dimensionality motivation for factor models

• Omitting variables from our VAR means our reduced form shocks don’t span the structural shocks.– Eg Leeper Sims Zha (1996), 13, 18 variable VAR

• But including more variables mean no of coeffs to be estimated expands by n^2*lags, while number of data points increases by n*T.

• Central bank tracks 100s of variables. Unless they are wasting time, maybe they should all enter?

• Exercise: when does the curse of dimensionality bite?

Page 7: VARs and factors

Yet more interesting factor model research

• Stock+Watson ‘Implications of dynamic factor models for VAR analysis’– Redoes SVAR identification with factors.– Finds? An exercise for you to summarise it.

• Harrison, Kapetanios, Yates: Estimating TVP-DFM models using kernel methods.

• Rudebusch: survey of macro-finance work on yield curve, including factor modelling.

Page 8: VARs and factors

A simple static factor model

Yt F t U t

F t AF t 1 Z t

Y is our vector of observeables, driven by the latent factors F.

Factors follow a VAR process as before.

Page 9: VARs and factors

Simple dynamic factor model

Yt 0F t 1F t 1 U t

F t AF t 1 Z t

It’s ‘dynamic’ because lags of the factors drive the observeables too.

Page 10: VARs and factors

Dynamic factor model written as a static factor model

Ft F t

F t 1

Yt 0 1 Ft U t

I A Ft Z t

Sometimes convenient to create the enlarged state vector with current and lagged factors.

And then re-write in terms of current values only of this enlarged state vector.

Page 11: VARs and factors

3 factor, 6 variable example.

Yt

1t

2t

r1t

r2t

x 1t

x 2t

1 1r 1x

2 2r 2x

r1 r1r r1x

r2 r2r r2x

x1 x1r x1x

x2 x2r x2x

F

Fr

Fxt

U 1

U 2

U r1

U r2

Ux1

Ux2

F

Fr

Fxt

A A r A x

Ar Arr Arx

Ax Axr Axx

F

Fr

Fxt 1

Z

Zr

Zxt

Here we have six variables, including 2 proxies for each of the variables in the simple sticky price model, which we will assume are the factors.

Page 12: VARs and factors

Restrictions in the measurement equation of the factor model

Yt

1t

2t

r1t

r2t

x 1t

x 2t

1 0 0

2 0 0

0 r1r 0

0 r2r 0

0 0 r1r

0 0 r2r

F

Fr

Fxt

U 1

U 2

U r1

U r2

Ux1

Ux2

Since we have a clear prior about which observables relate to which economic concept, we might restrict elements of the factor loading matrix lamda.

If we didn’t, we would get less well determined estimates.Cost is that we have to be confident our restrictions are valid.

Page 13: VARs and factors

Factor Augmented VAR [FAVAR]

Yt AYt 1 et

Yt

it

t

f t

X it if t u it

Imagine [quite realistically] that we thought inflation and interest rates were pretty well measured, but the output gap was not, and we had several alternative proxies for this.

We would extract one factor from these output gap measures, then include it in a vector of ‘observables’ and estimate a VAR as before.

Page 14: VARs and factors

‘Blessing of dimensionality’

Obs on Y driven by a single factor F

Now average over both sides of the equation

Yit iF t eit

1/n i 1

n

Yit 1/n i 1

n

iF t eit

1/n i 1

n

iF t 1/n i 1

n

eit

1/n i 1

n

Yit p F t

Invoke assumption that errors uncorrelated with each other, and we get to the result that as n gets large, the average of our observeables uncovers the factor.

Page 15: VARs and factors

Estimation

• Formulation as state-space model suggests estimation using Kalman Filter [putting it in a wide class of estimation problems, eg estimation of a DSGE/RBC model.

• KF computes the likelihood for a given parameter value.

• Then maximise wrt the parameters.• Problem: many parameters therefore large

dimensional optimisation problem.• Can be reduced with priors about loading matrices.

Page 16: VARs and factors

Estimation: preliminaries. See Bai and Ng survey.

x it iF t eit

X t x 1t,x 2t. . .xNt

F F1 . . . .FT

1 , . . . . N

X t F t et

X X1 . . .XN T N

X F e,

e e1 , . . . .eN T N

Step by step, we stack the entire data set and factor decomposition in matrix form.

Page 17: VARs and factors

Variance-decomposition under the factor model

F

,EF tF t Ir

Variance-covariance matrix of the data

Variance-covariance of the idiosyncratic shocks

Contribution of the factors

Terms in the factors disappear, as we are going to use this normalisation to resolve identification.

Page 18: VARs and factors

Identification problem in the factor model

X F e F FAA 1

F ,

F FA, A 1We are trying to estimate F and lamda on the RHS here.

But we can see that we can ‘rotate’ the factors and loadings with any invertible r*r matrix A, and still preserve the equation with the LHS data matrix.

X F e F e

Page 19: VARs and factors

Identification to resolve the indeterminacy of the factors and the loadings.

FF I rr 1/2 restrictions

diagonal rr 1/2 restrictions

Page 20: VARs and factors

Estimation by Principal Components

T k matrix of factors Fk

N k matrix of loadings k

This is what we seek in estimation. Note that in finding k factors, we might not search for the true r factors.

min k ,F k

Sk, s. t.FkFk Ik, k k D.

Sk NT 1 i 1

N

t 1

T

x it kF tk2

Like all estimation, finding the factors and loadings is an optimisation problem.

By choice of the factors we try to minimise the residual sum of squares!

Page 21: VARs and factors

Recasting the minimisation problem and its solution.

maxF k

trFkX XFk

Fk

T evc1XX . . . .evckXX

Fk

Fk

T Ik k

Fk

XT

Two ways to proceed. Usually the same.Here we ‘concentrate out’ lamda from the objective function.We maximise the explained sum of squares.The estimated factors are the k eigenvectors of XX’, corresponding to the k largest eigenvalues.

Page 22: VARs and factors

Principal components estimation of the factors

MinVr ,F,Vr ,F 1/NT t 1

T

X t F tX t F t

subject to N 1 Ir

X T 1

t 1

T

X tX t

F t N 1X t

Define sample var cov matrix of observed data

Least squares problem

Solution. Lambdahats are scaled eigenvectors associated with r largest eigenvalues of sigmahat.

Page 23: VARs and factors

Principal Components estimation [Bai and Ng, JOE in press]

X it iF t eit

X F e

Write our factor model in matrix form.

trX F X F Factor etimation, of the factors and loadings, minimises this objective.Equivalent to the contribution of the idiosyncratic errors.

F F Ir

Dr These are constraints placed on the estimation.

Page 24: VARs and factors

PC estimates of factors and loadings

1 . . .

N X F

T

F F1 . . . .Fr ev 1Z,ev 2Z. . . .ev rZ/ T

Z XX/TN

Factors are the r scaled eigenvectors of the vcov matrix of the data.The loadings are products of the data matrix and the estimated factors.Watch out: papers sometimes use different notation, partly because the procedure only identifies separately the product of the factors and the loadings, and not each element.

Page 25: VARs and factors

Estimation of the full system

• 2-step procedure.• Having estimated the factors by principal

components analysis…• …Treat the factors like you would observed

data and then estimate the VAR in the factors using your chosen favoured method (MLE, OLS...).

Page 26: VARs and factors

Identifying factors using sign restrictions

Yt F t U t

F t AF t 1 Z t

EZZ Z PZPZ PZCC PZ

Assume static factor model, and VAR(1) in the factors.

Just as with VARs in the variables, we can factor the vcov matrix of shocks to factors, and factor further using an orthonormal matrix C.

PZCWe draw multiple C’s, and then inspect the sign of the impact on observeables in the same way as before, except now we have to substitute into the measurement equation and premultiply by lamda.

Page 27: VARs and factors

Description in words of sign restriction factor identification

• Example: monetary policy shock. – Normal VAR. A mp shock is one that if it drives cb rate

up, will drive output down, inflation down.– DFM. A mp shock is a shock to the VAR in the factors

such that, given the factor loadings estimated in stage 1, if it drives the cb rate up, it also drives the inflation rate down and output down.

– One point of factor model would be to have many proxies for inflation. So restriction here would be that it would drive all (eg) proxies for inflation down. Or perhaps most of them.

Page 28: VARs and factors

‘Identification’ using Cholesky in a factor model

Yt

1 2x 1x 2

t

1 0

2 0

0 1x

0 2x

F

Fxt

U t

F t AF t 1 Z t

Here I’m assuming we have four variables we have a prior are two observations each on two different economic concepts, say inflation and the output gap

Page 29: VARs and factors

Cholesky i.d. with factors

U t B0 1E

UU U B0 1EEB0 1

B0F t B1F t 1 E tAs before, we seek the elusive B0inv, which now encodes contemp relationship between the factors

B0 1 chol U PU

F irfh AhPUU

Yirfh F irf

h AhPUU

If we are ok with a lower-triangular B0inv connecting the factors then we simply take it to be the cholesky factor of the vcov matrix of residuals in the var in the factors.

Impuse response of factors computed as before. But impulse response of observables requires substituting into the measurement equation.

Page 30: VARs and factors

Application: Stock and Watson’s ‘Disentangling..’ paper

Trying to explain the recession.Note all real series show big drop relative to trend.Not surprising therefore that ‘common component’ [lamdahat*F] explains a lot.Their research question is:Was it bigger versions of old shocks that explain the crisis....Or new shocks.

Page 31: VARs and factors

1. Estimate DFM pre 20072. Feed in post 2007 factor

outturns.3. Do factors put through ‘old’

model explain data any worse post 2007?

4. If there was a new factor, you would expect R^2 to fall.

5. They don’t.6. Conclusion: there was no new

factor.7. Conflicts with narrative that

there was a new ‘financial crisis shock’.

8. Recall Christiano, Motto Rostagno’s ‘risk shock’ paper.

Page 32: VARs and factors

SW’s R^2 exercise

et X t F t

1 et

2

X t2

Factors and factor loadings estimated over pre-2007 sampleR^2 here can’t be >1, but it can be <1 (and sometimes is as we will see)If factors do a good job at explaining the series, then should be close to 1.

Page 33: VARs and factors

SW: how well do the old factors explain the new data

Page 34: VARs and factors

SW: Tests for break in factor loadings

Majority of tests accept stability.Tendency to reject caused by change in 1984.That relates to earlier work dating this as the start of the ‘Great Moderation’.Implication is that 2007 not responsible for many breaks.

Page 35: VARs and factors

SW: indication of existence of new factor

et X t F t

Eet2

v eig

v 1 /i 2

n

v i

Construct vcov of idiosyncratic shocks, using pre-crisis loadings and factors.

Compute ratio of first to sum of remaining eigenvalues.

Large value of this implies more correlation between idiosyncratic shocks.

Tests for equality of this ratio before and after crisis. P value of 0.59.

Page 36: VARs and factors

SW: evidence of increased factor variance

So if it wasn’t new factors, then it must be the old ones that increased.

This is the sd of lamdahat*F for selected series.You can see it increases during the crisis.

Page 37: VARs and factors

Post-script: Stock-Watson and the old two factor finding

• They say you need 7 or 8 factors, not 2.• The old finding was, they said, based on i) too

narrow a set of data, and ii) the early sample period.

• This is a huge deal in the business cycle literature, but the finding doesn’t seem to have attracted all that much attention.

Page 38: VARs and factors

Recap

• Factor models are a way to overcome curse of dimensionality. In fact there is a ‘blessing of dimensionality.’

• Can be combined with VARs: FAVAR, VAR in the factors. Estimated using PCA.

• Factors and loadings chosen to minimise contribution of idiosyncratic error variance.

• Stock and Watson’s financial crisis application.