Main Content

saccr

Create saccr object to support ISDA SA-CCR workflows for credit risk

Since R2024a

Description

Create a saccr object using this workflow:

  1. Create a SA-CCR CRIF file.

    The ISDA® SA-CCR Common Risk Interchange Format (CRIF) is a standardized format developed by the International Swaps and Derivatives Association (ISDA) for reporting counterparty credit risk exposures under the Standardized Approach for Counterparty Credit Risk (SA-CCR) framework. For more information on creating an ISDA SA-CCR CRIF file, see ISDA SA-CCR CRIF File Specifications. SA-CCR functionality meets ISDA benchmarks for use in the saccr object.

  2. Create a saccr object

    Use saccr to create a saccr object. The following objects are contained in the saccr object: Portfolio, NettingSet, CollateralSet, CollateralPosition, and Trade. For more information, see saccr Object Structure and SA-CCR Transactional Elements.

  3. Use saccr object functions.

    Use the following functions to calculate replacement cost (RC), add-ons, potential future exposure (PFE), and exposure at default (EAD):

  4. Aggregate EADs.

    After using addOn and ead, you can use aggregate to aggregate add-ons over all asset classes or EADs over all portfolios.

    After using ead, you can use the aggregateByCounterparty to aggregate EADs by counterparty.

For more information on this workflow and a list of examples, see SA-CCR Transactional Elements and Framework for Standardized Approach to Calculating Counterparty Credit Risk: Introduction.

Creation

Description

example

mySACCR = saccr(SACCRCRIF) creates a saccr object and sets the properties. The saccr object provides an object-based framework that supports Basel-compliant, International Swaps and Derivatives Association (ISDA) workflows for calculating the capital banks must hold to cover the risk that a derivative's trading partner will fail to pay its obligation.

example

mySACCR = saccr(___,Name=Value) sets optional properties using name-value arguments in addition to the required argument in the previous syntax. For example, mySACCR = saccr("SACCR_CRIF.xlsx",Alpha=1.3,DomesticCurrency="EUR",MaturityBusinessDaysFloor=7,NumBusinessDaysYear=255) creates a saccr object. You can specify multiple name-value arguments.

Input Arguments

expand all

ISDA SA-CCR Common Risk Interchange Format (CRIF) data, specified as a string.

The ISDA SA-CCR CRIF file facilitates the exchange of counterparty credit risk information between market participants and regulatory authorities. It provides a structured and consistent format for reporting key data elements related to derivative transactions and their associated counterparty credit risk.

The ISDA SA-CCR CRIF file typically includes information such as:

  • Trade-level data — This data includes details about the derivative contracts, such as trade identifiers, product type, adjusted notional amount, maturity, and valuation.

  • Counterparty data — This data includes information about the counterparties involved in the transactions, such as legal entity identifiers (LEIs), names, addresses, and credit ratings.

  • Risk data — This data includes data related to the calculation of counterparty credit risk, such as supervisory deltas and netting sets.

  • Collateral data — This data includes information about any collateral posted or received in relation to the derivative transactions, such as collateral type, amount, and haircuts.

The ISDA SA-CCR CRIF file is based on industry-standard data formats, such as eXtensible Markup Language (XML) or comma-separated values (CSV). It follows a predefined schema that specifies the structure and data elements required for reporting counterparty credit risk exposures under the SA-CCR framework.

By using the ISDA SA-CCR CRIF file, market participants and regulatory authorities can efficiently exchange and analyze counterparty credit risk information, enabling better risk management and regulatory compliance.

For more information on creating an ISDA SA-CCR CRIF file, see ISDA SA-CCR CRIF File Specifications.

Data Types: string

Name-Value Arguments

Specify required and 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.

Example: mySACCR = saccr("SACCR_CRIF.xlsx",Alpha=1.3,DomesticCurrency="EUR",MaturityBusinessDaysFloor=7,NumBusinessDaysYear=255)

Alpha value for each portfolio EAD, specified as a scalar nonnegative value or a NumPortfolios-by-1 nonnegative numeric vector.

Data Types: double

Indicator for domestic currency, specified as a scalar string for the three-letter ISO currency code.

Data Types: string

Spot foreign exchange rates, specified as a table with the following columns:

  • Base — String vector for base currencies (["AUD";"EUR";…])

  • Quote — String vector for quote currencies (["AUD";"EUR";…])

  • SpotRate — Numeric vector for spot exchange rates([0.8;1.2;…])

Data Types: table

Preferred input variant 1a or 1b for trade adjusted notionals for each asset, specified as a 5-by-1 vector of strings for each asset class in the following order:

  1. IR — Interest rate

  2. CR — Credit

  3. EQ — Equity

  4. CO — Commodity

  5. FX — Foreign exchange

InputVariants sets the TradeDecompositions property. The trade decompositions input variants can be only either 1a or 1b:

  • 1a — Single data input

    For example, an interest-rate cap trade's adjusted notional is represented in a single set of input data as a single instrument. In the SA-CCR CRIF file, this input variant has a trade ID that does not end with an underscore followed by a number (for example, "Tr071").

  • 1b — Decomposed data inputs

    For example, an interest rate cap trade's adjusted notional is represented in multiple sets of input data that are decomposed into individual caplets. In the SA-CCR CRIF file, this input variant has trade IDs that end with an underscore followed by a number (for example, "Tr071_01", "Tr071_02", and so on).

Note

If the SA-CCR CRIF file contains data for both input variants for a trade, the specified input variant will be chosen. If the specified input variant is not present in the SA-CCR CRIF file, whichever input variant that is in the SA-CCR CRIF file applies to the trade.

Data Types: string

Minimum number of business days remaining in maturity, specified as a scalar numeric.

Data Types: double

Number of business days in a year in relation to maturity times and margin period of risk (MPOR), specified as a scalar numeric.

Data Types: double

Properties

expand all

This property is read-only.

ISDA SA-CCR CRIF data, returned as a table.

Data Types: table

This property is read-only.

Number of portfolios, returned as a scalar numeric.

Data Types: double

This property is read-only.

Portfolio IDs, returned as a NumPortfolios-by-1 string vector.

Data Types: string

This property is read-only.

Counterparty IDs, returned as a NumPortfolios-by-1 string vector.

Data Types: string

This property is read-only.

Portfolio objects, returned as a NumPortfolios-by-1 vector of objects. For more information, see Portfolio.

Data Types: object

This property is read-only.

Indicator of Basel regulation, returned as scalar string with a value of "Basel_CRE52".

Data Types: string

This property is read-only.

Indicator for domestic currency, returned as a scalar string for the three-letter ISO currency code.

Data Types: string

This property is read-only.

Alpha value for each portfolio EAD, returned as a scalar nonnegative value or a NumPortfolios-by-1 nonnegative numeric vector.

Data Types: double

This property is read-only.

Spot foreign exchange rates, returned as a table with the following columns:

  • Base — String vector for base currencies (["AUD";"EUR";…])

  • Quote — String vector for quote currencies (["AUD";"EUR";…])

  • SpotRate — Numeric vector for spot exchange rates([0.8;1.2;…])

Data Types: table

This property is read-only.

Preferred trade adjusted notional input variants for each asset class, returned as a table in the following order:

  1. IR — Interest rate

  2. CR — Credit

  3. EQ — Equity

  4. CO — Commodity

  5. FX — Foreign exchange

Data Types: table

This property is read-only.

Supervisory collateral haircuts for each collateral position instrument type, returned as a table.

Data Types: table

This property is read-only.

Supervisory parameter data, returned as a table that includes:

  • Supervisory factors

  • Supervisory correlations

  • Supervisory option volatilities

Data Types: table

This property is read-only.

Minimum number of business days remaining in maturity, returned as a scalar numeric.

Data Types: double

This property is read-only.

umber of business days in a year in relation to maturity times and margin period of risk (MPOR), returned as a scalar numeric.

Data Types: double

Object Functions

rcCalculate complete replacement cost (RC) for each portfolio
addOnCalculate add-ons aggregated from all asset classes for each portfolio
pfeCalculate potential future exposure (PFE) for each portfolio
eadCalculate exposure at default (EAD) value for each portfolio

Examples

collapse all

Use an ISDA® SA-CCR Common Risk Interchange Format (CRIF) data file to create a saccr object. You can use the saccr object and the associated object functions for reporting counterparty credit risk exposures under the Standardized Approach for Counterparty Credit Risk (SA-CCR) framework.

SACCRCRIF = "SACCR_CRIF_Ports_7_8_9.csv";
mySACCR = saccr(SACCRCRIF)
mySACCR = 
  saccr with properties:

                         CRIF: [42×19 table]
                NumPortfolios: 3
                 PortfolioIDs: [3×1 string]
              CounterpartyIDs: [3×1 string]
                   Portfolios: [3×1 saccr.Portfolio]
                   Regulation: "Basel_CRE52"
             DomesticCurrency: "USD"
                        Alpha: [3×1 double]
                  FXSpotRates: [0×0 table]
          TradeDecompositions: [5×2 table]
           CollateralHaircuts: [200×6 table]
        SupervisoryParameters: [19×7 table]
    MaturityBusinessDaysFloor: 10
          NumBusinessDaysYear: 250

You can then use the rc, addOn, pfe, and ead functions with the saccr object.

Use an ISDA® SA-CCR Common Risk Interchange Format (CRIF) data file to create a saccr object and then find the results for a specific PortfolioID ("Port_008").

Define the foreign exchange (FX) spot currency exchange rate table.

format("default");
Base = ["EUR";"GBP";"GBP"];
Quote = ["USD";"USD";"EUR"];
SpotRate = [1.0543;1.2195;1.1567];
FXSpotTable = table(Base,Quote,SpotRate);
format bank;

The SA-CCR CRIF data file (SACCR_CRIF_Ports_7_8_9.csv) contains the following portfolios:

Portfolio 7 (Port_007)

  • Trades

Tr001 — (Asset class IR) 10 Year Interest Rate Swap in EUR

Tr002 — (Asset class FX) EUR/GBP Forward FX Swap (Trade Decomposition "1b")

Tr003 — (Asset class CR_SN) Single name CDS on Spain (Short Protection)

Tr004 — (Asset class CR_IX) CDS iTraxx Europe Crossover Index Receiver Option

Tr005 — (Asset class EQ_SN) Long Call Option on AAPL

Tr006 — (Asset class EQ_IX) Long Put Option on S&P500 Index

Tr007_SOpt — (Asset class CO) Long Put Option on CORN (sold option with premium paid)

  • Netting Sets — N001

  • Collateral Sets

Collateral Set ID — CSA01

Direction — MUTUAL

Margin Period of Risk (MPOR) — 10 days

Minimum Transfer Amount (MTA) — 0

Threshold Amount (TA) — 0

  • Collateral Positions

ColPos01 — (CASH, Domestic Currency, Variation Margin)

ColPos02 — (CASH, Foreign Currency, Variation Margin)

ColPos03 — (BOND, Sovereign AAA, Initial Margin

Portfolio 8 (Port_008)

  • Trades

Tr008 — (Asset class EQ_IX) Long Variance Swap on EURO STOXX 50 (EQUITY_VOL trade)

Tr009 — (Asset class IR) 10 Year FedFunds / 3M SOFR Basis Swap (USD_BASIS trade)

  • Netting Sets — N002

  • Collateral Sets

Collateral Set ID — CSA02

Direction — MUTUAL

Margin Period of Risk (MPOR) — 20 days

Minimum Transfer Amount (MTA) — 100000 USD

Threshold Amount (TA) — 1000000 USD

  • Collateral Positions

ColPos04 — (EQUITY, Main Index, Variation Margin)

ColPos05 — (GOLD, Initial Margin)

Portfolio 9 (Port_009)

  • Trades

Tr010 — (Asset class CO) Short WTI Crude Futures Put Option

Tr011 — (Asset class CO) Long Gold Futures Call Option

Tr012 — (Asset class CO) Long Bitcoin Futures Call Option

  • Netting Sets — N003

  • Collateral Sets

Collateral Set ID — CA03

Direction — MUTUAL

Margin Period of Risk (MPOR) — 10 days

Minimum Transfer Amount (MTA) — 50000 USD

Threshold Amount (TA) — 500000 USD

  • Collateral Positions — None

  • Counterparty ID — Exchange

Create a saccr object using the data file SACCR_CRIF_Ports_7_8_9.csv.

SACCRCRIF = "SACCR_CRIF_Ports_7_8_9.csv";
mySACCR = saccr(SACCRCRIF)
mySACCR = 
  saccr with properties:

                         CRIF: [42×19 table]
                NumPortfolios: 3.00
                 PortfolioIDs: [3×1 string]
              CounterpartyIDs: [3×1 string]
                   Portfolios: [3×1 saccr.Portfolio]
                   Regulation: "Basel_CRE52"
             DomesticCurrency: "USD"
                        Alpha: [3×1 double]
                  FXSpotRates: [0×0 table]
          TradeDecompositions: [5×2 table]
           CollateralHaircuts: [200×6 table]
        SupervisoryParameters: [19×7 table]
    MaturityBusinessDaysFloor: 10.00
          NumBusinessDaysYear: 250.00

Compute exposure-at-default (EAD) results using the object function ead.

EADResults = ead(mySACCR)
EADResults = 
  EADResults with properties:

       NumPortfolios: 3.00
        PortfolioIDs: [3×1 string]
     CounterpartyIDs: [3×1 string]
          Regulation: "Basel_CRE52"
    DomesticCurrency: "USD"
                 EAD: [3×1 double]
               Alpha: [3×1 double]
                  RC: [3×1 double]
                 PFE: [3×1 double]
          Multiplier: [3×1 double]
      AddOnAggregate: [3×1 double]
           RCResults: [1×1 saccr.RCResults]
          PFEResults: [1×1 saccr.PFEResults]
        ResultsTable: [3×17 table]

Specify the PortfolioID for "Port_008".

PortoflioID = "Port_008";
Idx = strcmpi(mySACCR.PortfolioIDs,PortoflioID);

Find the SA-CCR Portfolio object for PortfolioID "Port_008".

PortfolioObj = mySACCR.Portfolios(Idx)
PortfolioObj = 
  Portfolio with properties:

                ID: "Port_008"
    CounterpartyID: ""
            Trades: [2×1 saccr.Trade]
       NettingSets: [1×1 saccr.NettingSet]
      AssetClasses: [2×1 string]
       HedgingSets: [2×1 string]

Find the SA-CCR results for the PortfolioID "Port_008".

PortfolioEADResultsTable = EADResults.ResultsTable(Idx,:)
PortfolioEADResultsTable=1×17 table
    PortfolioIDs    CounterpartyIDs     Regulation      DomesticCurrency       EAD        Alpha        RC           PFE       Multiplier    AddOnAggregate    AddOnIR     AddOnFX    AddOnCR     AddOnEQ     AddOnCO    Collateralized    UsedCollateral
    ____________    _______________    _____________    ________________    __________    _____    __________    _________    __________    ______________    ________    _______    _______    _________    _______    ______________    ______________

     "Port_008"           ""           "Basel_CRE52"         "USD"          2360845.21    1.40     1155548.94    530769.06       1.00         530769.06       83467.45     0.00       0.00      447301.61     0.00          true              true      

More About

expand all

References

[1] Bank for International Settlements. "CRE52 - Standardised Approach to Counterparty Credit Risk." June 2020. Available at: https://www.bis.org/basel_framework/chapter/CRE/52.htm.

[2] Bank for International Settlements. "CRE51 - Counterparty Credit Risk Overview." January 2022. Available at: https://www.bis.org/basel_framework/chapter/CRE/51.htm.

[3] Bank for International Settlements. "CRE22- Standardised Approach: Credit Risk Migration." November 2020. Available at: https://www.bis.org/basel_framework/chapter/CRE/22.htm.

[4] Bank for International Settlements. "Basel Committee on Banking Supervision: The Standardised Approach for Measuring Counterparty Credit Risk Exposures." April 2014. Available at: https://www.bis.org/publ/bcbs279.pdf.

Version History

Introduced in R2024a