Portfolios on constrained efficient frontier
portopt has been partially removed and will no longer accept
varargin arguments. Use
Portfolio instead to solve portfolio problems that are more than a
long-only fully-invested portfolio. For information on the workflow when using
Portfolio objects, see Portfolio Object Workflow. For more information on migrating
portopt code to
Portfolio, see portopt Migration to Portfolio Object.
sets up the most basic portfolio problem with weights greater than or equal to
PortWts] = portopt(
0 that must sum to
1. All that is
necessary to solve this problem is the mean and covariance of asset returns. By
portopt returns 10 equally-spaced points on the
portopt solves the "standard" mean-variance portfolio
optimization problem for a long-only fully-invested investor with no additional
constraints. Specifically, every portfolios on the efficient frontier has
non-negative weights that sum to 1.
ExpReturn— expected (mean) return of each asset
expected (mean) return of each asset, specified as a
1-by-number of assets (
ExpCovariance— Covariance of the asset returns
Covariance of the asset returns, specified as a
NumPorts— Number of portfolios generated along the efficient frontier.
10(default) | scalar numeric
(Optional) Number of portfolios generated along the efficient frontier,
specified as a scalar numeric. Returns are equally spaced between the
maximum possible return and the minimum risk point. If
NumPorts is empty (entered as
portopt computes 10 equally spaced points. If you
portopt returns the
If not over-ridden by
portfolios are spaced evenly from the minimum to the maximum return
on the efficient frontier. If
NumPorts = 1, then
the minimum-risk portfolio is computed (positive integer).
PortReturn— Target portfolio returns to be computed on the efficient frontier
[ ](default) | vector
(Optional) Target portfolio returns to be computed on the efficient
frontier, specified as a number of portfolios
1 vector). If not
entered or empty,
NumPorts equally spaced returns
between the minimum and maximum possible values are used.
portopt requires that if you set
should be empty. If you specify
PortReturn with a
NumPorts. If any returns in
PortReturn fall outside the range of returns
on the efficient frontier,
portopt generates a
warning and the efficient portfolios closest to the endpoints of the
efficient frontier are computed.
PortRisk— Standard deviation of each portfolio
Standard deviation of each portfolio, returned as a
PortWts is an
NASSETS matrix of
weights allocated to each asset. Each row represents a portfolio. The total
of all weights in a portfolio is 1.
PortReturn— expected return of each portfolio
Expected return of each portfolio, returned as a
PortWts— Weights allocated to each asset
Weights allocated to each asset, returned as a
NASSETS matrix. Each row
represents a portfolio. The total of all weights in a portfolio is 1.
portopt to connect 20 portfolios along the efficient frontier having evenly spaced returns. By default, choose among portfolios without short-selling and scale the value of the portfolio to 1.
ExpReturn = [0.1 0.2 0.15]; ExpCovariance = [0.005 -0.010 0.004 -0.010 0.040 -0.002 0.004 -0.002 0.023]; NumPorts = 20; portopt(ExpReturn, ExpCovariance, NumPorts)