This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

setProbabilityLevel

Set probability level for VaR and CVaR calculations

Syntax

obj = setProbabilityLevel(obj,ProbabilityLevel)

Description

example

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.

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)

Introduced in R2012b