Learn R Programming

metafolio (version 0.1.0)

create_asset_weights: Create an asset weights matrix

Description

Create an asset weight matrix to run through the Monte Carlo algorithm and test possible portfolios.

Usage

create_asset_weights(n_pop, n_sims, weight_lower_limit = 0.02)

Arguments

n_pop

The number of subpopulations.

n_sims

The number of simulations.

weight_lower_limit

The lowest fraction allowed for a subpopulation weight. For example, a value of 0.02 means a subpopulation will at least be assigned 2% of the total capacity

Value

A matrix. The columns represent subpopulations. The rows represent simulation repetitions.

Examples

Run this code
# NOT RUN {
create_asset_weights(n_pop = 5, n_sims = 10, weight_lower_limit = 0.001)
# }

Run the code above in your browser using DataLab