Accelerating the pace of engineering and science

# estimatePortRisk

Estimate mean-absolute deviation (MAD) for portfolio risk proxy

## Syntax

prsk = estimatePortRisk(obj,pwgt)

## Description

prsk = estimatePortRisk(obj,pwgt) estimates the mean-absolute deviation of portfolio returns (portfolio risk proxy).

## Tips

You can also use dot notation to estimate mean-absolute deviation of portfolio returns (portfolio risk proxy).

`prsk = obj.estimatePortRisk(pwgt);`

## Input Arguments

 obj MAD portfolio object [PortfolioMAD]. 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 mean-absolute deviation 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

### Mean-Absolute Deviation Returns as the Proxy for Portfolio Risk

Given a portfolio pwgt, use the estimatePortRisk method to show the mean-absolute deviation 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 = setScenarios(p, AssetScenarios);
p = setDefaultConstraints(p);

pwgt = estimateFrontierLimits(p);
prsk = estimatePortRisk(p, pwgt);
disp(prsk)
```
```    0.0177
0.0809

```

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.