Add linear inequality constraints for portfolio weights to existing constraints
adds linear inequality constraints for portfolio weights to existing constraints
for obj
= addInequality(obj
,AInequality
,bInequality
)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.
Given a linear inequality constraint matrix AInequality
and vector bInequality
, every weight in a portfolio
Port
must satisfy the
following:
AInequality * Port <= bInequality
This function "stacks" additional linear inequality constraints onto any
existing linear inequality constraints that exist in the input portfolio object.
If no constraints exist, this function is the same as setInequality
.
You can also use dot notation to add the linear inequality constraints for portfolio weights.
obj = obj.addInequality(AInequality, bInequality)
You can also remove linear inequality constraints from any of the portfolio objects using dot notation.
obj = obj.setInequality([ ], [ ])