Main Content

Trade

Trade object for use with saccr object

Since R2024a

Description

Create a Trade object using this workflow:

  1. Create the ISDA® SA-CCR CRIF file.

    The ISDA SA-CCR Common Risk Interchange Format (CRIF) is a standardized file 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.

  2. Use saccr to create a saccr object.

  3. Use Trade to create a Trade object.

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

Creation

Description

mySACCRTrade = saccr.Trade creates a Trade object and sets the properties.

example

mySACCRTrade = saccr.Trade(Name=Value) sets the properties to different values by using name-value argument syntax. For example, mySACCRTrade = saccr.Trade(ID="CSA07",NettingSetID=N1003,CollateralSetID=CS087,AssetClass="CR_IX",SubClass="IG",HedgingSet="Hedge_Set_03",Qualifier="CDS",AdjustedNotional=13000,AdjustedNotionalCurrency="EUR",AdjustedNotionalUSD=15000,PV=14000,PVCurrency="EUR",PVUSD=16000,StartTime=datetime(10,1,2023),EndTime=datetime(10,1,2025),MaturityTime=2,SuperisotyDelta=500,SoldOption=true) creates a Trade object. You can specify multiple name-value arguments.

example

Properties

expand all

This property is read-only.

Trade ID, returned as a scalar string.

Data Types: string

This property is read-only.

Netting set ID, returned as a scalar string.

Data Types: string

This property is read-only.

Collateral set ID, returned as a scalar string.

Data Types: string

This property is read-only.

Collateral position asset type, returned as a scalar string.

Data Types: string

This property is read-only.

Sub asset class for given AssetClass, returned as a scalar string.

Data Types: string

This property is read-only.

Hedging sets, returned as a scalar string or an NumComponents-by-1 string vector.

Data Types: string

This property is read-only.

Risk factor of trade, returned as a scalar string or an NumComponents-by-1 string vector.

Data Types: string

This property is read-only.

Adjusted notional value of trade in currency specified in AdjustedNotionalCurrency, returned as a scalar or an NumComponents-by-1 numeric vector.

Data Types: double

This property is read-only.

Indicator of currency specified in AdjustedNotional, returned as a scalar or an NumComponents-by-1 three-letter ISO currency code.

Data Types: double

This property is read-only.

Adjusted notional value of the trade in US dollars, returned as a scalar or an NumComponents-by-1 numeric.

Data Types: double

This property is read-only.

Present mark-to-market value of the trade in currency specified in PVCurrency, returned as a scalar numeric.

Data Types: double

This property is read-only.

Currency of PV, returned as a scalar string.

Data Types: string

This property is read-only.

Present mark-to-market value of the trade in US dollars, returned as a scalar numeric.

Data Types: double

This property is read-only.

Starting reference time parameter "S" in years, returned as a scalar or an NumComponents-by-1 numeric.

Data Types: double

This property is read-only.

Ending reference time parameter "E" in years, returned as a scalar or an NumComponents-by-1 numeric.

Data Types: double

This property is read-only.

Time to maturity parameter "M" in years, returned as a scalar or an NumComponents-by-1 numeric.

Data Types: double

This property is read-only.

Supervisory Delta of trade, returned as a scalar or an NumComponents-by-1 numeric.

Data Types: double

This property is read-only.

Indicator whether trade is sold option where option premium is paid, returned as a scalar logical.

Data Types: logical

Examples

collapse all

Use an ISDA® SA-CCR Common Risk Interchange Format (CRIF) data file to create a saccr object and then display the saccr.Trade object contained in the saccr.Portfolio.Trades property.

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

                         CRIF: [42x19 table]
                NumPortfolios: 3
                 PortfolioIDs: [3x1 string]
              CounterpartyIDs: [3x1 string]
                   Portfolios: [3x1 saccr.Portfolio]
                   Regulation: "Basel_CRE52"
             DomesticCurrency: "USD"
                        Alpha: [3x1 double]
                  FXSpotRates: [0x0 table]
          TradeDecompositions: [5x2 table]
           CollateralHaircuts: [200x6 table]
        SupervisoryParameters: [19x7 table]
    MaturityBusinessDaysFloor: 10
          NumBusinessDaysYear: 250

Display the Portfolios property.

mySACCR.Portfolios
ans=3×1 Portfolio array with properties:
    ID
    CounterpartyID
    Trades
    NettingSets
    AssetClasses
    HedgingSets

You can display the CollateralPositions properties for a specific portfolio contained in the mySACCR.CollateralSet.CollateralPositions object.

mySACCR.Portfolios(1).Trades
ans=7×1 Trade array with properties:
    ID
    NettingSetID
    CollateralSetID
    AssetClass
    SubClass
    HedgingSet
    Qualifier
    AdjustedNotional
    AdjustedNotionalCurrency
    AdjustedNotionalUSD
    PV
    PVCurrency
    PVUSD
    StartTime
    EndTime
    MaturityTime
    SupervisoryDelta
    InputVariant
    SoldOption
    MaturityFactorUncollateralized
    MaturityFactorCollateralized
    MaturityBucket

Also you can display the Trades for a specific trade instance.

mySACCR.Portfolios(1).Trades(1)
ans = 
  Trade with properties:

                                ID: "Tr001"
                      NettingSetID: "N001"
                   CollateralSetID: "CSA01"
                        AssetClass: "IR"
                          SubClass: <missing>
                        HedgingSet: "EUR"
                         Qualifier: "EUR"
                  AdjustedNotional: 3.1478e+07
          AdjustedNotionalCurrency: "EUR"
               AdjustedNotionalUSD: 3.3187e+07
                                PV: -5.6507e+03
                        PVCurrency: "EUR"
                             PVUSD: -5.9575e+03
                         StartTime: 0
                           EndTime: 10
                      MaturityTime: 10
                  SupervisoryDelta: 1
                      InputVariant: "1a"
                        SoldOption: 0
    MaturityFactorUncollateralized: 1
      MaturityFactorCollateralized: 0.3000
                    MaturityBucket: "B3: > 5Y"

More About

expand all

References

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

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

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

Version History

Introduced in R2024a