Description Usage Arguments References Examples
Computes portfolio risk.
1 2 3 |
data |
a multivariate time series described by an S4 object of class
|
weights |
a numeric vector of weights. |
alpha |
a numeric value, the confidence level, by default |
Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## data -
Data = SMALLCAP.RET
Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
Data
## weights -
nAssets = getNAssets(portfolioData(Data))
Weights <- rep(1/nAssets, times = nAssets)
## covRisk -
covRisk(Data, Weights)
## varRisk -
varRisk(Data, Weights, alpha = 0.05)
## cvarRisk -
cvarRisk(Data, Weights, alpha = 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.