# Is vector-autoregression applicable to two series with Granger causality and cross-correlation that has multiple modes, both negative and positive?

Is the vector-autoregression applicable to two series with Granger causality or stationary series where the cross-correlation plot is negative at some parts and also positive in others?

If that's the case, how do you choose the order of the VAR? Do you look where the absolute value peak/nadir is?

A variable can Granger-cause another one with a positive effect (the two variables are positively correlated) or a negative effect (the two variables are negatively correlated).

What about the mixture of positive and negative in a ccf?

The following CCF has been generated from a very simple bivariate VAR(1) model that implies Granger causality both ways: \begin{aligned} \pmatrix{x_t \\ y_t} &= \pmatrix{a_0 \\ b_0}+\pmatrix{a_{11} & a_{12} \\ b_{11} & b_{12}}\pmatrix{x_{t-1} \\ y_{t-1}}+\pmatrix{u_t \\ v_t} \\ &= \pmatrix{0 \\ 0}+\pmatrix{0.6 & -0.4 \\ 0.4 & -0.6}\pmatrix{x_{t-1} \\ y_{t-1}}+\pmatrix{u_t \\ v_t} \end{aligned}

It has both negative and positive cross correlations. This shows that VAR is capable of generating such patterns. It does not show that every CCF with negative values at some lags and positive in others can be approximated by a VAR model arbitrarily well; I do not know if that is the case. However, I conjecture that in practical applications a VAR model can often be a good enough approximation.

T=1e4
set.seed(1); u=rnorm(T)
set.seed(2); v=rnorm(T)
a0=0; b0=0
a11=0.6; a12=-0.4
b11=0.4; b12=-0.6
x=y=rep(NA,T)
x[1]=0; y[1]=0
for(t in 2:T){
x[t]=a0+a11*x[t-1]+a12*y[t-1]+u[t]
y[t]=b0+b11*x[t-1]+b12*y[t-1]+v[t]
}
#acf(cbind(x,y)) # shows individual ACFs in addition to the CCF
ccf(x,y)