I have 1000 financial time series (closing prices), I am using Toda-Yamamoto test. It is impossible to calculate the causality manually as there are $C_{1000}^{2-1000}$ cases.
Is there a way in which I could calculate the causality mutually?
I have 1000 financial time series (closing prices), I am using Toda-Yamamoto test. It is impossible to calculate the causality manually as there are $C_{1000}^{2-1000}$ cases.
Is there a way in which I could calculate the causality mutually?
If you want to test for Granger causality of each pair, both ways ($x \rightarrow y$ and $y \rightarrow x$), you can do it in a nested loop. Let a pair of series be indexed $(i,j)$. The outer loop would be over $i$ from 1 to 1000; the inner loop would be over $j$ from 1 to 1000; and you would skip cases where $i=j$. That would exhaust all pairs $(i,j)$ and would test the causality both ways.
However, is that what you want? If all the pairs of the 1000 series were actually Granger-causal both ways (as is under the null hypothesis), you would on average reject Granger causality in 5% of the tested cases for a significance level of 5% (or 1% for 1%, or similar). There would be a lot of false positives.