Learn R Programming

metafolio (version 0.1.1)

monte_carlo_portfolios: Monte Carlo asset weights into portfolios

Description

Monte Carlo the asset weights into portfolios and record the simulation output and portfolio metrics (mean and variance).

Usage

monte_carlo_portfolios(
  weights_matrix,
  n_sims = 500,
  mean_b = 1000,
  burn = 1:30,
  ...
)

Arguments

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 meta_sim.

Value

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.

See Also

meta_sim, create_asset_weights

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab