rHYCov: Hayashi-Yoshida Covariance

Description Usage Arguments Author(s) References Examples

View source: R/realized.R

Description

Hayashi-Yoshida Covariance

Usage

1
2
3
 
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.

...

...

Author(s)

Scott Payseur

References

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

Examples

1
2
3
4
5
6
7
8
9
 # 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.

Example output

Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

xts -> realizedObject [2010-07-01 13:30:00 :: 2010-07-01 20:00:00] 
xts -> realizedObject [2010-07-01 13:30:00 :: 2010-07-01 20:00:00] 
            [,1]         [,2]
[1,] 0.000368847 0.0003723690
[2,] 0.000372369 0.0003759247

highfrequency documentation built on May 2, 2019, 6:09 p.m.