Accelerating the pace of engineering and science

# estimatePortRisk

Class: PortfolioCVaR

Estimate conditional value-at-risk (CVaR) portfolio risk proxy

## Syntax

prsk = estimatePortRisk(obj,pwgt)

## Description

prsk = estimatePortRisk(obj,pwgt) estimates conditional value-at-risk of portfolio returns (portfolio risk proxy), where the probability level is from the PortfolioCVaR property ProbabilityLevel.

## Tips

You can also use dot notation to estimate conditional value-at-risk of portfolio returns (portfolio risk proxy).

prsk = obj.estimatePortRisk(pwgt);

## Input Arguments

 obj CVaR portfolio object [PortfolioCVaR]. pwgt Collection of portfolios [NumAssets-by-NumPorts matrix] where NumAssets is the number of assets in the universe and NumPorts is the number of portfolios in the collection of portfolios.

## Output Arguments

 prsk Estimate for conditional value-at-risk (CVaR) of portfolio returns for each portfolio in pwgt [NumPorts vector].

## 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

### Conditional Value-at-Risk of Portfolio Returns as the Proxy for Portfolio Risk

Given a portfolio pwgt, use the estimatePortRisk method to show the conditional value-at-risk (CVaR) of portfolio returns for each portfolio.

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 = setScenarios(p, AssetScenarios);
p = setDefaultConstraints(p);
p = setProbabilityLevel(p, 0.95);

pwgt = estimateFrontierLimits(p);
prsk = estimatePortRisk(p, pwgt);
disp(prsk)
0.0407
0.1911

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.