[R] highfrequency package-jump test
Rui Barradas
ru|pb@rr@d@@ @end|ng |rom @@po@pt
Sat Oct 10 12:55:41 CEST 2020
Hello,
The error is not reproducible, the second code line gives:
data<-xts(x=data$PRICE,order.by=tm)
#Error in data$PRICE : object of type 'closure' is not subsettable
Please post a data example in dput format.
dput(head(data, 30)) # post the output of this or similar
Hope this helps,
Rui Barradas
Às 01:13 de 10/10/20, Zixuan Qi escreveu:
> Hello,
>
> My programming is as follows.
>
> library(highfrequency)
> library(data.table)
> library(xts)
> tm<-seq.POSIXt(from = as.POSIXct("2020-08-20 09:30:00"),to = as.POSIXct("2020-08-20 15:59:00"),by='min')
> data<-xts(x=data$PRICE,order.by=tm)
> data <- as.data.table(data)
> setnames(data,c('index'),c('DT'))
> setnames(data,c('V1'),c('PRICE'))
> LMtest <- intradayJumpTest(pData = data,volEstimator = "RM", driftEstimator = "none",RM = "bipower", lookBackPeriod = 20,on = 'minutes', k = 5, marketOpen = "09:30:00",marketClose = "15:59:00")
> plot(LMtest)
>
> However, the error is that ''Error in xy.coords(x, y, setLab = FALSE) : 'x' and 'y' lengths differ''. I don't know how to correct it.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
More information about the R-help
mailing list