rKernelCov: Realized Covariance: Kernel

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/realized.R

Description

Realized covariance calculation using a kernel estimator.

Usage

1
2
3
4
5
 
rKernelCov(rdata, cor = FALSE, kernel.type = "rectangular", kernel.param = 1, 
            kernel.dofadj = TRUE, align.by = "seconds", align.period = 1, 
            cts = TRUE, makeReturns = FALSE, type = NULL, adj = NULL, 
            q = NULL, ...) 

Arguments

rdata

In the multivariate case: a list. Each list-item i contains an xts object with the intraday data of stock i for day t. In the univariate case: an xts object containing the (tick) data for one day.

cor

boolean, in case it is TRUE, the correlation is returned. FALSE by default.

kernel.type

Kernel name (or number)

kernel.param

Kernel parameter (usually lags)

kernel.dofadj

Kernel Degree of freedom adjustment

align.by

Align the tick data to seconds|minutes|hours

align.period

Align the tick data to this many [seconds|minutes|hours]

cts

Calendar Time Sampling is used

makeReturns

Convert to Returns

type

Deprecated, use kernel.type

adj

Deprecated, use kernel.dofadj

q

Deprecated, use kernel.param

...

...

Details

The different types of kernels can be found using rKernel.available.

Value

Kernel estimate of realized covariance.

Author(s)

Scott Payseur <scott.payseur@gmail.com>

References

Ole E. Barndorff-Nielsen, Peter Reinhard Hansen, Asger Lunde, and Neil Shephard. Regular and modified kernel-based estimators of integrated variance: The case with independent noise. Working Paper, 2004.

B. Zhou. High-frequency data and volatility in foreign-exchange rates. Journal of Buiness & Economic Statistics, 14:45-52, 1996.

P. Hansen and A. Lunde. Realized variance and market microstructure noise. Journal of Business and Economic Statistics, 24:127-218, 2006.

See Also

rKernel.available

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 
 # Average Realized Kernel Variance/Covariance for CTS aligned at one minute returns at 
 # 5 subgrids (5 minutes).
 data(sample_tdata); 
 data(lltc.xts); 
 data(sbux.xts); 
 
 # Univariate: 
 rvKernel = rKernelCov( rdata = sample_tdata$PRICE, period = 5, align.by ="minutes", 
                   align.period=5, makeReturns=TRUE); 
 rvKernel 
 
 # Multivariate:
 rcKernel = rKernelCov( rdata = list(lltc.xts,sbux.xts), period = 5, align.by ="minutes", 
                   align.period=5, makeReturns=FALSE); 
 rcKernel 

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