Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Add linear equality constraints for portfolio weights to existing constraints

Use the `addEquality`

function with
a `Portfolio`

, `PortfolioCVaR`

,
or `PortfolioMAD`

object to add linear equality constraints
for portfolio weights to existing constraints.

For details on the respective workflows when using these different objects, see Portfolio Object Workflow, PortfolioCVaR Object Workflow, and PortfolioMAD Object Workflow.

`obj = addEquality(obj,AEquality,bEquality)`

adds
linear equality constraints for portfolio weights to existing constraints.`obj`

= addEquality(`obj`

,`AEquality`

,`bEquality`

)

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`

.

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([ ], [ ])

- 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
- Portfolio Set for Optimization Using Portfolio Object
- Portfolio Set for Optimization Using PortfolioCVaR Object
- Portfolio Set for Optimization Using PortfolioMAD Object

Was this topic helpful?