econometría 2: análisis de series de tiempo - … · modelos de series de tiempo var models 1....
TRANSCRIPT
Econometrıa 2: Analisis de series de Tiempo
Karoll [email protected]
http://karollgomez.wordpress.com
Segundo semestre 2016
IX. Vector Time Series Models
Modelos de series de tiempoVARMA Models
A. VAR Models
Modelos de series de tiempoVAR Models
1. Motivation:
I The vector autoregression (VAR) model is one of the mostsuccessful, flexible, and easy to use models for the analysis ofmultivariate time series.
I It is a natural extension of the univariate autoregressive modelto dynamic multivariate time series.
I Has proven to be especially useful for describing the dynamicbehavior of economic and financial time series, and forforecasting.
I It often provides superior forecasts to those from univariatetime series models and elaborate theory-based simultaneousequations models.
Modelos de series de tiempoVAR Models
I Famous papers are Chris Sims’s paper ”Macroeconomics andReality”(ECTA, 1980) and Stock and Watson paper ”VectorAutoregressions”(JEP, 2001).
I Vector autoregressive models are a statistical tool to addressthe following tasks:
I Describe and summarize economic time seriesI Make forecastsI Recover the true structure of the macroeconomy from the dataI Advise macroeconomic policymakers
I In consequence, this analysis is commonly named asMacroeconometrics
I A VAR can help us answering the following questions:
Modelos de series de tiempoVAR Models
Example 1
Problem: You want to study a sales performance for a company.Research Question: Is there a relationship between the amounts afirm spends on advertisement and sales revenue and volume?Goal: 3. To establish the relationship between advertising and salesrevenue and volumeVariables: sales revenue (R), sales volume (S), prices (P), salesforce (F ) and advertising expenditure (E ).
Modelos de series de tiempoVAR Models
Example 2
Consider three variables: real GDP growth (∆Y ), inflation (π) andthe policy rate (r)
I A VAR can help us answering the following questions:
1. What is the dynamic behavior of these variables? How dothese variables interact?
2. What is the profile of GDP conditional on a specific futurepath for the policy rate?
3. What is the effect of a monetary policy shock on GDP andinflation?
4. What has been the contribution of monetary policy shocks tothe behavior of GDP over time?
Modelos de series de tiempoVAR Models
1.A) What is a Vector Autoregression (VAR)?
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
1.B) The general form of the stationary structural VAR(p) model
Modelos de series de tiempoVAR Models
2. Structural and Reduce form of a VAR
I The VAR has a very important role as a statistical model thatunderlies identified structural econometric models(endogenous system).
I However, we can write the model in a reduced form, iestationary reduced VAR
Modelos de series de tiempoVAR Models
The structural innovations:
Modelos de series de tiempoVAR Models
What is a variance-covariance matrix? (Reminder)
Modelos de series de tiempoVAR Models
Why is it called structural VAR?
Modelos de series de tiempoVAR Models
Why is it called stationary VAR?
Modelos de series de tiempoVAR Models
ExampleStructural VARs potentially answers many interesting questions
Modelos de series de tiempoVAR Models
However... the estimation of structural VARs is problematic
Modelos de series de tiempoVAR Models
How to solve the problem?
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
The reduced-form VAR
Modelos de series de tiempoVAR Models
3. VAR stability (stationarity):
DEFINITION 12: A stable VAR(p) process is stationary andergodic with time invariant means, variances, and autocovariances.
Two ways to check stationarity:
3.1 lag-operator (B) representation3.2. System representation
3.2.1) Using the system of linear equations form3.2.2) Using matrix form
Modelos de series de tiempoVAR Models
3.1 lag-operator (B) representation
Considering a VAR(1) model:
xt = Fxt−1 + εt
xt − Fxt−1 = εt
(I− FB)xt = εt
Φ(B)xt = εt
I VAR(1) is invertible
I For the process to be stationary, the zeros (roots) of thedeterminant equation | I−FB| must be outside the unit circle.
Modelos de series de tiempoVAR Models
I The zeros of | I− FB| are related to the eigenvalues of F
Let be λ = λ1, ..., λm the eigenvalues and H = h1, ...,hm the associatedeigenvectors of F, such that:
FH =HΛ
F =HΛH−1
Thus
| I− FB| = | I−HΛH−1B|= | I−HΛBH−1|= | I− ΛB|=Πm
i=1(1− λiB)
Hence, the zeros of | I− FB| lie outside the unit circle iff all eigenvaluesλi lies inside the unit circle, ie |λi | < 1.
Modelos de series de tiempoVAR Models
3.2. System representation
3.2.1) System of linear equations form:
Consider a bivariate VAR(1) model:
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
3.2.2) The (companion) matrix form
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
In other words, |λi | < 1
Modelos de series de tiempoVAR Models
For the VAR(p) Model
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
where:
Modelos de series de tiempoVAR Models
Nonstationarity VAR models:
I As we already know, in time series analysis is very common toobserve series that exhibit nonstationary behavior
I The way to reduce nonstationary to stationary series is bydifferencing
I A natural extension (of the univariate case) to the VARprocess is:
Φ(B)(I− IB)dZt = εt
Modelos de series de tiempoVAR Models
Remarks for nonstationary VAR models:
I Orders for the differencing for each component series could bethe same or not.
I When the differencing order for each component series couldbe the same and the linear combination of nonstationaryseries is stationary, then they are cointegrated.
Modelos de series de tiempoVAR Models
4. Forecasting
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
5. Impulse-response function (IRFs)
Impulse responses trace out the response of current and futurevalues of each of the variables to a one-unit increase (or to aone-standard deviation increase, when the scale matters) in thecurrent value of one of the VAR errors, assuming that this errorreturns to zero in subsequent periods and that all other errors areequal to zero.
Modelos de series de tiempoVAR Models
Characteristics:
I The implied thought experiment of changing one error whileholding the others constant makes most sense when the errorsare uncorrelated across equations, so impulse responses aretypically calculated for recursive and structural VARs.
Modelos de series de tiempoVAR Models
Example 1: Considering the bivariate VAR
as we already seen, we can write
where
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Characteristics (continued):
I IRFs is based on the VMA(∞) representation of VAR(p)model.
I the VMA representation is an especially useful tool to examinethe interaction between variable in the VAR
Modelos de series de tiempoVAR Models
Considering the model VAR(p):
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
In other words, the matrix Ψs collects the marginal effects of theinnovation in the system on to ε, where:
ψij ,s =∂yi ,t+s
∂εj ,t
holding all other innovations at all other dates constant.
The function that evaluates those derivatives for s > 0 is calledIRFs.
Modelos de series de tiempoVAR Models
Remarks:
I If the correlations are high, it doesn’t make much sense to ask”what if ε1,t has a unit impulse”with no change in ε2,t sinceboth come usually at the same time.
I For impulse response analysis, it is therefore desirable toexpress the VAR in such a way that the shocks becomeorthogonal, (that is, the εi ′s,t are uncorrelated).
I Additionally it is convenient to rescale the shocks so that theyhave a unit variance.
I In consequence, we need to compute the orthogonalization ofcorrelated shocks in the original VAR.
I One generally used method is to use Cholesky decompositionfor matriz Σε.
Modelos de series de tiempoVAR Models
Choleski decomposition:
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Example 2:
We can calculate the IRF’s to a unit shock of ε once we know A−1.
Suppose we are interested in tracing the dynamics to a shock tothe first variable in a two variable VAR:
ε0 = [1, 0, 0]′
Thus
x0 =A−1εt for s = 0
xs =A−1xs−1 for s > 0
To summarize, the impulse response function is a practical way ofrepresenting the behavior over time of x in response to shocks tothe vector ε.
Modelos de series de tiempoVAR Models
Example
Data are on:
P=100xlog(GDP deflator),Y=100xlog(GDP),M=M2,R= Fed Funds Rate,on US quarterly data running from 1960 to 2002.
We estimate a VAR(4).
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Remember that:Impulse responses trace out the response of current and futurevalues of each of the variables to a unit increase in the currentvalue of one of the VAR structural errors, assuming that this errorreturns to zero thereafter.
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
We observe that:
Modelos de series de tiempoVAR Models
6. Forecast error variance decomposition (FEVD)
I Variance decomposition can tell a researcher the percentageof the fluctuation in a time series attributable to othervariables at select time horizons.
I In other words, tell us the proportion of the movements in avariable due to is own shocks vs the shocks to the othervariables
I Thus, the variance decomposition provides information aboutthe relative importance of each random innovation in affectingthe variables in the VAR.
I In addition it can indicate which variables have short-term andlong-term impacts on another variable of interest.
Modelos de series de tiempoVAR Models
Example 3:Given the structural model:.
Φ(B)xt = εt
The VMA representation is given by
xt = Ψ0εt + Ψ1εt−1 + Ψ2εt−2 + ...
and the error in forecasting xt in the future is, for each horizon s:
xt − E [xt+s ] = Ψ0εt+s + Ψ1εt+s−1 + Ψ2εt+s−2 + ...+ Ψs−1εt+1
from which the variance of the forecasting error is:
var(xt − E [xt+s ]) = Ψ0ΣεΨ′0 + Ψ1ΣεΨ
′1 + ...+ Ψs−1ΣεΨ
′s−1
Modelos de series de tiempoVAR Models
Now defining et+s = var(xt − E [xt+s ]), and given that:
1. the shocks are both serially and contemporaneously uncorrelated2. all shock components have unit variance
This implies:
Modelos de series de tiempoVAR Models
Comparing this to the sum of innovation responses, we get arelative measure:
How important variable j ’s innovations are in the explaining thevariation in variable i at different step-ahead forecasts, i.e.,
In other words, we compute the share of the total variance of theforecast error for each variable attributable to the variance of each
structural shock.
Modelos de series de tiempoVAR Models
In summary:
Thus, while impulse response functions traces the effects of ashock to one endogenous variable on to the other variables in the
VAR,
variance decomposition separates the variation in an endogenousvariable into the component shocks to the VAR.
Modelos de series de tiempoVAR Models
Example
FEVD (in %) OF NICARAGUAS INFLATION RATE
Modelos de series de tiempoVAR Models
7. Granger causality
One of the main uses of VAR models is forecasting.
The following intuitive notion of a variable’s forecasting ability isdue to Granger (1969).
I If a variable, or group of variables, y1 is found to be helpful forpredicting another variable, or group of variables,
I y2 then y1 is said to Granger-cause y2;I otherwise it is said to fail to Granger-cause y2 .
I The notion of Granger causality does not imply true causality.It only implies forecasting ability.
Modelos de series de tiempoVAR Models
In other words:
A variable y1 fails to Granger-causes y2 if y2 CAN NOT be betterpredicted using the histories of both y1 and y2, than it can usingthe history of y2 alone.
Modelos de series de tiempoVAR Models
Example: Bivariate VAR model
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
Formally,
Which correspond to an invertible VMA(1) process:
Zt = C + Θ(B)ut :
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVAR Models
In other words, this corresponds to the restrictions that all cross-lagscoefficients are all zeros which can be tested by traditional F test.
For instance, for the following VAR(p) model:
yt =a1yt−1 + a2yt−2 + ..+ apyt−p + b1xt−1 + b2xt−2 + ..+ bpxt−p + εy ,t
xt =c1yt−1 + c2yt−2 + ..+ cpyt−p + d1xt−1 + d2xt−2 + ..+ dpxt−p + εx,t
x does not Granger-cause y
H0 :b1 = b2 = ... = bp = 0
H1 :b1 = b2 = ... = bp 6= 0
y does not Granger-cause x
H0 :c1 = c2 = ... = cp = 0
H1 :c1 = c2 = ... = cp 6= 0
Modelos de series de tiempoVAR Models
Conceptually, the idea has several components:
1. Temporality: Only past values of x can cause y .
2. Exogeneity: Sims (1972) points out that a necessarycondition for x to be exogenous of y is that x fails toGranger-cause y .
3. Independence: Similarly, variables x and y are onlyindependent if both fail to Granger-cause the other.
Modelos de series de tiempoVAR Models
Example: Trivariate VAR model
Modelos de series de tiempoVAR Models
8. Estimation
I Note that if the disturbances in one equation are for exampleautocorrelated, the theory does not apply. Then need IVestimators, including GMM
Modelos de series de tiempoVAR Models
Traditionally, VAR models are designed for stationary variableswithout time trends. So, first we need to be sure vector series mustbe stationary or properly stationarized.
How do we test the VAR assumptions?
Modelos de series de tiempoVAR Models
1. Determination of p (specification testing)
I Information criteria: The general approach is to fit VAR(p)models with orders p = 0, ..., pmax and choose the value of pwhich minimizes some model selection criteria: Schwarz (SC),Hannan-Quin (HQ) and Akaike (AIC).
I Start with a large p and test successively that the coefficientsof the largest lag in the VAR is zero: i.e., a sequence ofF-tests.
I Under-specification of p might result in residuals that areautocorrelated.
I Information criteria and sequence of tests can of course becombined
Modelos de series de tiempoVAR Models
REMARKS:
I AIC criterion asymptotically overestimates the order withpositive probability
I BIC and HQ criteria estimate the order consistently, underfairly general conditions, if the true order p is less than orequal to pmax.
Modelos de series de tiempoVAR Models
2. Testing assumptions about εit (mis-specifiation testing)
I Since each equation is estimated by OLS, we can use atest-battery: autoregresive autocorrelation, ARCH disturbance,White tests of heteroskedasticity, non-normality tests.
I Note the degrees of freedom tend to be very large for thesetests, so even if the size of the test is OK, mis-specificationmay be hidden (due to low power of test).
I Significant departures from the hypothesis of Gaussiandisturbances can often be resolved by:
I Larger pI Increase the dimension of the VAR: more variables in the yt
vector.I Introduce exogenous stochastic explanatory variables: VAR-X
model, conditional or partial model.I Introduce deterministic variables in the VAR.
Modelos de series de tiempoVAR Models
I The economic relevance of the statistically well specified VARis a matter in itself.
I Little help if p is set so large that there are no degrees offreedom left,
I or if VAR-X introduce variables that are difficult to rationalizeor interpret theoretically or historically.
I May then want to estimate simpler model with GMM for eachequation instead.
Modelos de series de tiempoVAR Models
How to build flexibility into the VAR?
Modelos de series de tiempoVAR Models
Modelos de series de tiempoVARMA Models
B. VARMA Models
Modelos de series de tiempoVARMA Models
Considering the following VARMA(p,q) model:
Φ(B)Zt = Θ(B)ut
where
Φ(B) =F1B + F2B2 + ...+ FpB
p
Θ(B) =Θ1B + Θ2B2 + ...+ ΘpB
p