get_port_vals {metafolio} | R Documentation |
Takes a list created by meta_sim
and returns
the mean and variance (or risk metric) values. This
function is used by other internal functions, but can also
be used as its own low-level function.
get_port_vals(x, risk_fn = var, burn = 1:30)
x |
A list object as returned from
|
burn |
Number of years to throw out as burn in |
risk_fn |
Type of variance or risk metric. By default takes the variance. Instead you can supply any function that takes a numeric vector and returns some single numeric value. E.g. CVaR. |
A data frame with columns for the mean (m) and variance (v).
get_conserv_plans_mv
,
plot_cons_plans
arma_env_params <- list(mean_value = 16, ar = 0.1, sigma_env = 2, ma = 0) base1 <- meta_sim(n_pop = 10, env_params = arma_env_params, env_type = "arma", assess_freq = 5) get_port_vals(base1)