Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

setProbabilityLevel

Set probability level for VaR and CVaR calculations

Use the setProbabilityLevel function with a PortfolioCVaR object to set probability level for VaR and CVaR calculations.

For details on the workflow, see PortfolioCVaR Object Workflow.

Syntax

obj = setProbabilityLevel(obj,ProbabilityLevel)

Description

example

obj = setProbabilityLevel(obj,ProbabilityLevel) sets probability level for VaR and CVaR calculations for a PortfolioCVaR object.

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

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

Was this topic helpful?