Working with MAD Portfolio Constraints Using Defaults

The final element for a complete specification of a portfolio
optimization problem is the set of feasible portfolios, which is called
a portfolio set. A portfolio set X⊂Rn is
specified by construction as the intersection of sets formed by a
collection of constraints on portfolio weights. A portfolio set necessarily
and sufficiently must be a nonempty, closed, and bounded set.

When setting up your portfolio set, ensure that the portfolio set satisfies these conditions.
The most basic or “default” portfolio set requires portfolio weights to be
nonnegative (using the lower-bound constraint) and to sum to 1 (using
the budget constraint). For information on the workflow when using
PortfolioMAD objects, see PortfolioMAD Object Workflow.

Setting Default Constraints Using the setDefaultConstraints Function

An alternative approach is to use the setDefaultConstraints function.
If the number of assets is already known in a PortfolioMAD
object, use setDefaultConstraints with no
arguments to set up the necessary bound and budget constraints. Suppose that you
have 20 assets to set up the portfolio set for a default
problem: