Learn R Programming

highfrequency (version 0.2)

rHYCov: Hayashi-Yoshida Covariance

Description

Hayashi-Yoshida Covariance

Usage

rHYCov(rdata, cor = FALSE, period = 1, align.by = "seconds", 
       align.period = 1, cts = TRUE, makeReturns = FALSE, makePsd = TRUE, ...)

Arguments

rdata
a list. Each list-item i contains an xts object with the intraday data of stock i for day t.
cor
boolean, in case it is TRUE, the correlation is returned. FALSE by default.
period
Sampling period
align.by
Align the tick data to seconds|minutes|hours
align.period
Align the tick data to this many [seconds|minutes|hours]
cts
Create calendar time sampling if a non realizedObject is passed
makeReturns
Prices are passed make them into log returns
makePsd
boolean, in case it is TRUE, the positive definite version of rTSCov is returned. FALSE by default.
...
...

References

T. Hayashi and N. Yoshida. On covariance estimation of non-synchronously observed diffusion processes. Bernoulli, 11:359-379, 2005.

Examples

Run this code
## Average Realized Kernel Variance/Covariance for CTS aligned at one minute returns at 
 ## 5 subgrids (5 minutes).
# data(lltc.xts); 
# data(sbux.xts); 
 ## Multivariate:
# rHYCov = rHYCov( rdata = list(lltc.xts,sbux.xts), period = 5, align.by ="minutes", 
#                   align.period=5, makeReturns=FALSE); 
# rHYCov 
 ##Note: for the diagonal elements the rCov is used.

Run the code above in your browser using DataLab