Multivariate State Space Models: Applications

Similar documents
Univariate Nonstationary Time Series 1

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Fin. Econometrics / 53

Time-Varying Parameters

Dynamic linear models (aka state-space models) 1

Model-based trend-cycle decompositions. with time-varying parameters

Class: Trend-Cycle Decomposition

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Financial Econometrics / 49

CENTRE FOR APPLIED MACROECONOMIC ANALYSIS

A Test for State-Dependent Predictive Ability based on a Markov-Switching Framework

A multivariate innovations state space Beveridge Nelson decomposition

A Comparison of Business Cycle Regime Nowcasting Performance between Real-time and Revised Data. By Arabinda Basistha (West Virginia University)

9) Time series econometrics

Lecture 19 - Decomposing a Time Series into its Trend and Cyclical Components

Trend-Cycle Decompositions

Consider the trend-cycle decomposition of a time series y t

1. Shocks. This version: February 15, Nr. 1

Chapter 3 - Temporal processes

Switching Regime Estimation

The Clark Model with Correlated Components

Permanent Income Hypothesis (PIH) Instructor: Dmytro Hryshko

The Functional Central Limit Theorem and Testing for Time Varying Parameters

July 31, 2009 / Ben Kedem Symposium

5 Transfer function modelling

Technical appendices: Business cycle accounting for the Japanese economy using the parameterized expectations algorithm

FACULTEIT ECONOMIE EN BEDRIJFSKUNDE. TWEEKERKENSTRAAT 2 B-9000 GENT Tel. : 32 - (0) Fax. : 32 - (0)

Time Series Analysis -- An Introduction -- AMS 586

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo

Time Series Solutions HT 2009

Time Series Analysis

State Space Model, Official Statistics, Bayesian Statistics Introduction to Durbin s paper and related topics

Forecasting Based on Common Trends in Mixed Frequency Samples

Estimating and Accounting for the Output Gap with Large Bayesian Vector Autoregressions

A Practical Guide to State Space Modeling

Appendix A: The time series behavior of employment growth

Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles

B y t = γ 0 + Γ 1 y t + ε t B(L) y t = γ 0 + ε t ε t iid (0, D) D is diagonal

Time-Varying Vector Autoregressive Models with Structural Dynamic Factors

On the Correlations of Trend-Cycle Errors

News Shocks: Different Effects in Boom and Recession?

Structural Time Series Models: theory and application

ECON/FIN 250: Forecasting in Finance and Economics: Section 6: Standard Univariate Models

State Space Model for Coincident and Leading Indexes of Economic Activity

Vector autoregressions, VAR

FaMIDAS: A Mixed Frequency Factor Model with MIDAS structure

Introduction to Regression Analysis. Dr. Devlina Chatterjee 11 th August, 2017

Exercises - Time series analysis

Class 4: VAR. Macroeconometrics - Fall October 11, Jacek Suda, Banque de France

X t = a t + r t, (7.1)

11/18/2008. So run regression in first differences to examine association. 18 November November November 2008

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

Financial Time Series Analysis: Part II

Econometría 2: Análisis de series de Tiempo

1. Stochastic Processes and Stationarity

14 - Gaussian Stochastic Processes

Econometrics of Seasonality

News, Noise, and Fluctuations: An Empirical Exploration

Ch 5. Models for Nonstationary Time Series. Time Series Analysis

The Dynamic Relationship between Permanent and Transitory Components of U.S. Business Cycles

Chapter 2: Unit Roots

Housing and the Business Cycle

Functional time series

Periodic Seasonal Time Series Models with applications to U.S. macroeconomic data

Lecture VIII. Income Process: Facts, Estimation, and Discretization

Euro-indicators Working Group

Business Cycle Comovements in Industrial Subsectors

7. Forecasting with ARIMA models

Forecasting the term structure interest rate of government bond yields

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M.

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

Stochastic Trends & Economic Fluctuations

Constructing a Coincident Index of Business Cycles Without Assuming a One-Factor Model

Ch. 19 Models of Nonstationary Time Series

Can News be a Major Source of Aggregate Fluctuations?

1 Linear Difference Equations

Stat 565. Spurious Regression. Charlotte Wickham. stat565.cwick.co.nz. Feb

Network Connectivity and Systematic Risk

THE ROYAL STATISTICAL SOCIETY 2009 EXAMINATIONS SOLUTIONS GRADUATE DIPLOMA MODULAR FORMAT MODULE 3 STOCHASTIC PROCESSES AND TIME SERIES

Real Business Cycle Model (RBC)

Lesson 2: Analysis of time series

Estimating Output Gap, Core Inflation, and the NAIRU for Peru

State Space Model for Coincident and Leading Indexes of Economic Activity

The MIT Press Journals

ECON 4160, Spring term Lecture 12

Empirical Market Microstructure Analysis (EMMA)

Testing an Autoregressive Structure in Binary Time Series Models

Econometrics II Heij et al. Chapter 7.1

10) Time series econometrics

Forecasting Based on Common Trends in Mixed Frequency Samples

Econ 423 Lecture Notes: Additional Topics in Time Series 1

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

Econ 424 Time Series Concepts

New Information Response Functions

Estimating Economic Relationships under Measurement Error: An Application to the Productivity of US Manufacturing

Multivariate GARCH models.

A Primer on Vector Autoregressions

Introduction to Macroeconomics

Covariance Stationary Time Series. Example: Independent White Noise (IWN(0,σ 2 )) Y t = ε t, ε t iid N(0,σ 2 )

Nowcasting the Finnish economy with a large Bayesian vector autoregressive model

Basic concepts and terminology: AR, MA and ARMA processes

Discussion of Bootstrap prediction intervals for linear, nonlinear, and nonparametric autoregressions, by Li Pan and Dimitris Politis

Transcription:

Multivariate State Space Models: Applications Sebastian Fossati University of Alberta

Application I: Clark (1989) Clark (1987) considered the UC-ARMA(2,0) model y t = µ t + C t µ t = d t 1 + µ t 1 + ε t, ε t iid N(0, σε) 2 d t = d t 1 + ω t, ω t iid N(0, σω) 2 C t = φ 1 C t 1 + φ 2 C t 2 + η t, η t iid N(0, ση) 2 where ε t, ω t, and η t are independent white noise processes. Clark (1989) considered a bivariate unobserved components model for real output and unemployment where a single unobservable component is assumed to explain the stationary movement in both real output and unemployment. 2 / 28

Bivariate UC-0 Model The UC-0 model for real output y t = µ t + C t µ t = d + µ t 1 + ε t, ε t iid N(0, σε) 2 C t = φ 1 C t 1 + φ 2 C t 2 + η t, η t iid N(0, ση) 2 The UC-0 model for the unemployment rate u t = α 0 C t + α 1 C t 1 + τ t + ν t, ν t iid N(0, σν) 2 τ t = τ t 1 + ω t, ω t iid N(0, σω) 2 ε t, η t, ν t, and ω t are independent white noise processes. Note that the cyclical component of unemployment, u t, is α 0 C t + α 1 C t 1 (Okun s Law). 3 / 28

Bivariate UC-0 Model in SS Form Define θ t = (µ t, d t, C t, C t 1, τ t ). Then the transition equation is µ t 1 1 0 0 0 µ t 1 ε t d t 0 1 0 0 0 d t 1 0 C t = 0 0 φ 1 φ 2 0 C t 1 + η t C t 1 0 0 1 0 0 C t 2 0 τ t 0 0 0 0 1 τ t 1 ω t That is G = 1 1 0 0 0 0 1 0 0 0 0 0 φ 1 φ 2 0 0 0 1 0 0 0 0 0 0 1, W t = σε 2 0 0 0 0 0 0 0 0 0 0 0 ση 2 0 0 0 0 0 0 0 0 0 0 0 σω 2 4 / 28

Bivariate UC-0 Model in SS Form The measurement is ( ) y t = y t u t = ( with θ t = (µ t, d t, C t, C t 1, τ t ). 1 0 1 0 0 0 0 α 0 α 1 1 ) θ t + ( 0 ν t ) That is F t = ( 1 0 1 0 0 0 0 α 0 α 1 1 ), V t = ( 0 0 0 σν 2 ) 5 / 28

Bivariate UC-0 Model in SS Form > ssm1 <- function(parm){ + parm <- parm_rest(parm) + + F.mat <- matrix(rep(0,10),nr=2) + F.mat[1,c(1,3)] <- F.mat[2,5] <- 1 + F.mat[2,3:4] <- parm[6:7] + V.mat <- diag(c(1e-07,parm[8])) + G.mat <- matrix(rep(0,25),nr=5) + G.mat[1,1:2] <- G.mat[2,2] <- G.mat[4,3] <- G.mat[5,5] <- 1 + G.mat[3,3:4] <- parm[1:2] + W.mat <- diag(c(parm[4],0,parm[3],0,parm[5])) + + m0.mat <- matrix(rep(0,5),nr=5) + C0.mat <- diag(5)*10^7 + + return( dlm(ff=f.mat,v=v.mat,gg=g.mat,w=w.mat, + m0=m0.mat,c0=c0.mat) ) + } 6 / 28

Bivariate UC0 Estimates > # estimate parameters > parm.start <- c(1.53,-.57,-0.8439,-1.0788,-1,-.34,-.16,-3.5065) > fit1 <- dlmmle(y=yy,parm=parm.start,build=ssm1,hessian=t) > mod1 <- ssm1(fit1$par) > > # filter and smooth > mod1f <- dlmfilter(yy,mod1); mod1s <- dlmsmooth(mod1f) > > # get parameter estimates > drift <- mod1f$m[nobs+1,2] > covar <- dlmsvd2var(mod1f$u.c[[nobs+1]],mod1f$d.c[nobs+1,]) > coef.se <- sqrt(covar[2,2]) > drift; coef.se [1] 0.8355899 [1] 0.03875873 7 / 28

Get Filtered Trend and Cycle Estimates Since θ t = (µ t, d t, C t, C t 1, τ t ), the trend and cycle of real output are the first and third elements of the filtered estimates of θ t, respectively. The trend of the unemployment rate is the last element of the filtered estimates of θ t. > # smoothed values > yt.trend <- ts(mod1s$s[-1,1],start=1948,frequency=4) > yt.cycle <- ts(mod1s$s[-1,3],start=1948,frequency=4) > ut.trend <- ts(mod1s$s[-1,5],start=1948,frequency=4) > ut.cycle <- ut - ut.trend 8 / 28

Trend and Cycle Decomposition of Real Output > # yt: plot filtered states (trend and cycle) > plot(yt.cycle,ylim=c(-10,7),xlim=c(1948,2011)) > abline(h=0) > plot(cbind(yt,yt.trend),ylim=c(740,960),xlim=c(1948,2011), + plot.type= s,col=c("black","blue")) Cycle Log Real US GDP and Trend 10 5 0 5 750 800 850 900 950 1950 1970 1990 2010 1950 1970 1990 2010 9 / 28

Trend and Cycle Decomposition of Unemployment > # ut: plot smoothed state (trend and cycle) > plot(ut.cycle,ylim=c(-4,5),xlim=c(1948,2011)) > abline(h=0) > plot(cbind(ut,ut.trend),ylim=c(0,12),xlim=c(1948,2011), + plot.type= s,col=c("black","blue")) 4 2 0 2 4 Cycle 0 2 4 6 8 10 12 Unemployment Rate and Trend 1950 1970 1990 2010 1950 1970 1990 2010 10 / 28

The Correlated UC Model Sinclair (2009) considered a bivariate UC model where the unobserved innovations are allowed to be correlated. The model for real output and the unemployment rate is y t = µ 1t + C 1t µ 1t = d 1 + µ 1t 1 + ε 1t, ε 1t iid N(0, σ 2 ε 1 ) C 1t = φ 11 C 1t 1 + φ 21 C 1t 2 + η 1t, η 1t iid N(0, σ 2 η 1 ) u t = µ 2t + C 2t µ 2t = µ 2t 1 + ε 2t, ε 2t iid N(0, σε 2 2 ) C 2t = φ 12 C 2t 1 + φ 22 C 2t 2 + η 2t, η 2t iid N(0, ση 2 2 ) ε 1t, η 1t, ε 2t, and η 2t, are allowed to be correlated processes. 11 / 28

Application II: Bivariate Random Walk Plus Noise Consider the simple model y 1t = θ t + v 1t, v 1t iid N(0, σv 2 1 ) y 2t = θ t + v 2t, v 2t iid N(0, σv 2 2 ) θ t = θ t 1 + w t, w t iid N(0, σw 2 ) v 1t, v 2t, and w t are independent white noise processes. In this model, the observed variables y 1t and y 2t are the sum of two unobserved components, θ t and v it for i = 1, 2. 12 / 28

Bivariate RW + Noise Model in SS Form The transition equation is θ t = θ t 1 + w t The measurement is ( ) y t = y 1t y 2t = ( 1 1 ) θ t + ( v 1t v 2t ) That is G t = 1, W t = σ 2 w, F t = ( 1 1 ), V t = ( σ 2 v 1 0 0 σ 2 v 2 ) 13 / 28

Simulated Bivariate RW + Noise > # simulate random walk + noise processes > nobs <- 250 > v1t <- sqrt(3)*rnorm(nobs) # var(v) = 3 > v2t <- sqrt(2)*rnorm(nobs) # var(v) = 2 > wt <- sqrt(.5)*rnorm(nobs) # var(w) =.5 > > # simulate time series > xt <- rep(0,nobs) > xt[1] <- wt[1] > for(i in 2:nobs){ xt[i] <- xt[i-1]+wt[i] } > y1t <- as.ts(xt+v1t) > y2t <- as.ts(xt+v2t) > yy <- cbind(y1t,y2t) 14 / 28

Simulated Bivariate RW + Noise 15 10 5 0 5 y1t xt 0 50 100 150 200 250 20 10 5 0 y2t xt 0 50 100 150 200 250 15 / 28

Bivariate RW + Noise Model in SS Form > ssm2 <- function(parm){ + parm <- parm_rest(parm) + + F.mat <- matrix(rep(1,2),nr=2) + V.mat <- diag(c(parm[1],parm[2])) + G.mat <- 1 + W.mat <- parm[3] + + m0.mat <- 0 + C0.mat <- 10^7 + + return( dlm(ff=f.mat,v=v.mat,gg=g.mat,w=w.mat, + m0=m0.mat,c0=c0.mat) ) + } 16 / 28

Bivariate RW + Noise Estimates > # estimate parameters > fit2 <- dlmmle(y=yy,parm=c(0,0,0),build=ssm2,hessian=t) > mod2 <- ssm2(fit2$par) > > # get estimates > coef <- parm_rest(fit2$par) > # get standard errors using delta method > jac <- jacobian(func=parm_rest,x=fit2$par) > var <- jac%*%solve(fit2$hessian)%*%t(jac) > # print results > coef; sqrt(diag(var)) [1] 2.6390636 2.0309149 0.5443563 [1] 0.2763963 0.2282129 0.1318732 > 17 / 28

Filter and Smooth > # filter and smooth > mod2f <- dlmfilter(yy,mod2); mod2s <- dlmsmooth(mod2f) > > # get smoothed estimates and standard errors > # smoothed values > xt.s <- ts(mod2s$s[-1],start=1) > # width of 90% confidence interval > se.s <- dlmsvd2var(mod2s$u.s,mod2s$d.s)[-1] > width <- qnorm(.95)*sqrt(sapply(se.s,diag)) > # put smoothed results together > xt.smoothed <- cbind(xt.s,as.vector(xt.s)+width%o%c(1,-1)) 18 / 28

Estimated RW 15 10 5 0 5 y1t xt.s 0 50 100 150 200 250 20 10 5 0 y2t xt.s 0 50 100 150 200 250 19 / 28

Application III: Dynamic Factor Models Let y t be a T N panel of macroeconomic indicators where y it, i = 1,..., N, t = 1,..., T, has a factor structure of the form y it = λ i (L)g t + e it where g t is an unobserved dynamic factor, λ i (L) = λ i0 + λ i1 L +... + λ is L s, λ ij are the dynamic factor loadings, and e it is the idiosyncratic error. The dynamics of the latent factor and the idiosyncratic errors are driven by autoregressive processes such that φ(l)g t = η t, η t iid N(0, σ 2 g ) ψ i (L)e it = ν it, ν it iid N(0, σ 2 i ) where φ(l) and ψ i (L) are polynomials in L of orders p g and p e, respectively. 20 / 28

A Real Activity Dynamic Factor Stock and Watson (1991) construct an index of business conditions based on a data set of 4 real activity indicators: industrial production, personal income less transfer payments, real manufacturing trade and sales, and employment. See also Aruoba, Diebold, and Scotti (2009) and Fossati (2012). For example, Fossati (2012) considers the model y it = λ i g t + e it g t = φ 1 g t 1 + φ 2 g t 2 + η t, η t iid N(0, σg 2 ) e it = ψ i1 e it 1 + ψ i2 e it 2 + ν it, ν it iid N(0, σi 2 ) Identification is achieved by setting σg 2 = 1. The dynamic factor models are usually estimated with the data transformed to ensure stationarity, and standardized prior to estimation. 21 / 28

Dynamic Factor Model in SS Form Define θ t = (g t, g t 1, e 1t, e 1t 1,..., e 4t, e 4t 1 ). The transition equation is θ t = Gθ t 1 + w t That is G = φ 1 φ 2 0 0... 0 0 1 0 0 0... 0 0 0 0 ψ 11 ψ 12... 0 0 0 0 1 0... 0 0......... 0 0 0 0... ψ 41 ψ 42 0 0 0 0... 1 0, w t = η t 0 v 1t 0. v 4t 0 and W = diag ( 1, 0, σ 2 1, 0,..., 0, σ 2 4, 0 ) 22 / 28

Dynamic Factor Model in SS Form The measurement is y t = y 1t y 2t y 3t y 4t = F θ t with θ t = (g t, g t 1, e 1t, e 1t 1,..., e 4t, e 4t 1 ). That is F = λ 1 0 1 0... 0 0 λ 2 0 0 0... 0 0 λ 3 0 0 0... 0 0 λ 4 0 0 0... 1 0, V t = 0 4 23 / 28

Estimate A Real Activity Factor for the US Economy A sample of the four monthly coincident indicators for 1960:1-2010:12 can be found in the file coinc.txt. The data is already transformed to ensure stationarity (log-differenced). As it is standard, the data is standardized prior to estimation. > # load coincident indicators > data <-read.table("coinc.txt",sep="",header=false) > yt <- ts(data,start=1960,frequency=12) > # load NBER recession dates > data <-read.table("nber_dates.txt",sep="",header=false) > nber <- ts(data$v1,start=1961,frequency=12) > > # standardize data to improve convergence > yy <- scale(yt) 24 / 28

Real Activity Factor Since θ t = (g t, g t 1, e 1t, e 1t 1,..., e 4t, e 4t 1 ), the dynamic factor is the first element of the filtered estimates of θ t. Note that major troughs correspond closely to NBER recession dates. df.f 6 4 2 0 2 4 1960 1970 1980 1990 2000 2010 25 / 28

Factor-Augmented Probit Regression Define a latent variable x t, which represents the state of the economy as measured by the Business Cycle Dating Committee of the NBER, such that x t = α + δĝ t + ɛ t, ɛ t ĝ t iid N(0, 1) We do not observe x t but rather NBER t NBER t = 1(x t 0) where NBER t is 1 if the observation corresponds to a recession and 0 otherwise. This is a standard probit model. The conditional probability of recession is given by p t = P(NBER t = 1 ĝ t ) = P(x t 0 ĝ t ) = Φ(α + δĝ t ) where Φ( ) is the distribution function of the standard normal. 26 / 28

Estimated Recession Probabilities > # plot recession probabilities > plot(probs,ylim=c(0,1),xlim=c(1961,2011)) > nbershade() > lines(probs) > abline(h=0) probs 0.0 0.2 0.4 0.6 0.8 1.0 1960 1970 1980 1990 2000 2010 27 / 28

Evaluation of Recession Probabilities The quadratic probability score (QPS) mat be used to evaluate the predicted recession probabilities. QPS = 1 T T (NBER t ˆp t ) 2 t=1 The QPS can take values from 0 to 1. Smaller QPS values indicate more accurate predictions. > # compute QPS (only interesting for model comparison) > qps <- mean((nber-probs)^2) > qps [1] 0.06457986 > 28 / 28