Class SaCcr
EAD = alpha * (RC + PFE), alpha = 1.4 (para 128) RC = max(V - C, 0) unmargined (para 136) RC = max(V - C, TH + MTA - NICA, 0) margined (para 144) PFE = multiplier * AddOn_aggregate, AddOn_aggregate = sum over classes (paras 146, 150) multiplier = min(1, F + (1 - F) * exp((V - C) / (2 (1 - F) AddOn_aggregate))), F = 5% (para 149)
Trade level (paras 155-159): adjusted notional d_i is the notional
times the supervisory duration SD = (exp(-0.05 S) - exp(-0.05 E)) / 0.05
for rates and credit, the foreign leg for FX, price times units for
equity and commodity. The maturity factor is
MF = sqrt(min(max(M, 10/250), 1)) unmargined and
MF = 1.5 sqrt(MPOR / 250) margined (MPOR in business days, a
250-day year as in the Annex 4a examples). Each trade contributes
delta * d * MF.
Asset-class add-ons (paras 165-182), supervisory factors from Table 2:
- Interest rates: hedging set per currency, three maturity buckets
by E (under 1y, 1y-5y, over 5y), effective notional
sqrt(D1^2 + D2^2 + D3^2 + 1.4 D1 D2 + 1.4 D2 D3 + 0.6 D1 D3), SF 0.5%, add-on is the sum over currencies. - FX: hedging set per currency pair, SF 4% times the absolute net effective notional, summed over pairs.
- Credit and equity: entity-level add-on SF times net effective
notional; then
sqrt((sum rho_k A_k)^2 + sum (1 - rho_k^2) A_k^2)with rho 50% single name, 80% index. - Commodity: commodity-type add-on SF times net effective notional (40% electricity, 18% other types), the same systematic plus idiosyncratic formula with rho 40% inside each of the four hedging sets, summed over sets.
Basis and volatility transactions (paras 162-163) form their own
hedging sets inside their asset class, with the supervisory factor
times 0.5 (basis) or 5 (volatility); mark a trade with
SaCcrTrade.asBasis() or SaCcrTrade.asVolatility().
For example a USD 3m/OIS basis swap with adjusted notional 78,694
in the over-5y bucket adds 0.5 * 0.5% * 78,694 = 196.7 on its own,
where the same trade as an ordinary swap would add 393.5 and net
against the other USD swaps.
Margin agreements and netting sets (paras 185-187, checked against
the March 2014 text):
oneMarginAgreementManyNettingSets(List, double) for one agreement covering
several netting sets, subNettingSets(List) for one netting set
under several agreements (or partly unmargined). Collateral C is
passed already haircut; SaCcrHaircuts gives the supervisory
haircuts. Times are year
fractions the caller computes; the S and E floor of ten business
days is applied as 10/250 years. The tests reproduce Annex 4a
Examples 1 to 5. Research lane, deterministic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe five SA-CCR asset classes.static enumThe four commodity hedging sets (para 161).static enumCredit rating buckets and their supervisory factors (Table 2).static enumHedging-set kind of a trade (paras 162-163) and its multiplier on the supervisory factor.static final recordMargin agreement terms for a margined netting set.static final recordSA-CCR outputs for one netting set.static final recordOne part of a netting set forsubNettingSets(List): the trades under one margin agreement (or the unmargined trades whenmarginis null) and the haircut collateral that belongs to them. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleAlpha, para 128.static final doubleMultiplier floor, para 149.static final doubleSupervisory option volatility, other commodities (Table 2).static final doubleSupervisory option volatility, credit index (Table 2).static final doubleSupervisory option volatility, single-name credit (Table 2).static final doubleSupervisory option volatility, electricity (Table 2).static final doubleSupervisory option volatility, equity index (Table 2).static final doubleSupervisory option volatility, single-name equity (Table 2).static final doubleSupervisory option volatility, FX (Table 2).static final doubleSupervisory option volatility, interest rates (Table 2). -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecdoTrancheDelta(double attachment, double detachment, boolean purchased) Supervisory delta of a CDO tranche, para 159:15 / ((1 + 14 A)(1 + 14 D)), positive for purchased protection.static SaCcr.Resultmargined(List<SaCcrTrade> trades, double collateralHeld, SaCcr.Margin margin) EAD of a margined netting set.static doublematurityFactor(double maturityYears, SaCcr.Margin margin) Maturity factor of paras 164 and 171.static doublemultiplier(double vMinusC, double aggregate) The PFE multiplier of para 149.static SaCcr.ResultoneMarginAgreementManyNettingSets(List<List<SaCcrTrade>> nettingSets, double collateralHeld) One margin agreement covering several netting sets (RC from BCBS 279 para 186, PFE from para 187, both checked against the March 2014 text).static doubleoptionDelta(boolean call, boolean bought, double underlying, double strike, double expiryYears, double vol) Supervisory option delta of para 159 (Black-Scholes delta with the supervisory volatility, zero rates).static SaCcr.ResultsubNettingSets(List<SaCcr.SubNettingSet> parts) One netting set under several margin agreements, or mixing margined and unmargined trades (BCBS 279 para 185).static doublesupervisoryDuration(double startYears, double endYears) Supervisory duration of para 157, with S and E in years.static SaCcr.Resultunmargined(List<SaCcrTrade> trades, double collateralHeld) EAD of an unmargined netting set.
-
Field Details
-
ALPHA
public static final double ALPHAAlpha, para 128.- See Also:
-
MULTIPLIER_FLOOR
public static final double MULTIPLIER_FLOORMultiplier floor, para 149.- See Also:
-
OPTION_VOL_INTEREST_RATE
public static final double OPTION_VOL_INTEREST_RATESupervisory option volatility, interest rates (Table 2).- See Also:
-
OPTION_VOL_FX
public static final double OPTION_VOL_FXSupervisory option volatility, FX (Table 2).- See Also:
-
OPTION_VOL_CREDIT_SINGLE
public static final double OPTION_VOL_CREDIT_SINGLESupervisory option volatility, single-name credit (Table 2).- See Also:
-
OPTION_VOL_CREDIT_INDEX
public static final double OPTION_VOL_CREDIT_INDEXSupervisory option volatility, credit index (Table 2).- See Also:
-
OPTION_VOL_EQUITY_SINGLE
public static final double OPTION_VOL_EQUITY_SINGLESupervisory option volatility, single-name equity (Table 2).- See Also:
-
OPTION_VOL_EQUITY_INDEX
public static final double OPTION_VOL_EQUITY_INDEXSupervisory option volatility, equity index (Table 2).- See Also:
-
OPTION_VOL_ELECTRICITY
public static final double OPTION_VOL_ELECTRICITYSupervisory option volatility, electricity (Table 2).- See Also:
-
OPTION_VOL_COMMODITY_OTHER
public static final double OPTION_VOL_COMMODITY_OTHERSupervisory option volatility, other commodities (Table 2).- See Also:
-
-
Method Details
-
unmargined
EAD of an unmargined netting set.- Parameters:
trades- the trades of the netting setcollateralHeld- C, haircut value of net collateral held (negative when posted)- Returns:
- the result
-
margined
public static SaCcr.Result margined(List<SaCcrTrade> trades, double collateralHeld, SaCcr.Margin margin) EAD of a margined netting set.- Parameters:
trades- the trades of the netting setcollateralHeld- C, haircut value of net collateral held, variation margin plus NICAmargin- margin agreement terms- Returns:
- the result
-
oneMarginAgreementManyNettingSets
public static SaCcr.Result oneMarginAgreementManyNettingSets(List<List<SaCcrTrade>> nettingSets, double collateralHeld) One margin agreement covering several netting sets (RC from BCBS 279 para 186, PFE from para 187, both checked against the March 2014 text). The agreement's collateral cannot be split between the netting sets, soRC_MA = max(sum_NS max(V_NS, 0) - C_MA, 0), andPFE_MA = sum_NS PFE_NSwith each netting set's PFE computed as if unmargined. Each multiplier uses that set's own V_NS with no collateral, since C_MA belongs to no single set; para 187 says only that each PFE follows the unmargined methodology, so the choice of V_NS for the multiplier is this library's reading.Example (own hand computation): netting sets with V of 100 and -40 under one agreement holding C = 30 give RC = max(100 + 0 - 30, 0) = 70. Netting the two sets first would give 30, which the rule does not allow.
- Parameters:
nettingSets- the netting sets, each non-emptycollateralHeld- C_MA, haircut net collateral under the agreement- Returns:
- a result whose add-on fields are sums over the netting sets and whose multiplier is PFE divided by the aggregate add-on
-
subNettingSets
One netting set under several margin agreements, or mixing margined and unmargined trades (BCBS 279 para 185). The netting set is divided into sub-netting sets aligned with their agreements, and para 185 states that this applies to both RC and PFE. So each part gets its ownRC_k(margined:max(V_k - C_k, TH_k + MTA_k - NICA_k, 0); unmargined:max(V_k - C_k, 0)) and its own PFE with its own maturity factors and multiplier from V_k - C_k, and both are summed over the parts. Until 2.3 the RC was taken for the netting set as a whole with summed floors; that reading did not match para 185 and was corrected.Example (own hand computation): a margined part with V = -30, C = 0, TH + MTA - NICA = 5 and an unmargined part with V = 50 give RC = 5 + 50 = 55, where netting the parts first would give 20.
- Parameters:
parts- the sub-netting sets- Returns:
- a result whose add-on fields are sums over the parts and whose multiplier is PFE divided by the aggregate add-on
-
multiplier
public static double multiplier(double vMinusC, double aggregate) The PFE multiplier of para 149.- Parameters:
vMinusC- V - Caggregate- aggregate add-on (≥ 0); zero gives 1- Returns:
- the multiplier in [0.05, 1]
-
supervisoryDuration
public static double supervisoryDuration(double startYears, double endYears) Supervisory duration of para 157, with S and E in years.- Parameters:
startYears- S (0 when started; a positive S is floored at ten business days)endYears- E (floored at ten business days)- Returns:
- SD in years
-
optionDelta
public static double optionDelta(boolean call, boolean bought, double underlying, double strike, double expiryYears, double vol) Supervisory option delta of para 159 (Black-Scholes delta with the supervisory volatility, zero rates).- Parameters:
call- true for a call, false for a putbought- true when the bank bought the optionunderlying- P, the underlying price (forward, spot, swap rate), > 0strike- K, > 0expiryYears- T, latest exercise date, > 0vol- supervisory volatility, > 0- Returns:
- the signed delta
-
cdoTrancheDelta
public static double cdoTrancheDelta(double attachment, double detachment, boolean purchased) Supervisory delta of a CDO tranche, para 159:15 / ((1 + 14 A)(1 + 14 D)), positive for purchased protection.- Parameters:
attachment- A in [0, 1)detachment- D in (A, 1]purchased- true for long protection- Returns:
- the signed delta
-
maturityFactor
Maturity factor of paras 164 and 171.- Parameters:
maturityYears- Mmargin- null for unmargined- Returns:
- MF
-