Accelerating the pace of engineering and science

# estimateFrontierByRisk

Estimate optimal portfolios with targeted portfolio risks for PortfolioMAD object

## Description

[pwgt,pbuy,psell] = estimateFrontierByRisk(obj,TargetRisk) estimates optimal portfolios with targeted portfolio risks.

## Tips

You can also use dot notation to estimate optimal portfolios with targeted portfolio risks.

## Input Arguments

obj

TargetRisk

Target values for MAD portfolio object risk [NumPorts vector].

 Note:   If any TargetRisk values are outside the range of risks for efficient portfolios, the target risk is replaced with the minimum or maximum efficient portfolio risk, depending on whether the target risk is below or above the range of efficient portfolio risks.

## Output Arguments

 pwgt Optimal portfolios on the efficient frontier with specified target risks from TargetRisk [NumAssets-by-NumPorts matrix].
 pbuy Purchases relative to an initial portfolio for optimal portfolios on the efficient frontier [NumAssets-by-NumPorts matrix].
 psell Sales relative to an initial portfolio for optimal portfolios on the efficient frontier [NumAssets-by-NumPorts matrix].
 Note:   If no initial portfolio is specified in obj.InitPort, it is assumed to be 0 such that so pbuy = max(0, pwgt) and psell = max(0, -pwgt).

## Attributes

 Access public Static false Hidden false

To learn about attributes of methods, see Method Attributes in the MATLAB® Object-Oriented Programming documentation.

## Examples

expand all

### Obtain Portfolios with Targeted Portfolio Risks

To obtain efficient portfolios that have targeted portfolio risks, the estimateFrontierByRisk method accepts one or more target portfolio risks and obtains efficient portfolios with the specified risks. Assume you have a universe of four assets where you want to obtain efficient portfolios with target portfolio risks of 12%, 20%, and 25%.

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 = simulateNormalScenariosByMoments(p, m, C, 2000);
p = setDefaultConstraints(p);

pwgt = estimateFrontierByRisk(p, [0.12, 0.20, 0.25]);

display(pwgt);
pwgt =

0.1613    0.0000         0
0.4777    0.2139    0.0037
0.1118    0.1381    0.1214
0.2492    0.6480    0.8749

The function rng( ) resets the random number generator to produce the documented results. It is not necessary to reset the random number generator to simulate scenarios.