variance_rv: Realized Variance

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

View source: R/metrics.R

Description

Realized Variance (RV) is the sum of squared returns. For instance the RV can be the sum of squared daily returns for a particular month, which would yield a measure of price variation over this month. This variance estimator does not account for market microstructure effects.

Usage

1
2
variance_rv(estimator)
variance_rvRolling(estimator,wLength=23400)

Arguments

estimator

Vector of (time, price) observations for market asset when external market data is used.

wLength

Length of a rolling window for rolling estimators. Default window length is 23400 (number of seconds in a trading day)

Details

- Convergence speed: m^{1/2} (m - number of observation)

- Accounts for additive noise: no

- Accounts for finite price jumps: no

- Accounts for time dependence in noise: no

- Accounts for endogenous effects in noise: no

Value

A vector of integrated variance estimates

Author(s)

Kostin Andrey <andrey.kostin@portfolioeffect.com>

References

T. G. Andersen, T. Bollerslev, F. X. Diebold, and P. Labys. "The distribution of realized exchange rate volatility". Journal of American Statistical Association, 96(453):4255, March 2001. Barndorff-Nielsen, O. E. and N. Shephard (2002). Econometric analysis of realized volatility and its use in estimating stochastic volatility models. Journal of the Royal Statistical Society: Series B 64 (2), 253-280.

See Also

variance_jrmrv variance_tsrv variance_msrv variance_mrv variance_uzrv variance_krv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 
## Not run: 
data(spy.data) 
estimator=estimator_create(priceData=spy.data)
estimator_settings(estimator,
				   inputSamplingInterval = '10s',
				   resultsSamplingInterval = '10s')
util_plot2d(variance_rv(estimator),title='RV',legend='Simple')+
util_line2d(variance_rvRolling(estimator,wLength=3600),legend='Rolling Window')

## End(Not run)

PortfolioEffectEstim documentation built on May 2, 2019, 8:50 a.m.