Description Usage Arguments Details Author(s) See Also Examples
This function calculates the volatility of asset returns using a simplified equation.
1 |
R |
xts or zoo object of asset returns |
This function is different from sd
in two ways.
simpleVolatility
uses a denominator of n
.
simpleVolatility
assumes the mean to be zero.
The simple volatility of x is defined as
σ = √{\frac{1}{n} ∑_{i=1}^n x_i^2}
Ross Bennett
1 2 3 4 | data(crsp_weekly)
R <- largecap_weekly[,1:4]
simpleVolatility(R[,1])
simpleVolatility(R)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.