Set up portfolio constraints with nonnegative weights that sum to 1
sets up portfolio constraints with nonnegative weights that sum to 1 for
obj
= setDefaultConstraints(obj
)Portfolio
, PortfolioCVaR
, or
PortfolioMAD
objects. For details on the respective workflows when using
these different objects, see Portfolio Object Workflow, PortfolioCVaR Object Workflow, and PortfolioMAD Object Workflow.
sets up portfolio constraints with nonnegative weights that sum to 1 with an additional option
for obj
= setDefaultConstraints(obj
,NumAssets
)NumAssets
.
A "default" portfolio set has LowerBound
= 0
and
LowerBudget
= UpperBudget
= 1
such
that a portfolio Port
must satisfy sum(Port) = 1
with
Port >= 0
.
You can also use dot notation to set up the default portfolio set.
obj = obj.setDefaultConstraints(NumAssets);
This function does not modify any existing constraints in a portfolio object other than
the bound and budget constraints. If an UpperBound
constraint exists, it is
cleared and set to []
.
getBounds
| setBounds
| setBudget