exposureprofiles
Compute exposure profiles from credit exposures
Syntax
Description
computes common counterparty credit exposures profiles from an array of exposures. profilestructs
= exposureprofiles(dates
,exposures
)
adds optional name-value arguments.profilestructs
= exposureprofiles(___,Name,Value
)
Examples
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.
Load the data (ccr.mat
) that contains 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=5×1 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
dates
— Simulation dates
vector of date numbers | cell array of character vectors
Simulation dates, specified as vector of date numbers or a cell array of character
vectors in a known date format. For more information for known date formats, see the
function datetime
.
Data Types: double
| char
| cell
exposures
— 3-D array of potential losses due to counterparty default
array
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 Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: profilestructs =
exposureprofiles(dates,exposures,'ProfileSpec','PFE','PFEProbabilityLevel',.9)
ProfileSpec
— Exposure profiles
All
(generate all profiles) (default) | character vector with possible values EE
, PFE
, MPE
, EffEE
, EPE
, EffEPE
, All
| cell array of character vectors with possible values EE
,
PFE
, MPE
, EffEE
,
EPE
, EffEPE
Exposure profiles, specified as a character vector or cell array of character vectors with the following possible values:
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 datesEffEE
— 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 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
profilestructs
— Structure of credit exposure profiles
array 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 profile. 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
[1] Basel II: International Convergence of Capital Measurement and Capital
Standards: A Revised Framework - Comprehensive Version. at https://www.bis.org/publ/bcbs128.htm
, 2006.
Version History
Introduced in R2014a
See Also
Topics
- Counterparty Credit Risk and CVA (Financial Instruments Toolbox)
- Wrong Way Risk with Copulas (Financial Instruments Toolbox)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)