estimateFrontierByReturn
Estimate optimal portfolios with targeted portfolio returns
Description
[
estimates optimal portfolios with targeted portfolio returns for
pwgt
,pbuy
,psell
]
= estimateFrontierByReturn(obj
,TargetReturn
)Portfolio
, PortfolioCVaR
, or
PortfolioMAD
objects. For details on the respective
workflows when using these different objects, see Portfolio Object Workflow, PortfolioCVaR Object Workflow,
and PortfolioMAD Object Workflow.
Examples
Obtain the Portfolio for Targeted Portfolio Returns for a Portfolio Object
To obtain efficient portfolios that have targeted portfolio returns, the estimateFrontierByReturn
function accepts one or more target portfolio returns and obtains efficient portfolios with the specified returns. Assume you have a universe of four assets where you want to obtain efficient portfolios with target portfolio returns of 6%, 9%, and 12%.
m = [ 0.05; 0.1; 0.12; 0.18 ]; C = [ 0.0064 0.00408 0.00192 0; 0.00408 0.0289 0.0204 0.0119; 0.00192 0.0204 0.0576 0.0336; 0 0.0119 0.0336 0.1225 ]; p = Portfolio; p = setAssetMoments(p, m, C); p = setDefaultConstraints(p); pwgt = estimateFrontierByReturn(p, [0.06, 0.09, 0.12]); display(pwgt);
pwgt = 4×3
0.8772 0.5032 0.1293
0.0434 0.2488 0.4541
0.0416 0.0780 0.1143
0.0378 0.1700 0.3022
Obtain Portfolios with Targeted Portfolio Returns for a Portfolio
Object with BoundType
, MinNumAsset
, and MaxNumAsset
Constraints
When any one, or any combination of the constraints from 'Conditional'
BoundType
, MinNumAssets
, and MaxNumAssets
are active, the portfolio problem is formulated as mixed integer programming problem and the MINLP solver is used.
Create a Portfolio
object for three assets.
AssetMean = [ 0.0101110; 0.0043532; 0.0137058 ]; AssetCovar = [ 0.00324625 0.00022983 0.00420395; 0.00022983 0.00049937 0.00019247; 0.00420395 0.00019247 0.00764097 ]; p = Portfolio('AssetMean', AssetMean, 'AssetCovar', AssetCovar); p = setDefaultConstraints(p);
Use setBounds
with semicontinuous constraints to set xi = 0
or 0.02
<= xi
<= 0.5
for all i = 1
,...NumAssets
.
p = setBounds(p, 0.02, 0.7,'BoundType', 'Conditional', 'NumAssets', 3);
When working with a Portfolio
object, the setMinMaxNumAssets
function enables you to set up the limits on the number of assets invested (as known as cardinality) constraints. This sets the total number of allocated assets satisfying the Bound constraints that are between MinNumAssets
and MaxNumAssets
. By setting MinNumAssets
= MaxNumAssets
= 2, only two of the three assets are invested in the portfolio.
p = setMinMaxNumAssets(p, 2, 2);
Use estimateFrontierByReturn
to estimate optimal portfolios with targeted portfolio returns.
[pwgt, pbuy, psell] = estimateFrontierByReturn(p,[ 0.0072321, 0.0119084 ])
pwgt = 3×2
0 0.5000
0.6922 0
0.3078 0.5000
pbuy = 3×2
0 0.5000
0.6922 0
0.3078 0.5000
psell = 3×2
0 0
0 0
0 0
The estimateFrontierByReturn
function uses the MINLP solver to solve this problem. Use the setSolverMINLP
function to configure the SolverType
and options.
p.solverTypeMINLP
ans = 'OuterApproximation'
p.solverOptionsMINLP
ans = struct with fields:
MaxIterations: 1000
AbsoluteGapTolerance: 1.0000e-07
RelativeGapTolerance: 1.0000e-05
NonlinearScalingFactor: 1000
ObjectiveScalingFactor: 1000
Display: 'off'
CutGeneration: 'basic'
MaxIterationsInactiveCut: 30
ActiveCutTolerance: 1.0000e-07
IntMainSolverOptions: [1x1 optim.options.Intlinprog]
NumIterationsEarlyIntegerConvergence: 30
ExtendedFormulation: 0
NumInnerCuts: 10
NumInitialOuterCuts: 10
Obtain the Portfolio for Targeted Portfolio Returns for a PortfolioCVaR Object
To obtain efficient portfolios that have targeted portfolio returns, the estimateFrontierByReturn
function accepts one or more target portfolio returns and obtains efficient portfolios with the specified returns. Assume you have a universe of four assets where you want to obtain efficient portfolios with target portfolio returns of 7%, 10%, and 13%.
m = [ 0.05; 0.1; 0.12; 0.18 ]; C = [ 0.0064 0.00408 0.00192 0; 0.00408 0.0289 0.0204 0.0119; 0.00192 0.0204 0.0576 0.0336; 0 0.0119 0.0336 0.1225 ]; rng(11); p = PortfolioCVaR; p = simulateNormalScenariosByMoments(p, m, C, 2000); p = setDefaultConstraints(p); p = setProbabilityLevel(p, 0.95); pwgt = estimateFrontierByReturn(p, [0.07 0.10, 0.13]); display(pwgt);
pwgt = 4×3
0.7371 0.3072 0
0.1504 0.3919 0.4396
0.0286 0.1011 0.1360
0.0839 0.1999 0.4244
The function rng
() is used to reset the random number generator to produce the documented results. It is not necessary to reset the random number generator to simulate scenarios.
Obtain the Portfolio for Targeted Portfolio Returns for a PortfolioMAD Object
To obtain efficient portfolios that have targeted portfolio returns, the estimateFrontierByReturn
function accepts one or more target portfolio returns and obtains efficient portfolios with the specified returns. Assume you have a universe of four assets where you want to obtain efficient portfolios with target portfolio returns of 7%, 10%, and 13%.
m = [ 0.05; 0.1; 0.12; 0.18 ]; C = [ 0.0064 0.00408 0.00192 0; 0.00408 0.0289 0.0204 0.0119; 0.00192 0.0204 0.0576 0.0336; 0 0.0119 0.0336 0.1225 ]; rng(11); p = PortfolioMAD; p = simulateNormalScenariosByMoments(p, m, C, 2000); p = setDefaultConstraints(p); pwgt = estimateFrontierByReturn(p, [0.07 0.10, 0.13]); display(pwgt);
pwgt = 4×3
0.7436 0.3151 0
0.1357 0.3829 0.4425
0.0326 0.0936 0.1319
0.0880 0.2083 0.4255
The function rng
() is used to reset the random number generator to produce the documented results. It is not necessary to reset the random number generator to simulate scenarios.
Input Arguments
obj
— Object for portfolio
object
Object for portfolio, specified using Portfolio
,
PortfolioCVaR
, or PortfolioMAD
object. For more information on creating a portfolio object, see
Data Types: object
TargetReturn
— Target values for portfolio return
vector
Target values for portfolio return, specified as a
NumPorts
vector.
Note
TargetReturn
specifies target returns for
portfolios on the efficient frontier. If any
TargetReturn
values are outside the range of
returns for efficient portfolios, the
TargetReturn
is replaced with the minimum or
maximum efficient portfolio return, depending upon whether the
target return is below or above the range of efficient portfolio
returns.
Data Types: double
Output Arguments
pwgt
— Optimal portfolios on efficient frontier with specified target returns
matrix
Optimal portfolios on the efficient frontier with specified target returns
from TargetReturn
, returned as a
NumAssets
-by-NumPorts
matrix.
pwgt
is returned for a Portfolio
,
PortfolioCVaR
, or PortfolioMAD
input object (obj
).
pbuy
— Purchases relative to initial portfolio for optimal portfolios on efficient frontier
matrix
Purchases relative to an initial portfolio for optimal portfolios on the
efficient frontier, returned as
NumAssets
-by-NumPorts
matrix.
Note
If no initial portfolio is specified in
obj.InitPort
, that value is assumed to be
0
such that pbuy = max(0,
pwgt)
and psell = max(0,
-pwgt)
.
pbuy
is returned for a Portfolio
,
PortfolioCVaR
, or PortfolioMAD
input object (obj
).
psell
— Sales relative to initial portfolio for optimal portfolios on efficient frontier
matrix
Sales relative to an initial portfolio for optimal portfolios on the
efficient frontier, returned as a
NumAssets
-by-NumPorts
matrix.
Note
If no initial portfolio is specified in
obj.InitPort
, that value is assumed to be
0
such that pbuy = max(0,
pwgt)
and psell = max(0,
-pwgt)
.
psell
is returned for Portfolio
,
PortfolioCVaR
, or PortfolioMAD
input object (obj
).
Tips
You can also use dot notation to estimate optimal portfolios with targeted portfolio returns.
[pwgt, pbuy, psell] = obj.estimateFrontierByReturn(TargetReturn);
Version History
Introduced in R2011a
See Also
estimateFrontier
| estimateFrontierByRisk
| estimateFrontierLimits
| setBounds
| setMinMaxNumAssets
Topics
- Estimate Efficient Portfolios for Entire Efficient Frontier for Portfolio Object
- Estimate Efficient Frontiers for Portfolio Object
- Estimate Efficient Portfolios for Entire Frontier for PortfolioCVaR Object
- Estimate Efficient Frontiers for PortfolioCVaR Object
- Estimate Efficient Portfolios Along the Entire Frontier for PortfolioMAD Object
- Estimate Efficient Frontiers for PortfolioMAD Object
- Portfolio Optimization Examples Using Financial Toolbox
- Black-Litterman Portfolio Optimization Using Financial Toolbox
- Portfolio Optimization Using Factor Models
- Portfolio Optimization Theory
- Choose MINLP Solvers for Portfolio Problems
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)