Portfolios on constrained efficient frontier
portopt
has been partially removed and will
no longer accept ConSet
or varargin
arguments.
Use Portfolio
instead to solve
portfolio problems that are more than a longonly fullyinvested 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.
[PortRisk, PortReturn, PortWts] = portopt(ExpReturn, ExpCovariance) [PortRisk, PortReturn, PortWts] = portopt(ExpReturn, ExpCovariance,
NumPorts) [PortRisk, PortReturn, PortWts] = portopt(ExpReturn, ExpCovariance,
NumPorts, PortReturn)
 1 by number of assets ( 


 (Optional) Number of portfolios generated along the efficient
frontier. Returns are equally spaced between the maximum possible
return and the minimum risk point. If 
 (Optional) Expected return of each portfolio. A number
of portfolios ( 
[PortRisk, PortReturn, PortWts] = portopt(ExpReturn,
ExpCovariance)
sets up the most basic portfolio problem
with weights greater than or equal to 0
that must
sum to 1
. All that is necessary to solve this
problem is the mean and covariance of asset returns. The problem
returns 10 equallyspaced points on the efficient frontier by return.
[PortRisk, PortReturn, PortWts] = portopt(ExpReturn,
ExpCovariance, NumPorts)
sets up the basic portfolio problem
but lets you specify how many equallyspaced points on the efficient
frontier that you want in NumPorts
. If you specify 1
,
it returns the minimumrisk portfolio.
[PortRisk, PortReturn, PortWts] = portopt(ExpReturn,
ExpCovariance, NumPorts, PortReturn)
sets up the basic portfolio
problem but lets you specify target returns on the efficient frontier
in the vector PortReturn
. This functionality requires
that if you set PortReturn
, NumPorts
should
be empty.
Note:

The outputs for portopt
are:
PortRisk
is an NPORTS
by1
vector
of the standard deviation of each portfolio.
PortReturn
is an NPORTS
by1
vector
of the expected return of each portfolio.
PortWts
is an NPORTS
byNASSETS
matrix
of weights allocated to each asset. Each row represents a portfolio.
The total of all weights in a portfolio is 1.
If portopt
is invoked without output arguments,
it writes to the current figure window.