Variables that predict each other
A vector autoregression, VAR, models several series together. Each variable is regressed on the past values of all the variables, so for two series and and one lag, with and a matrix . Every equation is fitted by ordinary least squares, and in statsmodels VAR(data).fit(p) does all of them at once. The model is stable when every eigenvalue of lies inside the unit circle, which means shocks fade out instead of exploding. Forecasts follow by repeated multiplication. To choose the lag order you compare information criteria such as AIC and BIC, which reward fit and penalise extra coefficients.
Granger causality asks a narrow question: do past values of help predict once the past values of itself are known? You fit the equation for twice, once with the lags of (unrestricted, residual sum of squares ) and once without them (restricted, ), and compare with an F-statistic. A significant result says leads in time. It does not prove that causes : a third variable, or investors who anticipate, can produce the same pattern.
On real monthly data, months from March 2005, take the SPY return in percent and the 10-year minus 2-year Treasury spread. AIC picks lags and BIC picks , and a VAR(2) is stable, with the closest root at because the spread is very persistent (its own lags add to ). The Granger test of whether the spread helps predict returns gives (), and whether returns help predict the spread gives (). Neither direction is significant: knowing the yield-curve slope adds nothing to a monthly forecast of SPY.
Lab · what's graded
- One step ahead10 pts
- Two steps ahead15 pts
- The largest eigenvalue15 pts
- A Granger F-statistic15 pts
- Counting coefficients15 pts
- Reading a Granger test10 pts
- Prediction is not causation20 pts