Description Usage Arguments Details Value See Also Examples
This function just calculates the portfolio volatility given a set of asset
returns, R
, a weight vector, w
, and a covariance matrix,
sigma
. A scale
value can be supplied which is the annualization
factor for the returns if annualized volatility is desired. The default is
1 (ie. no annualization). Supply 12 for monthly data, 252 for daily, and
so on.
1 | portfolioVol(w = NULL, R, sigma, scale = 1)
|
w |
a vector of weights. If not supplied, function will assign equal
weights. Default value is |
R |
an xts or matrix of asset returns. |
sigma |
a covariance matrix for the asset returns. |
scale |
an annualization factor for the returns if desired. Default = 1. |
If no weight vector is supplied, the function will calculate equal weights for the portfolio assets.
a numeric value representing the portfolio volatility.
wtdAvgVol, divRatio
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.