Hi,

1.) I am trying to calculate the autocorrelation function for returns based
on rolling window, but it doesn't work.

My code is

rollapply(Returns,20,acf).

2.) My next try is

 rollapply(Returns_2,20,cor)
Error in FUN(cdata[st, i], ...) :  supply both 'x' and 'y' or a matrix-like
'x'

Thank you in advance!

-- 
Best regards,

Andy

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to