[R-SIG-Finance] how to study the lead and lag relation of two time series?

Matthieu Stigler matthieu.stigler at gmail.com
Thu Jan 22 05:38:26 CET 2009


Michael a écrit :
> Hi all,
>
> Is there a way to study the lead and lag relation of two time series?
>
> Let's say I have two time series, At and Bt. Is there a systematic way
> of concluding whether it's A leading B or B leading A and by how much?
>
> Thanks!
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>   
You can use cross-correlation:
a<-rnorm(100)
 > b<-runif(100)
 > ccf<-ccf(a,b)
plot(ccf)
ccf$acf

Or use some VAR from package vars.

Bests Mat



More information about the R-SIG-Finance mailing list