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

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

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

Portfolio optimization problems involve identifying portfolios that satisfy three criteria:

Minimize a proxy for risk.

Match or exceed a proxy for return.

Satisfy basic feasibility requirements.

Portfolios are points from a feasible set of assets that constitute an asset universe. A portfolio specifies either holdings or weights in each individual asset in the asset universe. The convention is to specify portfolios in terms of weights, although the portfolio optimization tools work with holdings as well.

The set of feasible portfolios is necessarily a nonempty, closed, and bounded set. The proxy for risk is a function that characterizes either the variability or losses associated with portfolio choices. The proxy for return is a function that characterizes either the gross or net benefits associated with portfolio choices. The terms “risk” and “risk proxy” and “return” and “return proxy” are interchangeable. The fundamental insight of Markowitz (see Portfolio Optimization) is that the goal of the portfolio choice problem is to seek minimum risk for a given level of return and to seek maximum return for a given level of risk. Portfolios satisfying these criteria are efficient portfolios and the graph of the risks and returns of these portfolios forms a curve called the efficient frontier.

To specify a portfolio optimization problem, you need the following:

Proxy for portfolio return (

*μ*)Proxy for portfolio risk (

*Σ*)Set of feasible portfolios (

*X*), called a portfolio set

Financial Toolbox™ has three objects to solve specific types of portfolio optimization problems:

The Portfolio object (

`Portfolio`

) supports mean-variance portfolio optimization (see Markowitz [46], [47] at Portfolio Optimization). This object has either gross or net portfolio returns as the return proxy, the variance of portfolio returns as the risk proxy, and a portfolio set that is any combination of the specified constraints to form a portfolio set.The PortfolioCVaR object (

`PortfolioCVaR`

) implements what is known as conditional value-at-risk portfolio optimization (see Rockafellar and Uryasev [48], [49] at Portfolio Optimization), which is generally referred to as CVaR portfolio optimization. CVaR portfolio optimization works with the same return proxies and portfolio sets as mean-variance portfolio optimization but uses conditional value-at-risk of portfolio returns as the risk proxy.The PortfolioMAD object (

`PortfolioMAD`

) implements what is known as mean-absolute deviation portfolio optimization (see Konno and Yamazaki [50] at Portfolio Optimization), which is referred to as MAD portfolio optimization. MAD portfolio optimization works with the same return proxies and portfolio sets as mean-variance portfolio optimization but uses mean-absolute deviation portfolio returns as the risk proxy.

The proxy for portfolio return is a function $$\mu :X\to R$$ on a portfolio set $$X\subset {R}^{n}$$ that characterizes the rewards
associated with portfolio choices. Usually, the proxy for portfolio
return has two general forms, gross and net portfolio returns. Both
portfolio return forms separate the risk-free rate *r*_{0} so
that the portfolio $$x\in X$$ contains only
risky assets.

Regardless of the underlying distribution of asset returns,
a collection of *S* asset returns *y _{1}*,...,

$$m=\frac{1}{S}{\displaystyle \sum _{s=1}^{S}{y}_{s},}$$

and (sample) covariance of asset returns

$$C=\frac{1}{S-1}{\displaystyle \sum _{s=1}^{S}({y}_{s}-m){({y}_{s}-m)}^{T}.}$$

These moments (or alternative estimators that characterize these moments) are used directly in mean-variance portfolio optimization to form proxies for portfolio risk and return.

The gross portfolio return for a portfolio $$x\in X$$ is

$$\mu (x)={r}_{0}+{(m-{r}_{0}1)}^{T}x,$$

where:

*r*_{0} is the risk-free
rate (scalar).

*m* is the mean of asset returns (*n* vector).

If the portfolio weights sum to `1`

, the risk-free
rate is irrelevant. The properties in the Portfolio object to specify
gross portfolio returns are:

`RiskFreeRate`

for*r*_{0}`AssetMean`

for*m*

The net portfolio return for a portfolio $$x\in X$$ is

$$\mu (x)={r}_{0}+{(m-{r}_{0}1)}^{T}x-{b}^{T}\mathrm{max}\{0,x-{x}_{0}\}-{s}^{T}\mathrm{max}\{0,{x}_{0}-x\},$$

where:

*r*_{0} is the risk-free
rate (scalar).

*m* is the mean of asset returns (*n* vector).

*b* is the proportional cost to purchase assets
(*n* vector).

*s* is the proportional cost to sell assets
(*n* vector).

You can incorporate fixed transaction costs in this model also. Though in this case, it is necessary to incorporate prices into such costs. The properties in the Portfolio object to specify net portfolio returns are:

`RiskFreeRate`

for*r*_{0}`AssetMean`

for*m*`InitPort`

for*x*_{0}`BuyCost`

for*b*`SellCost`

for*s*

The proxy for portfolio risk is a function $$\sum :X\to R$$ on a portfolio set $$X\subset {R}^{n}$$ that characterizes the risks associated with portfolio choices.

The variance of portfolio returns for a portfolio $$x\in X$$ is

$$\sum \left(x\right)={x}^{T}Cx$$

`n`

-by-`n`

positive-semidefinite
matrix). The property in the Portfolio object to specify the variance
of portfolio returns is `AssetCovar`

for *C*.

Although the risk proxy in mean-variance portfolio optimization is the variance of portfolio returns, the square root, which is the standard deviation of portfolio returns, is often reported and displayed. Moreover, this quantity is often called the “risk” of the portfolio. For details, see Markowitz (Portfolio Optimization).

The conditional value-at-risk for a portfolio $$x\in X$$, which is also known as expected shortfall, is defined as

$$CVa{R}_{\alpha}\left(x\right)=\frac{1}{1-\alpha}{\displaystyle \underset{f(x,y)\ge Va{R}_{\alpha}(x)}{\int}f(x,y)p(y)dy,}$$

*α* is the probability level such that `0`

< *α* < `1`

.

*f(x,y)* is the loss function for a portfolio *x* and
asset return *y*.

*p(y)* is the probability density function
for asset return *y*.

*VaR _{α}* is
the value-at-risk of portfolio

The value-at-risk is defined as

$$Va{R}_{\alpha}\left(x\right)=\mathrm{min}\left\{\gamma :\mathrm{Pr}\left[f(x,Y)\le \gamma \right]\ge \alpha \right\}.$$

An alternative formulation for CVaR has the form:

$$CVa{R}_{\alpha}(x)=Va{R}_{\alpha}\left(x\right)+\frac{1}{1-\alpha}{\displaystyle \underset{{R}^{n}}{\int}\mathrm{max}}\left\{0,(f(x,y)-Va{R}_{\alpha}(x))\right\}p(y)dy$$

The choice for the probability level *α* is
typically 0.9 or 0.95. Choosing *α* implies
that the value-at-risk *VaR _{α}(x)* for
portfolio

`1`

–Value-at-risk is a positive value for losses so that the probability
level *α* indicates the probability that portfolio
returns are below the negative of the value-at-risk.

To describe the probability distribution of returns, the `PortfolioCVaR`

object
takes a finite sample of return scenarios *y*_{s},
with *s* = `1`

,...,*S*.
Each *y*_{s} is
an *n* vector that contains the returns for each
of the *n* assets under the scenario *s*.
This sample of *S* scenarios is stored as a scenario
matrix of size *S*-by-*n*. Then,
the risk proxy for CVaR portfolio optimization, for a given portfolio $$x\in X$$ and $$\alpha \in (0,1)$$, is computed as

$$\sum (x)=}Va{R}_{\alpha}(x)+\frac{1}{(1-\alpha )S}{\displaystyle \sum _{s=1}^{S}\mathrm{max}\left\{0,-{y}_{s}^{T}x-Va{R}_{\alpha}(x)\right\}$$

The value-at-risk, *VaR*_{α}(*x*),
is estimated whenever the CVaR is estimated. The loss function is $$f(x,{y}_{s})=-{y}_{s}^{T}x$$, which is the portfolio loss
under scenario *s*.

Under this definition, VaR and CVaR are sample estimators for VaR and CVaR based on the given scenarios. Better scenario samples yield more reliable estimates of VaR and CVaR.

For more information, see Rockafellar and Uryasev [48], [49], and Cornuejols and Tütüncü, [51], at Portfolio Optimization.

The mean-absolute deviation (MAD) for a portfolio $$x\in X$$ is defined as

$$\sum (x)=}\frac{1}{S}{\displaystyle \sum _{s=1}^{S}\left|{({y}_{s}-m)}^{T}x\right|$$

*y _{s}* are asset returns
with scenarios

*f(x,y)* is the loss function for a portfolio *x* and
asset return *y*.

*m* is the mean of asset returns (*n* vector).

such that

$$m=\frac{1}{S}{\displaystyle \sum _{s=1}^{S}{y}_{s}}$$

For more information, see Konno and Yamazaki [50] at Portfolio Optimization.

- PortfolioCVaR Object
- Portfolio Set for Optimization Using PortfolioCVaR Object
- Default Portfolio Problem
- PortfolioCVaR Object Workflow

Was this topic helpful?