Repository navigation
Replacement Cost and Collateral
๐ Guide, not policy. docs/methodology/README.md (support matrix, regime differences and the note on the cap) is the project's governing implementation specification. Applicable law and the official regulatory texts prevail over the repository and this guide; implementation and validation boundaries are stated below.
The replacement cost (RC) measures exposure arising from replacing transactions following a counterparty default, as a component of regulatory EAD. For unmargined transactions it measures exposure on immediate default and close-out, after recognised net collateral. For margined transactions it also reflects the exposure that can arise without triggering a variation-margin call; it need not equal today's net mark-to-market exposure. It is not a prediction of the realised credit loss (CRE52.3โ.4, .14, .19). This page gives the RC formulas as the engine implements them, how collateral and variation margin enter them in each regime, the cap on the EAD of a margined netting set, and a worked example in which the cap binds.
Status at v1.0.2: version 1.0.2, released on 2026-10-23
(GitHub Release).
The RC and cap rules are unchanged from 1.0.1.
The formulas use netting-set amounts in the reporting currency, from the bank's perspective. The engine converts trade MtM with the FX table; VM, NICA, TH and MTA on NettingSets must already be in the reporting currency. Collateral amounts are entered after the applicable valuation adjustments; this does not mean applying collateral haircuts to trade MtM, TH or MTA.
| Symbol | NettingSets / Trades column | Meaning | Sign |
|---|---|---|---|
| V | Sum of the trades' MtM
|
Net market value of the trades, gross of collateral, converted with the FX table; corresponds to CMV under CRR | Positive: an asset of the bank |
| VM | Net VM held (+) / posted (-) |
Recognised variation margin, after applicable collateral adjustments | Held minus posted |
| NICA | NICA |
Net independent collateral amount: recognised collateral other than VM, such as independent amounts and initial margin, after adjustments and the bankruptcy-remote exclusion below | Held minus posted |
| TH | Threshold TH |
Applicable threshold before the counterparty must provide collateral to the bank; use the relevant side of the agreement | At least 0 |
| MTA | MTA |
Minimum transfer amount applicable to the counterparty's collateral transfer to the bank | At least 0 |
| C | Results column C (VM + NICA)
|
Net collateral, C = VM + NICA | Positive if held |
A blank VM, NICA, threshold or MTA is 0; a negative threshold or MTA, or a
value that cannot be read, makes the netting set INVALID
(#147). A blank is a
zero input, not confirmation that the contractual amount is actually zero.
Preparing collateral inputs. Eligibility, haircuts, currency-mismatch adjustments and legal protection are the user's responsibility:
- Exclude collateral posted by the bank from NICA only when it is segregated from the counterparty's assets and bankruptcy remote in the event of that counterparty's default or insolvency. Segregation alone is insufficient (CRE52.17; CRR Art. 276(1)(g)). Received independent collateral can be segregated or unsegregated, provided the bank can use it to offset exposure on the counterparty's default and the recognition conditions are met (CRE52.16โ.17).
- Adjust collateral received downwards and collateral posted upwards in
absolute value before applying its negative sign. Under CRR Art. 276(2),
posted collateral uses
C ร (1 + Hc + Hfx); received collateral follows Art. 223. The applicable rules and holding periods matter: under Basel, CRE52.5, .10 FAQ1 and .11 distinguish the haircut horizons for margined and unmargined exposures. The workbook does not derive these adjustments. - Under CRR Art. 276(1)(a)โ(b), eligible collateral depends on whether all transactions are in the trading book (Arts. 197 and 299) or at least one is in the non-trading book (Art. 197). The workbook does not establish collateral eligibility or enforceability.
- Never count the same collateral item in both VM and NICA (CRR Art. 276(1)(e)). Keep trade MtM gross of collateral, so that subtracting collateral in RC does not count it twice.
Netting also requires legal recognition. Group transactions only where the applicable netting conditions are met; otherwise each transaction is its own netting set. The workbook does not verify legal opinions or enforceability (CRE52.7โ.8; CRR Art. 272(4), 295โ298).
| Text | Formula as printed | Collateral |
|---|---|---|
| Basel, CRE52.10 | RC = max(V โ C, 0) | C is the haircut value of net collateral held, calculated with the NICA methodology of CRE52.17 |
| CRR, Art. 275(1) | RC = max(CMV โ NICA, 0) | NICA (Art. 272(12a)); no VM term |
On an ordinary unmargined netting set VM is 0, so C = NICA and the two formulas give the same number. They differ only when variation margin is entered on an unmargined netting set (below). CRE99 Example 4 gives the published check: V = 40 thousand, no collateral, RC = 40 thousand (CRE99.77, test T08).
| Text | Formula as printed |
|---|---|
| Basel, CRE52.18 | RC = max(V โ C, TH + MTA โ NICA, 0) |
| CRR, Art. 275(2) | RC = max(CMV โ VM โ NICA, TH + MTA โ NICA, 0) |
The first term is today's net market value less recognised net collateral,
including collateral posted with a negative sign. The second is the
largest exposure the agreement allows without a margin call: the threshold
plus the MTA, less the independent collateral that protects against it. The
engine implements both texts with one function, SACCR_ReplacementCost
(also available as a worksheet function).
The picture illustrates the two terms and the possible increase in exposure during the margin period of risk (select it to open the full-size version). Its path is schematic: the regulatory PFE is calculated from the add-on and multiplier, not measured as the realised rise along this particular path:
CRE99 Example 5 illustrates the zero floor: V = 80, VM = 50, NICA = 150, TH = 0 and MTA = 5 (USD thousands, CRE99.80โ.82), so V โ C = โ120 and TH + MTA โ NICA = โ145, and RC = max(โ120, โ145, 0) = 0. Both exposure terms are negative; the second term does not determine this RC.
A published example where the second term determines RC. In CRE99.102โ.104, the bank has V = โฌ80 million, VM received = โฌ79.5 million, TH = 0 and MTA = โฌ1 million. Independent collateral received and non-segregated independent collateral posted are both โฌ10 million, so NICA = 0:
| Term | EUR millions |
|---|---|
| V โ C = 80 โ 79.5 | 0.5 |
| TH + MTA โ NICA = 0 + 1 โ 0 | 1 |
| Zero floor | 0 |
| RC = max(0.5, 1, 0) | 1 |
This distinguishes an RC of โฌ1 million from today's net exposure of โฌ0.5 million. The reference is published, but this additional example is not an implemented validation case in the v1.0.2 catalogue.
The v1.0.2 traceability table calls margined RC exercised because the catalogued published EAD T14 depends on it. That describes the tests actually adopted, not the absence of a published RC: CRE99.82 explicitly presents the RC calculation, and CRE99.102โ.104 gives the further example above. Promoting the rule to validated requires a dedicated expected RC, its source locator and a passing test under the project's evidence policy.
The same C enters the PFE multiplier, which uses V โ C for both kinds of netting set; see Potential Future Exposure.
Under Basel, a margined netting set is covered by an agreement under which the counterparty has to post variation margin (CRE52.2). Classification follows the contractual obligation, not the sign or existence of today's VM balance. A two-way agreement remains margined when VM is zero or when the bank is currently the party posting it. Under CRR, one-way margin agreements also fall within the margin-agreement definition (Art. 272(7), (7a)).
The following table describes the engine's checks when the user has entered
Margined = N; the engine does not independently verify the contract
(#39):
| Entered on an unmargined netting set | BCBS |
CRR |
|---|---|---|
| VM held (positive) |
INVALID: inconsistent with the declared unmargined treatment when the amount is VM under an agreement requiring the counterparty to post it (CRE52.2) |
INVALID: VM under a margin agreement requires margined treatment (Art. 272(7)) |
VM posted (negative), with Margined = N intended to represent a genuine one-way agreement under which only the bank must post |
VALID if the other inputs pass: the engine assumes that one-way arrangement, keeps the set unmargined and includes posted VM in C with a negative sign (CRE52.2; CRE52.10, footnote 2); Checks records an INFO line |
INVALID: a one-way margin agreement is a margin agreement (Art. 272(7a)), so the netting set is margined (Art. 275(2)); enter it as Margined = Y, with the threshold of the agreement |
A negative VM balance alone does not establish that the agreement is
one-way. The user must verify that only the bank is obliged to post; an
ordinary two-way CSA entered as Margined = N would be misclassified even
if the engine accepts the negative balance. Collateral received without a
VM obligation must be classified according to its terms rather than being
labelled VM solely because cash was received.
The posted VM raises the Basel RC. In the input-validation suite, a swap worth
30 on a Basel netting set with 1,000 of VM posted has
RC = max(30 โ (โ1,000), 0) = 1,030, while the same inputs under CRR give an
INVALID netting set (netting-set-unmargined-vm-posted-bcbs and -crr,
illustrative). This is a recorded regime difference.
Settlement is different from collateral: a contractual payment that settles
the exposure and resets the contract's value to zero is not simply VM held
against an unchanged MtM. Qualifying settlement/reset terms can change the
remaining maturity under CRE52.37(5) and CRR Art. 279c(2). From 1.0.2 such a
trade is declared with Settlement type STM and its next reset date in an
unmargined netting set; daily variation margin alone is not STM, and an
STM trade in a margined netting set makes it INVALID. See
Margining and MPOR and the
settlement and reset coverage
for the input contract and its limitations.
Both texts cap the EAD of a margined netting set at the EAD of the same netting set without margin (CRE52.2; CRR Art. 274(3)). The engine calculates both and reports the lower:
On the unmargined basis, the engine recalculates RC, maturity factors, add-ons, the multiplier and EAD as follows, retaining the entered NICA:
| Element | Margined basis | Unmargined basis (the cap) |
|---|---|---|
| Collateral | C = VM + NICA | C = NICA |
| RC | max(V โ C, TH + MTA โ NICA, 0) | max(V โ NICA, 0) |
| Maturity factor | 1.5 ร sqrt(MPOR / 250) | sqrt(min(M, 1)), M floored at 10 business days |
| Multiplier | on V โ C and the margined add-on | on V โ NICA and the unmargined add-on |
| Results columns |
RC, AddOn aggregate, Multiplier, PFE, EAD margined
|
C (cap basis), RC (cap basis), AddOn unmargined, Multiplier (cap basis), EAD cap (unmargined)
|
Cap applied on Results is Y when the cap is lower than the margined EAD,
N otherwise, and n/a for an unmargined netting set.
The table uses the default convention of 250 business days per year; M is in years, and the unmargined maturity factor is determined trade by trade. The engine uses the same already-adjusted NICA input on both bases: it does not recalculate collateral haircuts when constructing the cap. For non-cash collateral, the user must assess the applicable haircut horizons and whether the supplied input represents the required treatment; the workbook has no separate NICA input for the cap basis.
Reading Results when the cap binds. The ordinary RC, AddOn aggregate,
Multiplier and PFE columns continue to show the margined basis; they are
not overwritten with cap-basis components. Consequently, final EAD can be
less than Alpha ร (RC + PFE) calculated from those columns. Reconcile it
against EAD margined, EAD cap (unmargined) and Cap applied.
The cap is not a regime difference. Both texts define the collateral of a netting set without margin without variation margin:
- CRR. Article 274(3) caps at the exposure of the netting set "not subject to any form of margin agreement"; its RC follows Article 275(1), whose NICA "does not include the variation margin posted or received" (EBA Q&A 2023_6962, final, 15/03/2024; official EBA answer). This is the EBA's non-binding interpretation; the submitter's question and proposed interpretation are distinct from that final answer.
- Basel. CRE52.2 caps at the EAD "calculated on an unmargined basis", and CRE52.10 takes C from the NICA methodology of CRE52.17. Posted VM enters C only for a one-way agreement where the bank alone posts (footnote 2), and CRE52.2 already treats that netting set as unmargined, so it never has a cap.
The prototype workbook used VM + NICA for the Basel cap; from v1.0.0 the engine uses NICA only (#39), which is one of the differences from the prototype.
CRE52.2 FAQ1 explains that the cap ignores exposure from a large threshold that small or no transactions would never reach. The same FAQ notes an anomaly: for margined trades with a residual maturity of 10 business days or less, the margined maturity factor exceeds the unmargined one because of the 3/2 multiplier of CRE52.52, and the cap negates it.
The illustrative fixture
illustrative-posted-vm-cap
has one margined netting set (daily remargining, threshold and MTA 0, NICA 0)
that has posted 1.3 billion of VM against one short 10-year EUR swap,
notional 5,845 million, worth โ1.1 billion, valued on 2026-09-30. Amounts in
EUR. Its margined flag assumes an agreement requiring the counterparty to
post VM when the bank has a collateral claim; today's posted balance does
not imply a one-way agreement.
All intermediate calculations use unrounded values. The displayed values below are rounded for readability and should not be used recursively to reproduce the final cents. The end date is 2036-09-27, exactly 3,650 days after the valuation date, with the fixture's 365-calendar-day convention.
Unmargined basis (the cap).
| Step | Value |
|---|---|
| E = 3,650 / 365 years; SD = (1 โ exp(โ0.05 ร 10)) / 0.05 | 7.869387 |
| Adjusted notional d = 5,845,000,000 ร SD | 45,996,565,879.59 |
| Interest-rate add-on = 0.5% ร d ร MF 1 | 229,982,829.40 |
| C = NICA = 0; RC = max(โ1,100,000,000 โ 0, 0) | 0 |
| Multiplier = 0.05 + 0.95 ร exp(โ1,100,000,000 / (2 ร 0.95 ร 229,982,829.40)) | 0.126639 |
| PFE = unrounded multiplier ร unrounded add-on | 29,124,892.39 |
| EAD cap = 1.4 ร (0 + 29,124,892.39) | 40,774,849.35 |
Margined basis.
| Step | Value |
|---|---|
| C = VM + NICA = โ1,300,000,000; V โ C | 200,000,000 |
| RC = max(200,000,000, 0 + 0 โ 0, 0) | 200,000,000 |
| MPOR = 10 + 1 โ 1 = 10 days; MF = 1.5 ร sqrt(10 / 250) | 0.3 |
| Add-on = 229,982,829.40 ร 0.3 | 68,994,848.82 |
| Multiplier (V โ C > 0) | 1 |
| EAD margined = 1.4 ร (200,000,000 + 68,994,848.82) | 376,592,788.35 |
Result. EAD = min(376,592,788.35, 40,774,849.35) = 40,774,849.35 with
Cap applied = Y, identical under both regimes:
| Test | Case | Quantity | Expected | Class |
|---|---|---|---|---|
| T16 | illustrative-posted-vm-cap.bcbs |
exposure_value |
40,774,849.34860364 EUR | illustrative |
| โ | illustrative-posted-vm-cap.bcbs |
cap_applied |
Y |
illustrative |
| T17 | illustrative-posted-vm-cap.crr |
exposure_value |
40,774,849.34860364 EUR | illustrative |
| T18 | illustrative-posted-vm-cap.crr |
cap_applied |
Y |
illustrative |
The scenario is an engineering case, not an authoritative figure: it comes
from the rejected EBA question 2022_6354, and its expected values are a
hand calculation (T16) and a Python implementation not in the
repository (T17, T18). The fixture has category regime, but both regimes give
the same EAD. CRE99 Example 5 under CRR (T15, illustrative) shows the opposite
case: the cap does not bind and the EAD equals the Basel 1,879 thousand.
| Structure | Texts | Treatment |
|---|---|---|
| Several margin agreements, or margined and unmargined trades, in one netting set | CRE52.74; CRR Art. 274(4) | Enter MIXED in the Margin agreements column: the netting set is INVALID
|
| One margin agreement over several netting sets | CRE52.75; CRR Art. 275(3), 278(2) | Enter SHARED: the netting set is INVALID
|
| A settled-to-market trade in a margined netting set (from 1.0.2) | CRE52.74; CRR Art. 274(4) |
INVALID: STM requires unmargined treatment; mixed margined/unmargined netting sets are not supported, a limitation of the engine |
Declaring them is what keeps such a netting set from being calculated as if it
had a single agreement of its own. A blank means the ordinary supported
structure; any non-blank value other than MIXED or SHARED is an input
error. Leaving the field blank does not establish that the agreement really
has a supported structure: the workbook cannot infer an undeclared legal
arrangement from the amounts.
From 1.0.2 a clearing member's trade exposure to a CCP (role CCP) uses the
same RC and cap as any netting set: its exposure value is SA-CCR. Collateral
the bank posted to the CCP and that is held bankruptcy remote is left out of
NICA by the user; posted collateral that is not bankruptcy remote is entered
in NICA with a negative sign (CRE52.17; CRE54.21, .23; CRR Art. 306(2)).
Whether the CCP retains VM without protecting the collateral changes only
the maturity factor (Margining and MPOR). A CCP entered
as an ordinary counterparty with role N is calculated as bilateral and
cannot be detected. See Regulatory Basis and the
clearing coverage.
| Rule | Status | Cases |
|---|---|---|
| Unmargined RC (CRE52.10; CRR Art. 275(1)) | Basel validated; CRR not validated | Published T08; illustrative illustrative-ir-swap-unmargined and the one-way cases |
| Margined RC (CRE52.18; CRR Art. 275(2)) | Basel exercised in the v1.0.2 catalogue; CRR not validated | Published EAD T14; the available published RC references in CRE99.82 and .102โ.104 are not direct RC checks in that catalogue |
| Cap (CRE52.2; CRR Art. 274(3)) | Not validated: none of the adopted published checks T01โT14 makes it bind | Illustrative T15โT18 and TEST_Invariants
|
These are the recorded test statuses, not a claim that published reference values are unavailable. Adding a worked example to this page does not add a test to the workbook or change a rule's validation status. Collateral eligibility, haircut derivation, legal netting and the accuracy of user inputs also remain outside those numerical checks.
๐ฆ K-SACCR ยท โ๏ธ EU CRR ยท Basel CRE52 ยท ๐งช Published CRE99 checks T01โT14; CRR implemented, not numerically validated ยท ๐ฆ Release 1.0.2 published 2026-10-23 ยท ๐งฎ No real portfolio data ยท โก 500,000 synthetic trade legs in under two minutes ยท Repository ยท Validation Approach ยท Open Items
๐ฆ K-SACCR
โ๏ธ Regulation
- ๐ SA-CCR Overview
- ๐ Regulatory Sources
- ๐งญ Regulatory Basis
- ๐ก๏ธ Replacement Cost and Collateral
- โฑ๏ธ Margining and MPOR
- ๐ Potential Future Exposure
- โ๏ธ Basel vs CRR
- ๐งฎ Worked Examples
๐งฎ Workbook
- ๐ Getting Started
- ๐บ๏ธ Workbook Guide
- ๐ฅ Inputs
- ๐ค Outputs and Statuses
- ๐ Reconciliation and Evidence
- โ๏ธ How It Works
- ๐งพ Worksheet Functions
- ๐งช Test Catalogue
- โ Validation Approach
- ๐ ๏ธ Troubleshooting
- ๐ง Open Items and Limitations
๐ Guide, not policy: the repository documents govern.
