Documentation 
Superclasses: AbstractPortfolio
PortfolioCVaR object for conditional valueatrisk portfolio optimization and analysis
The PortfolioCVaR object implements conditional valueatrisk (CVaR) portfolio optimization and is derived from the abstract portfolio optimization class AbstractPortfolio. This object implements all methods in the AbstractPortfolio class along with methods that are specific to CVaR portfolio optimization.
The main workflow for CVaR portfolio optimization is to create an instance of a PortfolioCVaR object that completely specifies a portfolio optimization problem and to operate on the PortfolioCVaR object to obtain and analyze efficient portfolios. A CVaR optimization problem is completely specified with these four elements:
A universe of assets with scenarios of asset total returns for a period of interest, where scenarios comprise a collection of samples from the underlying probability distribution for asset total returns. This collection must be sufficiently large for asymptotic convergence of sample statistics. Note that asset return moments and related statistics are derived exclusively from the scenarios.
A portfolio set that specifies the set of portfolio choices in terms of a collection of constraints.
A model for portfolio return and risk proxies, which, for CVaR optimization, is either the gross or net mean of portfolio returns and the conditional valueatrisk of portfolio returns.
A probability level that specifies the probability that a loss is less than or equal to the valueatrisk. Typical values are 0.9 and 0.95, which indicate 10% and 5% loss probabilities.
After these four elements have been specified in an unambiguous way, it is possible to solve and analyze CVaR portfolio optimization problems.
The simplest CVaR portfolio optimization problem has:
Scenarios of asset total returns
A requirement that all portfolios have nonnegative weights that sum to 1 (the summation constraint is known as a budget constraint)
Builtin models for portfolio return and risk proxies that use scenarios of asset total returns
A probability level of 0.95
Given scenarios of asset returns in the variable AssetScenarios, this problem is completely specified by:
p = PortfolioCVaR('Scenarios', AssetScenarios, 'LowerBound', 0, 'Budget', 1, ... 'ProbabilityLevel', 0.95);
or equivalently by:
p = PortfolioCVaR; p = setScenarios(p, AssetScenarios); p = setDefaultConstraints(p); p = setProbabilityLevel(p, 0.95);
To confirm that this is a valid portfolio optimization problem, the following method determines whether the set of PortfolioCVaR choices is bounded (a necessary condition for portfolio optimization).
[lb, ub, isbounded] = estimateBounds(p);
Given the problem specified in the PortfolioCVaR object p, the efficient frontier for this problem can be displayed with:
plotFrontier(p);
and efficient portfolios can be obtained with:
pwgt = estimateFrontier(p);
p = PortfolioCVaR constructs an empty PortfolioCVaR object for conditional valueatrisk portfolio optimization and analysis. You can then add elements to the PortfolioCVaR object using the supported add and set methods. For more information, see Constructing the PortfolioCVaR Object.
p = PortfolioCVaR(Name,Value) constructs a PortfolioCVaR object for conditional valueatrisk 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 = PortfolioCVaR(p,Name,Value) constructs a PortfolioCVaR object for conditional valueatrisk portfolio optimization and analysis using a previously constructed PortfolioCVaR object p with additional options specified by one or more Name,Value pair arguments.
p 
(Optional) Previously constructed CVaR 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.
'AInequality' 
Linear inequality constraint matrix ([] or [matrix]). Default: []  
'AssetList' 
Names or symbols of assets in the universe ([] or [vector cell of strings]). Default: []  
'bInequality' 
Linear inequality constraint vector ([] or [vector]). Default: []  
'BuyCost' 
Proportional purchase costs ([] or vector). Default: []  
'BuyTurnover' 
Turnover constraint on purchases ([] or [scalar]). Default: []  
'GroupA' 
Group A weights to be bounded by weights in group B ([] or [matrix]). Default: []  
'GroupB' 
Group B weights ([] or [matrix]). Default: []  
'GroupMatrix' 
Group membership matrix ([] or [matrix]). Default: []  
'InitPort' 
Initial portfolio ([] or vector). Default: []  
'LowerBudget' 
Lowerbound budget constraint ([] or [scalar]). Default: []  
'LowerGroup' 
Lowerbound group constraint ([] or [vector]). Default: []  
'LowerRatio' 
Minimum ratio of allocations between groups A and B ([] or [vector]). Default: []  
'Name' 
Name for instance of the PortfolioCVaR object ([] or [string]). Default: []  
'NumAssets' 
Number of assets in the universe ([] or [integer scalar]). Default: []  
'NumScenarios' 
Number of scenarios ([] or [integer scalar]).
Default: []  
'ProbabilityLevel' 
Probability level which is 1 minus the probability of losses greater than the valueatrisk ([] or [scalar]). Default: []  
'RiskFreeRate' 
Riskfree rate ([] or scalar). Default: []  
'SellCost' 
Proportional sales costs ([] or vector). Default: []  
'SellTurnover' 
Turnover constraint on sales ([] or [scalar]). Default: []  
'Turnover' 
Turnover constraint ([] or [scalar]). Default: []  
'UpperBound' 
Upperbound constraint ([] or [vector]). Default: []  
'UpperBudget' 
Upperbound budget constraint ([] or [scalar]). Default: []  
'UpperGroup' 
Upperbound group constraint ([] or [vector]). Default: []  
'UpperRatio' 
Maximum ratio of allocations between groups A and B ([] or [vector]). Default: [] 
The following properties are from the PortfolioCVaR class.
BuyCost 
Proportional purchase costs ([] or vector). Attributes:

BuyTurnover 
Turnover constraint on purchases ([] or [scalar]). Attributes:

NumScenarios 
Number of scenarios ([] or [integer scalar]). Attributes:

ProbabilityLevel 
Valueatrisk probability level which is 1 − (loss probability) ([] 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.
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 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 standard deviation of portfolio returns.  
Estimate valueatrisk for portfolio.  
Estimate mean and covariance of scenarios.  
Simulate multivariate normal asset return scenarios from data.  
Simulate multivariate normal asset return scenarios from a mean and covariance of asset returns.  
Get purchase and sales proportional transaction costs from the object.  
Get oneway portfolio turnover constraints.  
Obtain scenarios from PortfolioCVaR object.  
Set up purchase and sale proportional transaction costs for assets in the universe.  
Set up oneway portfolio turnover constraints.  
Set probability level for VaR and CVaR calculations.  
Set asset returns scenarios by direct matrix.  
Set up average turnover constraints for portfolio weights. 
For more information on the theory and definition of conditional valueatrisk 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 PortfolioCVaR object and portfolio optimization tools, see Portfolio Optimization.