Main Content

addOnChart

Generate add-on chart

Since R2024b

Description

addOnChart(saccrObj) creates a chart of portfolio add-on values. Each aggregate add-on value can be decomposed into contributions from the individual asset classes:

  • Interest rate (IR)

  • Foreign exchange (FX)

  • Credit (CR)

  • Equity (EQ)

  • Commodity (CO)

The final aggregate add-on values are selected between the uncollateralized and collateralized values to minimize exposure-at-default (EAD).

example

addOnChart(saccrObj,Name=Value) creates a chart of portfolio add-on values using optional name-value arguments.

example

h = addOnChart(saccrObj,___) additionally returns the figure handle h for the add-on chart.

example

h = addOnChart(ax,saccrObj,___) creates the add-on chart on the axes specified by ax and returns the figure handle h for the chart.

example

Examples

collapse all

Use addOnChart to create a SA-CCR chart for portfolio add-on values. Each aggregate add-on value can be decomposed into contributions from the individual asset classes:

  • Interest rate (IR)

  • Foreign exchange (FX)

  • Credit (CR)

  • Equity (EQ)

  • Commodity (CO)

The final aggregate add-on values are selected between the uncollateralized and collateralized values to minimize EAD.

Create saccr Object

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

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

Define the ISDA® SA-CCR CRIF filename.

SACCRCRIF = "SACCR_CRIF_Ports_1_to_9.csv";

Use saccr to create a saccr object using the SA-CCR CRIF file.

mySACCR = saccr(SACCRCRIF,DomesticCurrency="USD",FXSpot=FXSpotTable)
mySACCR = 
  saccr with properties:

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

Generate Add-On Charts

Use addOnChart to generate the charts. Specify "final" for Style to plot the bar chart for the final aggregate add-on values.

addOnChart(mySACCR,Style="final"); 
ax = gca;
ax.YAxis.Exponent = 0;
ytickformat('%.0f')

Figure contains an axes object. The axes object with title Final Aggregate Add-Ons, xlabel Portfolio IDs, ylabel USD contains an object of type bar. This object represents Final Aggregate Add-On.

Specify "breakdown" for Style to stack the bar graphs for the add-on contributions from the individual asset classes (IR, FX, CR, EQ, CO).

addOnChart(mySACCR,Style="breakdown"); 
ax = gca;
ax.YAxis.Exponent = 0;
ytickformat('%.0f')

Figure contains an axes object. The axes object with title Add-On Contribution Breakdown, xlabel Portfolio IDs, ylabel USD contains 5 objects of type bar. These objects represent IR Add-On, FX Add-On, CR Add-On, EQ Add-On, CO Add-On.

Specify "comparison" for Style to overlay the uncollateralized and collateralized aggregate add-on bar graphs on top of the final aggregate add-on bar graphs. If there is no collateralization, collateralized values are the same as uncollateralized values.

f = figure;
addOnChart(mySACCR,Style="comparison")
f.Position(3:4) = f.Position(3:4).*1.2;
ax = gca;
ax.YAxis.Exponent = 0;
ytickformat('%.0f')

Figure contains an axes object. The axes object with title Final, Uncollateralized and Collateralized Aggregate Add-Ons, xlabel Portfolio IDs, ylabel USD contains 3 objects of type bar. These objects represent Final Aggregate Add-On, Uncollateralized Aggregate Add-On, Collateralized Aggregate Add-On.

Plot a subset of portfolios using the IDs name-value argument.

figure
addOnChart(mySACCR,Style="breakdown", ...
    IDs=["Port_002","Port_004","Port_006","Port_008"])
ax = gca;
ax.YAxis.Exponent = 0;
ytickformat('%.0f')

Figure contains an axes object. The axes object with title Add-On Contribution Breakdown, xlabel Portfolio IDs, ylabel USD contains 5 objects of type bar. These objects represent IR Add-On, FX Add-On, CR Add-On, EQ Add-On, CO Add-On.

Specify Parent to create an add-on chart on the axes specified by the optional ax argument.

f = figure;
ax = newplot(f);
addOnChart(mySACCR,Parent=ax)
ax = gca;
ax.YAxis.Exponent = 0;
ytickformat('%.0f')

Figure contains an axes object. The axes object with title Final Aggregate Add-Ons, xlabel Portfolio IDs, ylabel USD contains an object of type bar. This object represents Final Aggregate Add-On.

Input Arguments

collapse all

SA-CCR object, specified as a saccr object. You create a saccr object using saccr.

Data Types: object

(Optional) Valid axes object in which to display the add-on chart specified as an ax object that you create using axes. The add-on chart is created on the axes specified by the optional ax argument instead of on the current axes (gca). The optional argument ax can precede any of the input argument combinations.

Data Types: object

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.

Example: addOnChart(mySACCR,Style="comparison")

Style of add-on bar chart, specified as a scalar string with one of the following values:

  • "final" — Plot the bar chart for the final aggregate add-on values.

  • "comparison" — Overlay the uncollateralized and collateralized aggregate add-on bar graphs on top of the final aggregate add-on bar graphs. If there is no collateralization, collateralized values are the same as uncollateralized values.

  • "breakdown" — Stack the bar graphs for the add-on contributions from the individual asset classes (IR, FX, CR, EQ, CO).

Data Types: string

List of portfolio IDs to plot, specified as a scalar string or string vector.

Data Types: string

Scalar parent in which to plot, specified as an Axes object using ax.

Data Types: object

Output Arguments

collapse all

Figure handle for the add-on chart, returned as a handle object. You can use h to access and change the properties of the chart.

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. "CRE22- Standardised Approach: Credit Risk Migration." November 2020. Available at 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. Available at https://www.bis.org/publ/bcbs279.pdf.

Version History

Introduced in R2024b

See Also

| | | | | |