rDivEngine: Realized divergence inference wrapper.

Description Usage Arguments Details Value Functions

Description

A set of functions to calculate realized divergence measures and respective confidence intervals based on semimartingale discretisation theory.

Usage

1
2
3
4
5
6
7
8
rDivEngine(rdata, fooStr, pow, makeReturns, align.by, align.period,
  marketopen = "08:30:00", marketclose = "15:15:00",
  intradaySeasonFun = function(x) 1, ...)

rDivEngineInference(rdata, fooStr, pow, test.size = 0.05, align.by,
  align.period, makeReturns, reference.time, year.days = 365,
  seconds.per.day = 86400, cl = NULL, spot.vol.series = NULL,
  jump.series = NULL, kernel.type = "gaussian", ...)

Arguments

rdata

an xts object containing 1 price or return series.

fooStr

character, name of base function (realized measure) for inference.

pow

numeric vector of length P: functions from the set associated with fooStr will be evaluated with powers pow.

makeReturns

boolean, should be TRUE when price data is supplied. Defaults to FALSE.

align.by

argument to aggregatePrice

align.period

argument to aggregatePrice

intradaySeasonFun

Function. Allows to control for diurnal patterns in volatility whhen calculating estimators with jump truncation. Accepts 1 argument: time in seconds from start of trading day. The default setting returns 1.

...

Arguments passed on to aggregatePrice

reference.time

Time string in format %H:%M:%S, the time relative to which inputs to intradaySeasonFun are calculated.

spot.vol.series

xts object: estimated spot volatility, if you don't like built-in methods; time stamps must correspond to time stamps in rdata upon input if you don't aggegate, otherwise they must yield a reasonable aggregated series.

jump.series

xts object: estimated jump sizes, if you don't like built-in methods; provide jump times and sizes only, a substitute for the rdata series will be created.

Details

The most important arguments to pass go aggregatePrice are marketopen and marketclose, see documentation therein. The default values are different from our test data set.

There following divergence types are available (see Khajavi, Orlowski, Trojani 2015):
fooStr = 'rDiv' – realized power divergence of log returns with p=pow,
fooStr = 'rUDiv' – realized power divergence, scaled by value at outset of period, p=pow,
fooStr = 'rJSkew' – realized skewness divergence of log returns (jump skewness) around power p=pow
fooStr = 'rUSkew' – realized skewness divergence, scaled by value at outset of period, around power p=pow, (similar to signed realized volaility)
fooStr = 'rJKurt' – realized quarticity divergence of log returns (jump kurtosis) around power p=pow
fooStr = 'rUKurt' – realized quarticity divergence, scaled by value at outset of period, around power p=pow, (similar to realized volaility weighted by divergence of return from outset)

Value

rDivEngine returns an xts object of dimension num.days x length(pow)

rDivEngineInference returns a list with fields rDiv and asy.var; the former contains the output of rDivEngine, the latter contains the confidence interval for estimation error, i.e. for \hat{D}-D.

Functions


piotrek-orlowski/diveRgence documentation built on May 25, 2019, 7:14 a.m.