Main Content

rcChart

Generate replacement cost (RC) chart

Since R2024b

Description

rcChart(saccrObj) creates a bar chart of portfolio replacement cost (RC) values. The final RC values are selected between the uncollateralized and collateralized values to minimize exposure-at-default (EAD).

example

rcChart(saccrObj,Name=Value) creates a bar chart of portfolio RC values using optional name-value arguments.

example

h = rcChart(saccrObj,___) additionally returns the figure handle h for the RC chart.

example

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

example

Examples

collapse all

Use rcChart to create a SA-CCR chart for portfolio replacement cost (RC) values. The final RC values are selected between the uncollateralized and collateralized values to minimize exposure-at-default (EAD).

Create saccr Object

Define the 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 RC Charts

Use rcChart to generate the charts. Specify "final" for Style to plot the bar chart for the final RC values.

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

Figure contains an axes object. The axes object with title Final RC Values, xlabel Portfolio IDs, ylabel USD contains an object of type bar. This object represents Final RC.

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

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

Figure contains an axes object. The axes object with title Final, Uncollateralized and Collateralized RCs, xlabel Portfolio IDs, ylabel USD contains 3 objects of type bar. These objects represent Final RC, Uncollateralized RC, Collateralized RC.

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

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

Figure contains an axes object. The axes object with title Final, Uncollateralized and Collateralized RCs, xlabel Portfolio IDs, ylabel USD contains 3 objects of type bar. These objects represent Final RC, Uncollateralized RC, Collateralized RC.

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

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

Figure contains an axes object. The axes object with title Final RC Values, xlabel Portfolio IDs, ylabel USD contains an object of type bar. This object represents Final RC.

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 RC chart, specified as an ax object that you create using axes. The RC 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: rcChart(mySACCR,Style="comparison")

Style of RC chart, specified as a scalar string with one of the following values:

  • "final" — Plot the bar chart for the final RC values.

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

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 RC 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

| | | | | |