Documentation 
Superclasses: AbstractPortfolio
Portfolio object for meanvariance portfolio optimization and analysis
The Portfolio object implements meanvariance portfolio optimization and is derived from the abstract portfolio optimization class AbstractPortfolio. Portfolio objects implement all methods in the AbstractPortfolio class along with methods that are specific to meanvariance portfolio optimization.
The main workflow for portfolio optimization is to create an instance of a Portfolio object that completely specifies a portfolio optimization problem and to operate on the Portfolio object to obtain and analyze efficient portfolios. A meanvariance optimization problem is completely specified with the following three elements:
A universe of assets with estimates for the prospective mean and covariance of asset total returns for a period of interest.
A portfolio set that specifies the set of portfolio choices in terms of a collection of constraints.
A model for portfolio return and risk, which, for meanvariance optimization, is either the gross or net mean of portfolio returns and the standard deviation of portfolio returns.
After you specify three elements in an unambiguous way, you can solve and analyze portfolio optimization problems. The simplest meanvariance portfolio optimization problem has:
A mean and covariance of asset total returns
Nonnegative weights for all portfolios that sum to 1 (the summation constraint is known as a budget constraint)
Builtin models for portfolio return and risk that use the mean and covariance of asset total returns
Given mean and covariance of asset returns in the variables AssetMean and AssetCovar, this problem is completely specified by:
p = Portfolio('AssetMean', AssetMean, 'AssetCovar', AssetCovar,... 'LowerBound', 0, 'Budget')
or equivalently by:
p = Portfolio; p = setAssetMoments(p, AssetMean, AssetCovar); p = setDefaultConstraints(p);
p = Portfolio constructs an empty Portfolio object for meanvariance portfolio optimization and analysis. You can then add elements to the Portfolio object using the supported add and set methods. For more information, see Constructing the Portfolio Object.
p = Portfolio(Name,Value) constructs a Portfolio object for meanvariance portfolio optimization and analysis with additional options specified by one or more Name,Value pair arguments. Name is a property name and Value is its corresponding value. Name must appear inside single quotes (''). You can specify several namevalue pair arguments in any order as Name1,Value1,...,NameN,ValueN.
p = Portfolio(p,Name,Value) constructs a Portfolio object for meanvariance portfolio optimization and analysis using a previously constructed Portfolio object p with additional options specified by one or more Name,Value pair arguments.
p 
(Optional) Previously constructed Portfolio object (p). 
Specify optional commaseparated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
The following properties are from the Portfolio class.
BuyTurnover 
Turnover constraint on purchases ([] or [scalar]). Attributes:

RiskFreeRate 
Riskfree rate ([] or scalar). Attributes:
 
SellCost 
Proportional sales costs ([] or vector). Attributes:

SellTurnover 
Turnover constraint on sales ([] or [scalar]). Attributes:

Turnover 
Turnover constraint ([] or [scalar]). Attributes:

The following properties are inherited from the AbstractPortfolio class.
AEquality 
Linear equality constraint matrix ([] or [matrix]). Attributes:
 
AInequality 
Linear inequality constraint matrix ([] or [matrix]). Attributes:
 
AssetList 
Names or symbols of assets in the universe ([] or [vector cell of strings]). Attributes:
 
bEquality 
Linear equality constraint vector ([] or [vector]). Attributes:
 
bInequality 
Linear inequality constraint vector ([] or [vector]). Attributes:
 
GroupA 
Group A weights to be bounded by group B ([] or [matrix]). Attributes:
 
GroupB 
Group B weights ([] or [matrix]). Attributes:
 
GroupMatrix 
Group membership matrix ([] or [matrix]). Attributes:
 
InitPort 
Initial portfolio ([] or vector). Attributes:
 
LowerBound 
Lowerbound constraint ([] or [vector]). Attributes:
 
LowerBudget 
Lowerbound budget constraint ([] or [scalar]). Attributes:
 
LowerGroup 
Lowerbound group constraint ([] or [vector]). Attributes:
 
LowerRatio 
Minimum ratio of allocations between groups A and B ([] or [vector]). Attributes:
 
Name 
Name for instance of the Portfolio object ([] or [string]). Attributes:
 
NumAssets 
Number of assets in the universe ([] or [integer scalar]). Attributes:
 
UpperBound 
Upperbound constraint ([] or [vector]). Attributes:
 
UpperBudget 
Upperbound budget constraint ([] or [scalar]). Attributes:
 
UpperGroup 
Upperbound group constraint ([] or [vector]). Attributes:
 
UpperRatio 
Maximum ratio of allocations between groups A and B ([] or [vector]). Attributes:

The following methods are inherited from the AbstractPortfolio class.
Add equality constraints for portfolio weights to existing constraints.  
Add group ratio constraints for portfolio weights to existing constraints.  
Add group constraints for portfolio weights to existing constraints.  
Add inequality constraints for portfolio weights to existing constraints.  
Determine if portfolios are members of the set of feasible portfolios.  
Determine if set of feasible portfolios is nonempty and bounded.  
Estimate portfolios on the entire efficient frontier.  
Estimate portfolios on the efficient frontier with targeted returns or return proxies.  
Estimate portfolios on the efficient frontier with targeted risks or risk proxies.  
Estimate portfolios at the extreme ends of the efficient frontier (minimum risk and maximum return).  
Estimate efficient portfolio that maximizes the Sharpe ratio.  
Estimate return or return proxy for specified portfolios.  
Estimate risk or risk proxy for specified portfolios.  
Get lower and upper bounds from the object.  
Get lower and upper budget constraints from the object.  
Get equality constraint matrix and vector from the object.  
Get base matrix, comparison matrix, and lower and upper bounds for group ratio constraints from the object.  
Get group matrix and lower and upper bounds for group constraints from the object.  
Get inequality constraint matrix and vector from the object.  
Plot efficient frontier and optionally obtain risks and returns for portfolios on the efficient frontier.  
Set up a list of asset names and symbols to be associated with assets in the universe.  
Set up lower and upper bounds for portfolio weights.  
Set up lower and upper budget constraints for portfolio weights.  
Set up default constraints for portfolio weights (nonnegative weights that must sum to 1).  
Set up equality constraints for portfolio weights.  
Set up group ratio constraints for portfolio weights.  
Set up group constraints for portfolio weights.  
Set up inequality constraints for portfolio weights.  
Set up initial portfolio weights.  
Set up hidden control properties in object (not implemented).  
Set up solver to estimate efficient portfolios. 
Estimate mean and covariance of asset returns from price or return data.  
Estimate mean and standard deviation of portfolio returns for specified portfolios.  
Get mean and covariance of asset returns from the object.  
Get purchase and sales proportional transaction costs from the object.  
Get oneway portfolio turnover constraints.  
Set up mean and covariance of asset returns.  
Set up purchase and sale proportional transaction costs for assets in the universe.  
Set up oneway portfolio turnover constraints.  
Set up average turnover constraints for portfolio weights. 
For more information on the theory and definition of meanvariance optimization supported by portfolio optimization tools in Financial Toolbox™, see Portfolio Optimization Theory.
Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB^{®} documentation.
For a complete list of references for the Portfolio object and portfolio optimization tools, see Portfolio Optimization.