Main Content

Portfolio

Create Portfolio object for use with saccr object

Since R2024a

Description

Create a Portfolio object using this workflow:

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

    The ISDA SA-CCR Common Risk Interchange Format (CRIF) file 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 Portfolio to create a Portfolio 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

mySACCRPortfolio = saccr.Portfolio creates a Portfolio object and sets the properties to their default values.

example

mySACCRPortfolio = saccr.Portfolio(Name=Value) sets the properties to different values by using name-value argument syntax. For example, mySACCRPortfolio = saccr.Portfolio(ID="Port_086",CounterpartyID=1003,Trades=saccr_trade_object,NettingSets=saccr_netting_set_object) creates a Portfolio object. You can specify multiple name-value arguments.

example

Properties

expand all

This property is read-only.

Portfolio ID, returned as a scalar string.

Data Types: string

This property is read-only.

Counterparty ID, returned as a scalar string.

Data Types: string

This property is read-only.

Trade objects, returned as a NumTrades-by-1 vector.

Data Types: object

This property is read-only.

NettingSet objects, returned as a NumNettingSets-by-1 vector.

Data Types: object

This property is read-only.

Asset classes in trades, returned as a NumAssetClasses-by-1 vector.

Data Types: string

This property is read-only.

Hedging sets in trades, returned as a NumHedgingSets-by-1 vector.

Data Types: string

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.Portfolio object contained in the saccr.Portfolios 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 properties for a specific portfolio contained in the mySACCR.Portfolios object.

mySACCR.Portfolios(1)
ans = 
  Portfolio with properties:

                ID: "Port_007"
    CounterpartyID: ""
            Trades: [7x1 saccr.Trade]
       NettingSets: [1x1 saccr.NettingSet]
      AssetClasses: [7x1 string]

You can also display the AssetClasses contained in portfolio 1.

mySACCR.Portfolios(1).AssetClasses
ans = 7x1 string
    "CO"
    "CR_IX"
    "CR_SN"
    "EQ_IX"
    "EQ_SN"
    "FX"
    "IR"

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