View source: R/get_port_vals.R
get_port_vals | 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 |
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. |
burn |
Number of years to throw out as burn in |
A data frame with columns for the mean (m) and variance (v).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.