Quantcast

Documentation Center

  • Trial Software
  • Product Updates

estimateFrontier

Class: PortfolioCVaR

Estimate specified number of optimal portfolios on efficient frontier for PortfolioCVaR object

Syntax

[pwgt,pbuy,psell] = estimateFrontier(obj)
[pwgt,pbuy,psell] = estimateFrontier(obj,NumPorts)

Description

[pwgt,pbuy,psell] = estimateFrontier(obj) estimates a default number of optimal portfolios on the efficient frontier.

[pwgt,pbuy,psell] = estimateFrontier(obj,NumPorts) estimates the specified number of optimal portfolios on the efficient frontier with an additional option for NumPorts.

Tips

Use dot notation to estimate the specified number of optimal portfolios over the entire efficient frontier.

 	[pwgt, pbuy, psell] = obj.estimateFrontier(NumPorts);

Input Arguments

obj

CVaR portfolio object [PortfolioCVaR].

NumPorts

(Optional) Number of points to obtain on the efficient frontier [scalar integer].

    Note:   If no value is specified for NumPorts, the default value is obtained from the hidden property defaultNumPorts (default value is 10). If NumPorts = 1, this method returns the portfolio specified by the hidden property defaultFrontierLimit (current default value is 'min').

Default: 10

Output Arguments

pwgt

Optimal portfolios on the efficient frontier with a specified number of portfolios spaced equally from minimum to maximum portfolio return [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, that value is assumed to be 0 such that pbuy = max(0, pwgt) and psell = max(0, -pwgt).

Attributes

Accesspublic
Staticfalse
Hiddenfalse

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

Examples

expand all

Obtain the Default Number of Efficient Portfolios

Obtain the default number of efficient portfolios over the entire range of the efficient frontier.

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 ];
m = m/12;
C = C/12;

rng(11);

AssetScenarios = mvnrnd(m, C, 20000);

p = PortfolioCVaR;
p = p.setScenarios(AssetScenarios);
p = p.setDefaultConstraints;
p = p.setProbabilityLevel(0.95);

pwgt = p.estimateFrontier;

disp(pwgt);
  Columns 1 through 7

    0.8454    0.6847    0.5151    0.3541    0.1902    0.0314    0.0000
    0.0599    0.1427    0.2302    0.3165    0.3980    0.4734    0.3513
    0.0462    0.0639    0.0945    0.1079    0.1345    0.1581    0.1756
    0.0485    0.1087    0.1602    0.2215    0.2773    0.3371    0.4731

  Columns 8 through 10

    0.0000         0    0.0000
    0.1806         0    0.0000
    0.1916    0.2212    0.0000
    0.6278    0.7788    1.0000

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

Obtain Purchases and Sales for Portfolios on the Efficient Frontier

Starting from the initial portfolio, the estimateFrontier method returns purchases and sales to get from your initial portfolio to each efficient portfolio on the efficient frontier. Given an initial portfolio in pwgt0, you can obtain purchases and sales.

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 ];
m = m/12;
C = C/12;

rng(11);

AssetScenarios = mvnrnd(m, C, 20000);
p = PortfolioCVaR;
p = p.setScenarios(AssetScenarios);
p = p.setDefaultConstraints;
p = p.setProbabilityLevel(0.95);

pwgt0 = [ 0.3; 0.3; 0.2; 0.1 ];
p = p.setInitPort(pwgt0);
[pwgt, pbuy, psell] = p.estimateFrontier;

display(pwgt);
display(pbuy);
display(psell);
pwgt =

  Columns 1 through 7

    0.8454    0.6847    0.5151    0.3541    0.1902    0.0314    0.0000
    0.0599    0.1427    0.2302    0.3165    0.3980    0.4734    0.3513
    0.0462    0.0639    0.0945    0.1079    0.1345    0.1581    0.1756
    0.0485    0.1087    0.1602    0.2215    0.2773    0.3371    0.4731

  Columns 8 through 10

    0.0000         0    0.0000
    0.1806         0    0.0000
    0.1916    0.2212    0.0000
    0.6278    0.7788    1.0000


pbuy =

  Columns 1 through 7

    0.5454    0.3847    0.2151    0.0541         0         0         0
         0         0         0    0.0165    0.0980    0.1734    0.0513
         0         0         0         0         0         0         0
         0    0.0087    0.0602    0.1215    0.1773    0.2371    0.3731

  Columns 8 through 10

         0         0         0
         0         0         0
         0    0.0212         0
    0.5278    0.6788    0.9000


psell =

  Columns 1 through 7

         0         0         0         0    0.1098    0.2686    0.3000
    0.2401    0.1573    0.0698         0         0         0         0
    0.1538    0.1361    0.1055    0.0921    0.0655    0.0419    0.0244
    0.0515         0         0         0         0         0         0

  Columns 8 through 10

    0.3000    0.3000    0.3000
    0.1194    0.3000    0.3000
    0.0084         0    0.2000
         0         0         0

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

See Also

| | |

More About

Was this topic helpful?