View source: R/asset_stdev_contrib.R
asset_stdev_contrib | R Documentation |
Asset contribution to portfolio standard deviation
asset_stdev_contrib(w, s, C, marginal = FALSE)
w |
matrix |
s |
matrix |
C |
matrix |
marginal |
bool |
vector
w <- matrix(c(.55, .25, .2)) s <- matrix(c(.24, .18, .15)) C <- matrix(c(1, 0.85, 0.3, 0.85, 1, -0.15, 0.3, -0.15, 1), nrow = 3) asset_stdev_contrib(w, s, C) asset_stdev_contrib(w, s, C, marginal = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.