monte_carlo_portfolios {metafolio} | R Documentation |
Monte Carlo the asset weights into portfolios and record the simulation output and portfolio metrics (mean and variance).
monte_carlo_portfolios(weights_matrix, n_sims = 500, mean_b = 1000, burn = 1:30, ...)
weights_matrix |
A matrix of asset weights. The columns correspond to the different assets and the rows correspond to the simulation iterations. |
n_sims |
The number of simulations to run. |
mean_b |
The mean Ricker capacity value. |
burn |
The number of years to discard as burn in. |
... |
Anything else to pass to
|
A list object with three elements: port_vals
(a
matrix with a column of mean rate of change and variance of
rate of change), n_sims
(the number of simulations
ran), and sims_out
(a list in which each element
corresponds to the output from the run of
meta_sim
.
meta_sim
, create_asset_weights
weights_matrix <- create_asset_weights(n_pop = 4, n_sims = 3, weight_lower_limit = 0.001) mc_ports <- monte_carlo_portfolios(weights_matrix = weights_matrix, n_sims = 3, mean_b = 1000)