Van Vi
Van Vi

Reputation: 41

Toda-Yamamoto Granger Causality Test in Python

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!

Upvotes: 1

Views: 2027

Answers (1)

Josef
Josef

Reputation: 22897

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.

Upvotes: 1

Related Questions