gridSearch
function from the 'NMOF' package.
rp_grid(portfolio, permutations = 2000, normalize = TRUE)portfolio.specThe 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.