Documentation Center

  • Trial Software
  • Product Updates

exposureprofiles

Compute exposure profiles from credit exposures

Syntax

  • profilestructs = exposureprofiles(dates,exposures) example
  • profilestructs = exposureprofiles(___,Name,Value)

Description

example

profilestructs = exposureprofiles(dates,exposures) computes common counterparty credit exposures profiles from an array of exposures.

profilestructs = exposureprofiles(___,Name,Value) computes common counterparty credit exposures profiles from an array of exposures using optional name-value pair arguments.

Examples

expand all

View Exposure Profiles of a Particular Counterparty

After computing the mark-to-market contract values for a portfolio of swaps over many scenarios, view the exposure profiles of a particular counterparty.

First, load data containing the mark-to-market contract values for a portfolio of swaps over many scenarios.

load ccr.mat

Compute the exposure by counterparty.

[exposures, expcpty] = creditexposures(values,swaps.Counterparty,...
'NettingID',swaps.NettingID);

Compute the credit exposure profiles for all counterparties.

 cpProfiles = exposureprofiles(simulationDates,exposures)
cpProfiles = 

5x1 struct array with fields:

    Dates
    EE
    PFE
    MPFE
    EffEE
    EPE
    EffEPE

Visualize the exposure profiles for a particular counterparty.

cpIdx = find(expcpty == 4);
numDates = numel(simulationDates);
plot(simulationDates,cpProfiles(cpIdx).PFE,...
        simulationDates,cpProfiles(cpIdx).MPFE * ones(numDates,1),...
        simulationDates,cpProfiles(cpIdx).EE,...
        simulationDates,cpProfiles(cpIdx).EPE * ones(numDates,1),...
        simulationDates,cpProfiles(cpIdx).EffEE,...
        simulationDates,cpProfiles(cpIdx).EffEPE * ones(numDates,1));
legend({'PFE (95%)','Max PFE','Exp Exposure (EE)',...
        'Time-Avg EE (EPE)','Max past EE (EffEE)',...
        'Time-Avg EffEE (EffEPE)'})
datetick('x','mmmyy','keeplimits')
title(sprintf('Counterparty %d Exposure Profiles',cpIdx));
ylabel('Exposure ($)')
xlabel('Simulation Dates')

Input Arguments

expand all

dates — Simulation datesvector of date numbers | cell array of date strings

Simulation dates, specified as vector of date numbers or a cell array of string dates in a known format. For more information for known date formats, see the function datenum.

Data Types: char | cell

exposures — 3-D array of potential losses due to counterparty defaultarray

3-D array of potential losses due to counterparty default on a set of instruments simulated over a series of simulation dates and across many scenarios, specified as a NumDates-by-NumCounterParties-by-NumScenarios "cube" of credit exposures. Each row represents a different simulation date, each column a different counterparty, and each "page" is a different scenario from a Monte-Carlo simulation.

Data Types: double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: profilestructs = exposureprofiles(dates,exposures,'ProfileSpec','PFE','PFEProabilityLevel','.9')

'ProfileSpec' — Exposure profilesAll (generate all profiles) (default) | string with possible values EE, PFE, MPE, EffEE, EPE, EffEPE, All | cell array with possible values EE, PFE, MPE, EffEE, EPE, EffEPE

Exposure profiles, specified as a string or cell array with the following possible valuess:

  • EE — Expected Exposure. The mean of the distribution of exposures at each date. A [NumDates-by-1] vector.

  • PFE — Potential Future Exposure. A high percentile (default 95%) of the distribution of possible exposures at each date. This is sometimes referred to as "Peak Exposure." A [NumDates-by-1] vector.

  • MPFE — Maximum Potential Future Exposure. The maximum potential future exposure (PFE) over all dates

  • EffEE — Effective Expected Exposure. The maximum expected exposure (at a specific date) that occurs at that date or any prior date. This is the expected exposure, but constrained to be nondecreasing over time. A [NumDates-by-1] vector.

  • EPE — Expected Positive Exposure. The weighted average over time of expected exposures. A scalar.

  • EffEPE — Effective Expected Positive Exposure. The weighted average over time of the effective expected exposure (EffEE). A scalar.

  • All — Generate all of the previous profiles.

    Note:   Exposure profiles are computed on a per-counterparty basis.

Data Types: char | cell

'PFEProbabilityLevel' — Level for potential future exposure (PFE) and maximum potential future exposure (MPFE).95 (the 95th percentile) (default) | scalar with value [0..1]

Level for potential future exposure (PFE) and maximum potential future exposure (MPFE), specified as a scalar with value [0..1].

Data Types: double

Output Arguments

expand all

profilestructs — Structure of credit exposure profilesarray of structs holding credit exposure profiles for each counterparty

Structure of credit exposure profiles, returned as an array of structs holding credit exposure profiles for each counterparty, returned as a struct, with the fields of the struct as the (abbreviated) names of every exposure profiles. Profiles listed in the ProfileSpec (and their related profiles) are populated, while those not requested contain empty ([]). profilestructs contains the dates information as a vector of MATLAB® date numbers requested in the ProfileSpec argument.

References

Basel II: International Convergence of Capital Measurement and Capital Standards: A Revised Framework - Comprehensive Version at http://www.bis.org/publ/bcbs128.htm, 2006.

See Also

|

Was this topic helpful?