RsV: Realized semivariance of highfrequency return series.

Description Usage Arguments Value Author(s) References Examples

Description

Function returns Realized semivariance, defined in Barndorff-Nielsen et al. (2008).

Function returns two outcomes: 1.Downside realized semivariance and 2.Upside realized semivariance.

Assume there is N equispaced returns in period t. Let r_{t,i} be a return (with i=1, …,N) in period t.

Then, the rSV is given by

\mbox{rSVdownside}_{t}= ∑_{i=1}^{N} (r_{t,i})^2 \ \times \ I [ r_{t,i} <0 ]

\mbox{rSVupside}_{t}= ∑_{i=1}^{N} (r_{t,i})^2 \ \times \ I [ r_{t,i} >0 ]

Usage

1
rSV (rdata,align.by=NULL,align.period=NULL,makeReturns=FALSE,...)

Arguments

rdata

a zoo/xts object containing all returns in period t for one asset.

align.by

a string, align the tick data to "seconds"|"minutes"|"hours"

align.period

an integer, align the tick data to this many [seconds|minutes|hours].

makeReturns

boolean, should be TRUE when rdata contains prices instead of returns. FALSE by default.

...

additional arguments.

Value

list

Author(s)

Giang Nguyen, Jonathan Cornelissen and Kris Boudt

References

Barndorff- Nielsen, O.E., Kinnebrock, S. and Shephard N. (2008). Measuring downside risk- realized semivariance. CREATES research paper. p. 3-5

Examples

1
2
data(sample_tdata)
rSV(sample_tdata$PRICE,align.by ="minutes", align.period =5, makeReturns = TRUE)

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

$rSVdownside
[1] 0.0002912575

$rSVupside
[1] 0.0001631098

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