Description Usage Arguments Details Value
This function generates random portfolios based on the gridSearch
function from the 'NMOF' package.
1 |
portfolio |
an object of class 'portfolio' specifying the constraints for the optimization, see |
permutations |
integer: number of unique constrained random portfolios to generate |
normalize |
TRUE/FALSE to normalize the weghts to satisfy min_sum or max_sum |
The number of levels is calculated based on permutations and number of assets. The number of levels must be an integer and may not result in the exact number of permutations. We round up to the nearest integer for the levels so the number of portfolios generated will be greater than or equal to permutations.
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
.
matrix of random portfolio weights
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.