Description Usage Arguments Value Examples
Calculates the Standard deviation of returns time series.
1 | sd_calc(rets, ann_factor = 1)
|
rets |
a numerical vector with returns time series. |
ann_factor |
a double, the annualization factor. If ann_factor=1 (default), no annualization is performed. For monthly returns, set ann_factor=12. For daily returns, set ann_factor=252, etc. |
an index vector of the position of NAs.
1 2 | data(sp500_rets)
sds <- apply(sp500_rets[,-1], 2, sd_calc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.