estimatePortVaR

Class: PortfolioCVaR

Estimate value-at-risk for PortfolioCVaR object

Syntax

pvar = estimatePortVaR(obj,pwgt)

Description

pvar = estimatePortVaR(obj,pwgt) estimates the value-at-risk for PortfolioCVaR object, where the probability level used is from the PortfolioCVaR property ProbabilityLevel.

Tips

You can also use dot notation to estimate the value-at-risk of PortfolioCVaR object.

pvar = obj.estimatePortVaR(pwgt);

Input Arguments

obj

CVaR portfolio object [PortfolioCVaR].

pwgt

Collection of portfolios [NumAssets-by-NumPorts matrix] where NumAssets is the number of asset in the universe and NumPorts is the number of portfolios in the collection of portfolios.

Output Arguments

pvar

Estimates for value-at-risk of portfolio returns for each portfolio in pwgt [NumPorts vector].

Attributes

Accesspublic
Staticfalse
Hiddenfalse

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

Examples

expand all

Estimate Value-at-Risk for Portfolio

Given a portfolio pwgt, use the estimatePortVaR method to estimate the value-at-risk of 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);

pvar = estimatePortVaR(p, pwgt);
disp(pvar)
    0.0314
    0.1483

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.

Was this topic helpful?