1 / 54

MSc Time Series Econometrics

MSc Time Series Econometrics. Module 2 Lecture 1: VARs, introduction, motivation, estimation, preliminaries Tony Yates Spring 2014, Bristol. Me. New to academia. 20 years in Bank of England, directorate responsible for monetary policy.

buzz
Download Presentation

MSc Time Series Econometrics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MSc Time Series Econometrics Module 2 Lecture 1: VARs, introduction, motivation, estimation, preliminaries Tony Yates Spring 2014, Bristol

  2. Me • New to academia. • 20 years in Bank of England, directorate responsible for monetary policy. • Various jobs on Inflation Report, Inflation Forecast, latterly as senior advisor, leading ‘monetary strategy team’ • Research interests: VARs, TVP-VARs, monetary policy design, learning, DSGE, heterogeneous agents. • Also teaching MSc time series on VARs.

  3. Follow my outputs if you are interested • My research homepage • Blog ‘longandvariable’ on macro and public policy • Twitter feed @tonyyates

  4. Topics we will cover • Vector autoregressions: • motivation • Estimation, MLE, OLS, Bayesian using analytical and Gibbs Sampling MCMC methods • Identification[short run restrictions, long run restrictions, sign restrictions, max share criteria] • interpretation, use, contribution to macroeconomics • Factor models in vector autoregressions • TVP VAR estimation using kernels. • If we have time, for fun: The Kalman Filter, Bootstrapping

  5. Course/learning strategy • Rudimentary algebra of VARs, estimation, identification, etc. • Some examples of code to i) give an insight into what might lie in store if you continue ii) can sometimes help to demystify the algebra. • Applications: their contribution, impact. • In the exam, you will be expected to understand and reproduce the algebra, and to cite and comment on the applications. • You won’t be expected to write code.

  6. VARs useful sources • Chris Sims, 'Macroeonomics and reality‘ • Lutz Kilian 'Structural Vector Autoregressions‘ • Fabio Canova: Methods for Applied Business Cycle research • James Hamilton 'Time Series Analysis‘ • Helmut Luktepohl 'New introduction to multiple time series analysis'

  7. Useful sources, ctd • Stock and Watson: implications of dynamic factor models for VAR analysis • Stock and Watson: 'Dynamic factor models'

  8. Matrix/linear algebra pre-requisites • Scalar, vector, matrix. • Transpose • Inverse (matrix equivalent of dividing). • Diagonal matrix. • Eigenvalues and eigenvectors. • Powers of a matrix. • Matrix series sums. Matrix equivalent of geometric scalar sums. • Variance-covariance matrix. • Cholesky factor of a variance-covariance matrix. • Givens matrix.

  9. Some applications • Christiano, Eichenbaum, Evans: ‘Monetary policy shocks: what have we learned and to what end?’ • Christiano, Eichenbaum and Evans (2005): ‘Nominal rigidities and the dynamics effects of a monetary policy shock’ • Mountford, Uhlig (2008): ‘what are the effects of fiscal policy shocks?’ • Gali (1999): ’Technology, employment and the business cycle….’

  10. VAR motivation: Cowles Commission models • Dominant paradigm was large scale macroeconometric models, in policy institutions especially • Many estimated equations. • Academic origins in foundational work to create national accounts; Keynesian formulation of macroeconomics; Haavelmo’s notion of ‘probability model’ applied to this. • Nice discussion in Sims’ Nobel acceptance lecture.

  11. Silly example of a CC model Sims: Equation for C excludes U, TU Equation for Y excludes C, U And so on.... Those u’s look exogenous and are meant to be, but are they really primitive shocks? Both Sims’ and Lucas’ critiques would suggest not Lucas: equation for C sounds like common sense, but is it the C that reflects the solution to a consumers’ problem in a general equilibrium model? Maybe, or maybe not

  12. Critiques of Cowles Commission approach • Lucas (1976): • Laws of motion have to come from solving problems of agents in the model • If not, correlations will change if policy changes • Sims (1981): • ‘Incredible’ identification restrictions

  13. Response to Sims and Lucas critiques • No incredible restrictions. Everything left in. • Reduced form shocks span the structural shocks. • Structural shocks and their effects sought through identification, reference to classes of Lucas-Critique proof models • ‘Modest policy interventions’ [Sims and Zha].

  14. Cowles Commission variables set out as a VAR model Simultaneity encoded in the reduced form errors. To be disentangled into structural shocks through identification. Potentially, everything is a function of everything else lagged

  15. VAR topics and contributions to macro (1) • Estimating parameters in a DSGE model: • Rotemburg and Woodford (1998) • Christiano, Eichenbaum and Evans (2005) • Identify monetary policy ‘shock’ • Choose parameters of the model so that impulse response to this shock in the DSGE model as close as possible to corresponding IRF in the VAR.

  16. VAR topics and contributions to macro (2) • Evaluating the RBC claim that technology shocks cause business cycles • Gali (1999) • Identified technology shocks as the only thing that could change N/Y in long run • Showed that these caused hours work to fall, not rise • Inconsistent with RBC model (‘make hay while the sun shines’)

  17. VAR topics and contributions to macro (3) • Cogley and Sargent (2005) • VAR with time-varying parameters • Multivariate counterpart to persistence, ‘predictability’ • Bayesian estimation • By how much did inflation predictability change in the post-war period? • If it changed a lot, what does that suggest about its causes?

  18. Misc technical preliminaries to help you read the papers • The lag polynomial operator ‘L’ Lag / lead operator denoted by positive, negative powers of L

  19. Misc technical preliminaries... • Cholesky decomposition Sigma is a v-cov matrix, with elements symmetric about the diagonal; Cholesky factor on the RHS Here we decompose further using an orthonormal matrix P Diagonals of vcov matrix are positive beause these correspond to variances…

  20. Misc technical preliminaries • Givens matrix is an example of an orthonormal matrix Also known as a Givens ‘rotation’ Useful theorem: any orthonormal matrix can be shown to be a product of Givens matrices with different thetas, the number depending on the dimension of the orthonormal matrix concerned.

  21. Products of orthonormal matrices If two matrices are orthonormal, then so is the product of those matrices.

  22. The VAR impulse response function Impulse response function in a univariate time series model Take some unit value for e1, then substitute into eq for y repeatedly

  23. AR(1) impulse response function Y_t=0.85*y_t-1+e_t; e(1)=1 IRF shrinks back to zero as we multiply 1 by successively higher powers of 0.85

  24. Matlab code to plot IRF in an AR(1)

  25. Matlab code to plot an AR(1) impulse response • %compute impulse response in an AR(1). • %illustration for MSc Time Series Econometrics module. • %y_t=rho*y_t-1+e_t. • %calibrate parameters • rho=0.85; %persistence parameter in the ar(1) • samp=100; %length of time we will compute y for. • y=zeros(samp,1); %create a vector to store our ys. • %semi colons suppress output of every command • %to screen. • e=1; %value of the shock in period 1. • y(1)=e; %first period, y=shock. • for t=2:samp • y(t)=rho*y(t-1); %loop to project forwards effect of the unit shock. • end • %now plot the impulse response • time=[1:samp]; %create a vector of numbers to record the progression of time • plot(time,y)

  26. VAR impulse response A multivariate example. For IRF to e1, choose e=[1,0] for first period, then project forwards....

  27. Matlab code to plot VAR(1) impulse response function • %compute impulse response in an VAR(1). • %illustration for MSc Time Series Econometrics module. • %y_t=A*y_t-1+e_t. • clear all; %bit of housekeeping to clear all variables so each time you run program as you are debugging • %you know you are not adding onto previous • %values • %calibrate parameters • A=[0.6 0.2; • 0.2 0.6]; • samp=100; %length of time we will compute y for. • y=zeros(samp,2); %create a matrix this time to store our 2 by samp bivariate time series y={y1,y2}. • e=[1;0]; %we will simulate a shock to the first equation. Note shock in first period is now a 2 by 1 vector. • y(1,:)=e; %first period, y=shock. the colon ':' means 'corresponding values in this dimension' • for t=2:samp • y(t,:)=A*y(t-1,:)'; %loop to project forwards effect of the unit shock. • end %' is transpose • %now plot the impulse response • time=[1:samp]; %create a vector of numbers to record the progression of time • subplot(2,1,1) • plot(time,y(:,1)) • subplot(2,1,2) • plot(time,y(:,2))

  28. VAR(1) impulse response Y_t=A*Y_t-1’+e_t, e_t=[1 0], A=[0.6 0.2;0.2 0.6] Note that the eigenvalues of A are 0.4 and 0.8

  29. Using a VAR to forecast Forecast at future horizon h, conditional on starting from steady state= IRF to the latest estimated shock. Forecast conditional on all the shocks estimated to have occurred: Sum of IRF to that shock at increasing horizons. Terms further to the right get smaller as higher powers of h [=smaller for stable VAR] Reflects response to shocks that hit further and further back in time. Forecasts further and further out shrink back to steady state for the same reason. Higher powers of h , A has eigenvalues <1 in absolute value.

  30. VAR(1) representation of a VAR(p)

  31. Moving average representation of a VAR(p) We have used the VAR(1) form of the VAR(p). In words, it means Y is the sum of shocks, where each shock taken to higher and higher powers as we go back in time. Notice how this is related to the formula for the VAR impulse response we computed before.

  32. Persistence, memory, predictability, stability • When a shock hits, how long does it takes for its effects to die out? • Applications: • Business cycle theory concerned with mechanisms for propagation. Consumption and output not white noise: why? • Bad monetary and fiscal policy could be part of the story about why shocks take time to die out • Time series notions of persistence etc are one way to characterise propagation and bad policy. • Why ‘bad’, because more persistence means larger variance, and larger variance for most utility functions is bad

  33. Persistence and variance Persistence, higher rho, means lower denominator, means higher unconditional variance of y Most economic models asssume agents don’t like variance So persistence is interesting economically, since it usually indicates something ‘bad’ is happening

  34. Persistence and predictability Multivariate predictability: if set horizon=2, dimension of Y_t=1, then this formula delivers rho^2, ie persistence squared.

  35. AR ‘stability’ Univariate model. Effects of shock eventually die out. So series converges to something. Stability=stationarity=series have convergent sums=first and second moments independent of t, and computable

  36. The contribution of a shock very far back goes to zero Here we take the perspective that today’s data is the sum of the effects of shocks going back into the infinite past. Since today’s data is finite and well-defined, then it must be that shocks infinitely far back have no effect. Otherwise today’s data would be infinitely large.

  37. VAR(1) stability Stability condition echoes the AR case, but where does the dependence on the eigenvalues come from? Here we write out a vector Y as the sum of contributions from shocks going back further and further into time.

  38. Explaining VAR(1) eigenvalue stability condition The crucial thing is to make this A^n go to zero as n goes to infinity. Importance of eigenvalues in this happening comes from the fact that we can write a square matrix using the eigenvalue-eigenvector decomposition. And then compute the power of A using the powers of the eigenvales of A. So to make A^n go to zero, we have to make all the diagonal elements of D go to zero, and by analogy with the AR(1) case, this means the eigenvalues have to be < 1 in absolute value.

  39. VAR(p) stability

  40. VAR estimation • Linear, multivariate model • Suggests estimation by... • OLS! • Or MLE, which in these circumstances [linear; Gaussian errors] is equivalent. • MLE cumbersome because you may have many parameters over which to optimise • Why is this cumbersome? Well, you tell me.

  41. OLS estimation of VAR parameters Univariate case Multivariate case for VAR(1) representation of VAR(p)

  42. OLS estimate of reduced form residual variance covariance matrix Univariate case. Take data, subtract prediction, multiply residual vector by transpose.... Analogously for the multivariate case

  43. The likelihood function for a VAR • Why bother if we can use OLS? Given the drawbacks of MLE? • Log posterior is sum of log likelihood and log prior: so we need it for Bayesian estimation • Key to understanding many concepts: • Origin and derivation of standard errors from slope of LF • Estimation when we can’t evaluate the LF but have to approximate it by simulation • Pseudo-ML when the data are non-Gaussian

  44. Likelihood fn for an AR(1)

  45. LF for an AR(1)/ctd... Logging turns complicated product into long sum We can maximise this and ignore constants.

  46. Likelihood for a VAR(p)

  47. Recap • Remember likelihood assumes Gaussian errors • In some circumstances you can get consistent estimates of parameters (but not standard errors) even if this is violated.

  48. Distributions for a VARs impulse response functions IRF is easy in an AR1. It involves powers of only 1 coefficient. So distributions of rho can be used to compute distributions of the elements of the IRFs vector. Work it out. Things harder with a VAR as involves many, jointly distributed coefficients.

  49. Bootstrapping algorithm for VAR IRFs Suppose have estimated a VAR(p) Set iter=200 or so. Algorithm will generate iter vectors h long, h=max chosen horizon of the IRF. Q: how to do step 1 with computer random number generator?

More Related