random_portfolios: version 2 generate an arbitary number of constrained random...

Description Usage Arguments Details Value Author(s) See Also

Description

Generate random portfolios using the 'sample', 'simplex', or 'grid' method. See details.

Usage

1
2
random_portfolios(portfolio, permutations = 100, rp_method = "sample",
  eliminate = TRUE, ...)

Arguments

portfolio

an object of class 'portfolio' specifying the constraints for the optimization, see portfolio.spec

permutations

integer: number of unique constrained random portfolios to generate

rp_method

method to generate random portfolios. Currently "sample", "simplex", or "grid". See Details.

eliminate

TRUE/FALSE, eliminate portfolios that do not satisfy constraints

...

any other passthru parameters

Details

Random portfolios can be generate using one of three methods.

The constraint types checked are leverage, box, group, position limit, and leverage exposure. Any portfolio that does not satisfy all these constraints will be eliminated. This function is particularly sensitive to min_sum and max_sum leverage constraints. For the sample method, there should be some "wiggle room" between min_sum and max_sum in order to generate a sufficient number of feasible portfolios. For example, min_sum=0.99 and max_sum=1.01 is recommended instead of min_sum=1 and max_sum=1. If min_sum=1 and max_sum=1, the number of feasible portfolios may be 1/3 or less depending on the other constraints.

Value

matrix of random portfolio weights

Author(s)

Peter Carl, Brian G. Peterson, Ross Bennett

See Also

portfolio.spec, objective, rp_sample, rp_simplex, rp_grid


PortfolioAnalytics documentation built on May 1, 2019, 10:56 p.m.