rMarginal: Maginal Contribution to Realized Estimate

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

View source: R/realized.R

Description

Plots the marginal contribution to the realized estimate.

Usage

1
2
rMarginal(x, y = NULL, period,align.by="seconds", align.period = 1, 
  plotit = FALSE, cts = TRUE,makeReturns = FALSE)

Arguments

x

RealizedObject or TimeSeries for S+

y

RealizedObject or TimeSeries for S+

period

Sampling period

align.by

Align the tick data to seconds|minutes|hours

align.period

Align the returns to this period first

plotit

T for plot

cts

Create calendar time sampling if a non realizedObject is passed

makeReturns

Prices are passed make them into log returns

Details

Plots the marginal contribution to the realized estimate. This is a good tool to determine what obersations are adding (possibly subtracting for covariance) to the estimate.

Value

Marginal contribution vector if plotit = F

Author(s)

Scott Payseur <scott.payseur@gmail.com

References

S. W. Payseur. A One Day Comparison of Realized Variance and Covariance Estimators. Working Paper: University of Washington, 2007

See Also

rAccumulation

Examples

1
2
3
4
5
6
7
data(sbux.xts)
par(mfrow=c(2,1))
plot(rCumSum(sbux.xts, period=10, align.by="seconds", align.period=60), 
   xlab="", ylab="Cumulative Ruturns", main="Starbucks (SBUX)",
    sub='20110701', type="p")
barplot(rMarginal(sbux.xts, period=10, align.by="seconds", align.period=60)$y,
    main="Marginal Contribution Plot") 

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