Main Content

setProbabilityLevel

Set probability level for VaR and CVaR calculations

Description

obj = setProbabilityLevel(obj,ProbabilityLevel) sets probability level for VaR and CVaR calculations for a PortfolioCVaR object. For details on the workflow, see PortfolioCVaR Object Workflow.

example

Examples

collapse all

Set the ProbabilityLevel for a CVaR portfolio object.

p = PortfolioCVaR;
p = setProbabilityLevel(p, 0.95);
disp(p.ProbabilityLevel)
    0.9500

Input Arguments

collapse all

Object for portfolio, specified using a PortfolioCVaR object.

For more information on creating a PortfolioCVaR object, see

Data Types: object

Probability level which is 1 minus the probability of losses greater than the value-at-risk, specified as a scalar with value from 0 to 1.

Note

ProbabilityLevel must be a value from 0 to 1 and, in most cases, should be a value from 0.9 to 0.99.

Data Types: double

Output Arguments

collapse all

Updated portfolio object, returned as a PortfolioCVaR object. For more information on creating a portfolio object, see

Tips

You can also use dot notation to set the probability level for VaR and CVaR calculations:

obj = obj.setProbabilityLevel(ProbabilityLevel)

Version History

Introduced in R2012b