Create Portfolio object for mean-variance portfolio optimization

Use the `Portfolio`

function to create
a `Portfolio`

object for mean-variance portfolio
optimization. For more information, see Portfolio.

You can use the `Portfolio`

function in several
ways. To set up a portfolio optimization problem in a Portfolio object,
the simplest syntax is:

p = Portfolio;

`p`

, such that
all object properties are empty.
The `Portfolio`

function also accepts collections
of argument name-value pair arguments for properties and their values.
The `Portfolio`

function accepts inputs for properties
with the general syntax:

p = Portfolio('property1', value1, 'property2', value2, ... );

If a Portfolio object exists, the syntax permits the first (and
only the first argument) of the `Portfolio`

function
to be an existing object with subsequent argument name-value pair
arguments for properties to be added or modified. For example, given
an existing Portfolio object in `p`

, the general
syntax is:

p = Portfolio(p, 'property1', value1, 'property2', value2, ... );

Input argument names are not case-sensitive, but must be completely
specified. In addition, several properties can be specified with alternative
argument names (see Shortcuts for Property Names). The `Portfolio`

function
tries to detect problem dimensions from the inputs and, once set,
subsequent inputs can undergo various scalar or matrix expansion operations
that simplify the overall process to formulate a problem. In addition,
a Portfolio object is a value object so that, given portfolio `p`

,
the following code creates two objects, `p`

and `q`

,
that are distinct:

q = Portfolio(p, ...)

After creating a `Portfolio`

object, you can
use the associated object functions to set portfolio constraints,
analyze the efficient frontier, and validate the portfolio model.

For details on this workflow, see Portfolio Object Workflow and for more detailed information on the theoretical basis for mean-variance optimization, see Portfolio Optimization Theory.

constructs
an empty Portfolio object for mean-variance portfolio optimization
and analysis. You can then add elements to the Portfolio object using
the supported add and set functions. For more information, see Creating the Portfolio Object.. `p`

= Portfolio

constructs
a Portfolio object for mean-variance portfolio optimization and analysis
with additional options specified by one or more `p`

= Portfolio(`Name,Value`

)`Name,Value`

arguments.

constructs
a Portfolio object for mean-variance portfolio optimization and analysis
using a previously constructed Portfolio object `p`

= Portfolio(`p`

,`Name,Value`

)`p`

with
additional options specified by one or more `Name,Value`

arguments.

- Creating the Portfolio Object
- Setting and Getting Properties
- Working with Portfolio Constraints Using Defaults
- Common Operations on the Portfolio Object
- Asset Returns and Moments of Asset Returns Using Portfolio Object
- Estimate Efficient Portfolios for Entire Efficient Frontier for Portfolio Object
- Estimate Efficient Frontiers for Portfolio Object
- Validate the Portfolio Problem for Portfolio Object
- Asset Allocation Case Study
- Portfolio Optimization Examples

For a complete list of references for the Portfolio object, see Portfolio Optimization.

Was this topic helpful?