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

Charles Ward cwrward at gmail.com
Thu Jan 22 10:15:55 CET 2009


Google "Granger Causality"
or use Wikipedia and you will find a reference to testing for Granger
Causality using R

CW

On Thu, Jan 22, 2009 at 4:38 AM, Matthieu Stigler
<matthieu.stigler at gmail.com> wrote:
> 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
>
> _______________________________________________
> 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.
>



More information about the R-SIG-Finance mailing list