I need to run the crop function in the xts data, which contains about 7000 rows and 11,000 columns. I have done the following:
require(PerformanceAnalytics)
ssd60<-rollapply(wddxts,width=60,FUN=function(x) SemiDeviation(x),by.column=TRUE)
I waited until 12 hours, but the calculation did not end. However, when I tried with a small data set as follows:
sample<-wddxts[,1:5]
ssd60<-rollapply(sample,width=60,FUN=function(x) SemiDeviation(x),by.column=TRUE)
the calculation was carried out for 60 seconds. I ran them on a computer with an Intel i5-2450M processor, Windows 7 operating system and 12 GB of RAM.
Can someone suggest me if there is any faster way to do the above calculation on a large xts dataset?
source
share