I am trying to perform the Toda - Yamamoto procedure of Granger Causality testing with Python statsmodels between two series: stock price and interest rate. The procedure is clearly explained here: https://davegiles.blogspot.com/2011/04/testing-for-granger-causality.html The problem is that I can't find the way to get a different lag length for the exogenous variables in Statmodels Var. Any helps would be greatly appreciated!
1 Answers
AFAIK, statsmodels VAR does not allow for arbitrary wald tests. VAR is implemented mostly in a model specific way, and only partially follows the statsmodels standard pattern.
VARMAX is a statespace model that allows for VARX as special case and has the usual results methods and should allow for user specified wald tests.
specifically to granger causality in (co)integrated systems:
statsmodels has since 0.9 also a VECM model (for variables integrated of order 1) that includes a granger causality test. AFAICS, it uses one additional lag in the auxiliary VAR for the Wald test and has unit tests against Luetkepohl's JMulti.
The usual caution: Because VECM is a very recent addition to statsmodels, there might still be problems in parts that have not seen much use yet, in spite of relatively good unit test coverage against JMulti.

- 21,998
- 3
- 54
- 67
-
Thank you so much! I am totally new with the statsmodels parameters so can you please specify how to get the VARX special case with VARMAX? And also how to specify the lag interval of exog in Wald test? – Van Vi Sep 06 '18 at 06:35