addEquality
Add linear equality constraints for portfolio weights to existing constraints
Description
adds linear equality constraints for portfolio weights to existing constraints
for obj
= addEquality(obj
,AEquality
,bEquality
)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 equality constraint matrix AEquality
and
vector bEquality
, every weight in a portfolio
Port
must satisfy the
following:
AEquality * Port = bEquality
This function "stacks" additional linear equality constraints onto any
existing linear equality constraints that exist in the input portfolio object.
If no constraints exist, this method is the same as setEquality
.
Examples
Input Arguments
Output Arguments
Tips
You can also use dot notation to add the linear equality constraints for portfolio weights.
obj = obj.addEquality(AEquality, bEquality)
You can also remove linear equality constraints from a portfolio object using dot notation.
obj = obj.setEquality([ ], [ ])
Version History
Introduced in R2011a
See Also
Topics
- Working with Linear Equality Constraints Using Portfolio Object
- Working with Linear Equality Constraints Using PortfolioCVaR Object
- Setting Linear Inequality Constraints Using the setInequality and addInequality Functions
- Portfolio Optimization Examples Using Financial Toolbox
- Supported Constraints for Portfolio Optimization Using Portfolio Objects
- Supported Constraints for Portfolio Optimization Using PortfolioCVaR Object
- Supported Constraints for Portfolio Optimization Using PortfolioMAD Object