Set cardinality constraints on the number of assets invested in a portfolio object
sets cardinality constraints for a obj
= setMinMaxNumAssets(obj
,MinNumAssets
,MaxNumAssets
)Portfolio
,
PortfolioCVaR
, or PortfolioMAD
object.
MinNumAssets
and MaxNumAssets
are the
minimum and maximum number of assets invested in the portfolio, respectively.
The total number of allocated assets satisfying the Bound constraints is between
[MinNumAssets
, MaxNumAssets
]. For
details on the respective workflows when using these different objects, see
Portfolio Object Workflow, PortfolioCVaR Object Workflow,
and PortfolioMAD Object Workflow.
You can also use dot notation to set up a list of identifiers for assets.
obj = obj.setMinMaxNumAssets(MinNumAssets,MaxNumAssets);
Specifying empty values ([[]
) for
MinNumAssets
and MaxNumAsssets
removes
limit constraints from the Portfolio
,
PortfolioCVaR
, or PortfolioMAD
object.
estimateAssetMoments
| estimateFrontier
| estimateFrontierByReturn
| estimateFrontierByRisk
| estimateFrontierLimits
| estimateMaxSharpeRatio
| estimatePortMoments
| estimatePortReturn
| estimatePortRisk
| estimatePortSharpeRatio
| setBounds
| setSolverMINLP