Rdocumentation
powered by
Learn R Programming
IKTrading (version 1.0)
OHV: Varadi's Offsetting HV
Description
computes a ratio of an n1-day volatility to an n1-lagged n2-day volatility.
Usage
OHV(x, n1 = 3, n2 = 10, sample = TRUE)
Arguments
x
a time series
n1
a lookback period for the first rolling standard deviation and lag for the second standard deviation
n2
a lookback period for the second standard deviation
sample
whether or not to use a sample calculation or population calculation for standard deviation
Value
a volatility ratio
References
https://cssanalytics.wordpress.com/2010/11/18/310-offset-hv-as-a-mean-reversion-filter/