# Average subsampled realized variance/covariance aligned at one minute returns at
# 5 sub-grids (5 minutes).
# Univariate subsampled realized variance
rvAvgSub <- rAVGCov(rData = sampleTData[, list(DT, PRICE)], alignBy = "minutes",
makeReturns = TRUE)
rvAvgSub
# Multivariate subsampled realized variance
rvAvgCovSub <- rAVGCov(rData = sampleOneMinuteData[1:391], makeReturns = TRUE)
rvAvgCovSub
Run the code above in your browser using DataLab