Mean-variance efficient frontier
[PortRisk, PortReturn, PortWts] = frontcon(ExpReturn,
ExpCovariance, NumPorts, PortReturn, AssetBounds, Groups,
1 by number of assets (NASSETS) vector specifying the expected (mean) return of each asset.
NASSETS-by-NASSETS matrix specifying the covariance of asset returns.
(Optional) Number of portfolios generated along the efficient frontier. Returns are equally spaced between the maximum possible return and the minimum risk point. If NumPorts is empty (entered as , frontcon computes 10 equally spaced points. When entering a target rate of return (PortReturn), enter NumPorts as an empty matrix .
(Optional) Vector of length equal to the number of portfolios (NPORTS) containing the target return values on the frontier. If PortReturn is not entered or , NumPorts equally spaced returns between the minimum and maximum possible values are used.
(Optional) 2-by-NASSETS matrix containing the lower and upper bounds on the weight allocated to each asset in the portfolio. Default lower bound = all 0s (no short-selling). Default upper bound = all 1s (any asset may constitute the entire portfolio).
(Optional) Number of groups (NGROUPS)-by-NASSETS matrix specifying NGROUPS asset groups or classes. Each row specifies a group. Groups(i,j) = 1 (jth asset belongs in the ith group). Groups(i,j) = 0 (jth asset not a member of the ith group).
(Optional) NGROUPS-by-2 matrix specifying, for each group, the lower and upper bounds of the total weights of all assets in that group. Default lower bound = all 0s. Default upper bound = all 1s.
(Optional) varargin supports the following parameter-value pairs:
[PortRisk, PortReturn, PortWts] = frontcon(ExpReturn, ExpCovariance, NumPorts, PortReturn, AssetBounds, Groups, GroupBounds, varargin) returns the mean-variance efficient frontier with user-specified asset constraints, covariance, and returns. For a collection of NASSETS risky assets, computes a portfolio of asset investment weights that minimize the risk for given values of the expected return. The portfolio risk is minimized subject to constraints on the asset weights or on groups of asset weights.
PortRisk is an NPORTS-by-1 vector of the standard deviation of each portfolio.
PortReturn is a NPORTS-by-1 vector of the expected return of each portfolio.
PortWts is an NPORTS-by-NASSETS matrix of weights allocated to each asset. Each row represents a portfolio. The total of all weights in a portfolio is 1.
frontcon generates a plot of the efficient frontier if you invoke it without output arguments.
The asset returns are assumed to be jointly normal, with expected mean returns of ExpReturn and return covariance ExpCovariance. The variance of a portfolio with 1-by-NASSETS weights PortWts is given by PortVar = PortWts*ExpCovariance*PortWts'. The portfolio expected return is PortReturn = dot(ExpReturn, PortWts).
Given three assets with expected returns of
ExpReturn = [0.1 0.2 0.15];
and expected covariance of
ExpCovariance = [ 0.0100 -0.0061 0.0042 -0.0061 0.0400 -0.0252 0.0042 -0.0252 0.0225];
compute the mean-variance efficient frontier for four points.
NumPorts = 4; [PortRisk, PortReturn, PortWts] = frontcon(ExpReturn,... ExpCovariance, NumPorts)
PortRisk = 0.0426 0.0483 0.1089 0.2000 PortReturn = 0.1569 0.1713 0.1856 0.2000 PortWts = 0.2134 0.3518 0.4348 0.0096 0.4352 0.5552 0 0.7128 0.2872 0 1.0000 0