random_portfolios_v2(portfolio, permutations = 100, rp_method = "sample", eliminate = TRUE, ...)
portfolio.spec
min_sum
and max_sum
of the leverage constraint will be ignored, the sum of
weights will equal 1. All other constraints such as group and position
limit constraints will be handled by elimination. If the constraints are
very restrictive, this may result in very few feasible portfolios remaining.
gridSearch
function in package 'NMOF'. The grid search method
only satisfies the min
and max
box constraints. The
min_sum
and max_sum
leverage constraints will likely be
violated and the weights in the random portfolios should be normalized.
Normalization may cause the box constraints to be violated and will be
penalized in constrained_objective
.
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.
portfolio.spec
,
objective
,
rp_sample
,
rp_simplex
,
rp_grid