Dynamic Factor Models

Chandler Lester

12 June 2018

Dynamic Factor Methods:

The Main Idea

\[ Y_{t} = \lambda + H' X_{t}+ w_{t} \] \[ X_{t} = \alpha + F X_{t-1} + v_{t} \]

How do we find these factors?

\(F_{t}\) is a \(K\times 1\) vector of factors, \(X_{t}\) is demeaned and standardized, and \(\lambda(L)\) is a \(N\times K\) matrix of factor loadings

\[ y_{t} = a(L)F_{t} + u_{t} \] \[ F_{t} = \Phi_{1}F_{t-1} + \dotso + \Phi_{p}F_{t-p} + \varepsilon_{t}^{f}\] \[ u_{t} = \phi_{1}u_{t-1} + \dotso + \phi_{p}u_{t-p} + v_{t} \]

What do We Get out of DFMs?

Additional Models:

FAVAR Models

Factor augmented VAR models, FAVARs, allow for more theortical insight into our model by combining dynamic factors and VARs

Modifying the model from a previous slide, a popular FAVAR would be:

\[ y_{t} = a(L)F_{t} + b(L)\gamma_{t} + u_{t} \] \[ F_{t} = \Phi_{1}F_{t-1} + \dotso + \Phi_{p}F_{t-p} + \varepsilon_{t}^{f}\] \[ \gamma_{t} = \beta_{1}\gamma_{t-1} + \dotso + \beta_{p}\gamma_{t-p} + \varepsilon_{t}^{\gamma}\]

Additional Models:

TVP-FAVAR Models

We might want to allow coefficients in our model to vary over time, this leads us to time varying parameters FAVARs (TVP-FAVARs) \[ y_{i,t} = \lambda_{i,t}f_{t} + \alpha_{i,t}\gamma_{i,t} + u_{i,t} \] \[ f_{t} = \Phi_{1,t}f_{t-1} + \dotso + \Phi_{p,t}f_{t-p} + \varepsilon_{t}^{f}\] \[ \gamma_{t} = \beta_{1,t}\gamma_{t-1} + \dotso + \beta_{p,t}\gamma_{t-p} + \varepsilon_{t}^{\gamma}\]

Approaches to Estimating DFMs

  1. Maximum Likelihood Estimation (frequentist)
    • good for when \(n\) is small
  2. Principal Components Estimation (frequentist)
    • good for when \(n\) is large
  3. Bayesian “State-Space” approach (Kim-Nelson)
    • good for when the number of factors \(k\) is small
  4. Bayesian Otrok-Whiteman approach
    • good for when the number of factors \(k\) is large
    • good for large data sets
    • based on data augmentation techniques

The Otrok-Whiteman Approach

More on the Otrok-Whiteman Approach

The general idea behind this approach is to implement a MCMC procedure. Suppose we have a model with world, region, and country factors.

\[ y_{i,t} = a_{i} + b_{i}^{world}f_{t}^{world} + b_{i}^{region}f_{r,t}^{region} + b_{i}^{country}f_{n,t}^{country}+\varepsilon_{i,t}\]

where,
\[f_{k,t} =\varepsilon_{f_{k},t} \hspace{2ex} \text{and} \hspace{2ex} \varepsilon_{f_{k},t} = \phi_{f_{k},1}\varepsilon_{f_{k},t-1} + \phi_{f_{k},2}\varepsilon_{f_{k},t-2}+\dotso+\phi_{f_{k},q}\varepsilon_{f_{k},t-q} + u_{f_{k},t}\]

  1. Take starting values as given
  2. Sample parameters conditional on factors
  3. Sample world factor conditional on parameters and other factors
  4. Sample region factor conditional on parameters and other factors
  5. Sample country factor conditional on parameters and other factors
  6. Iterate steps 1-5 for a specified number of draws

My Code process

I’m working on coding the following model with just a single “world” factor

\[y_{t} = β\cdot F_{t} + γ_{t} \] \[γ_{t} = ψ(L)\cdot γ_{t-1} + u_{t}\] \[ F_{t} = ϕ(L)\cdot F_{t-1} + v_{t}\] where:

\[u_{t} ∼ N(0,Ω) \hspace{2ex} \text{and} \hspace{2ex} v_{t} ∼ N(0,I)\]

This model, and code are based on “Specification and Estimation of Bayesian Dynamic Factor Models: A Monte Carlo Analysis with an Application to Global House Price Comovement” (2015) by Jackson et al.

My Code Process (2)

In my code, I begin by generating data based on my model using the following steps:

  1. Define key model attributes (length of time series, number of factors, number of lags)
  2. Generate \(\phi\) values
  3. Set \(\Omega\)
  4. Generate \(\psi\) values
  5. Generate factor loadings
  6. Generate \(v_{t}\) and then our factors
  7. Calculate \(u_{t}\) and \(\gamma_{t}\)
  8. Then calculate \(y_{t}\)
  9. Check to make sure none of the series’ contain unit roots, if they do reject the draw and repeat steps 1-8

My Code Process (3)

Now that I have a dataset that contains my true factors and factor loadings I can try to back out these values

Implementing the Otrok-Whiteman Approach

I set priors for:

  1. The mean and precision for my factor loadings
  2. The mean and precision for my factor
  3. The mean and precision for \(\phi\)
  4. And various other parameters

I then demean my dataset and run a Monte-Carlo loop to find the parameters of my model

  1. I set inital values for some parameters, including my factor
  2. I use an function called AR to find: \(\beta\) and \(\sigma_{u}\)
  3. I use a different function called AR Fac. to find: \(\phi\)
  4. I then draw my factor
  5. I repeat 1-4 for a number of burn in draws, and then for some additional draws

This process doesn’t take very long, but depends on a lot of code

Road Map to My Code

(My Code)

(My Code)

Accuracy of These Methods

The Jackson et al. paper implements a Monte Carlo analysis to compare the principal components approach, the Bayesian statespace approach, and the Bayesian Gibbs sampling approach

One Factor Setting

In the one factor case all of the methods do fairly well

Two Factor Setting

Accuracy of These Methods (2)

Three Factor Setting

References and Interesting Papers

References for this presentation

Other Papers