Bilateral CSA and Unilateral (Bank) CSA. An application can add its own, as described in How to write your own collateral algorithm.
Understanding exposure concepts (specifically the CSA parameters and the margin period of risk) is a prerequisite for this page.
Which parameters do the algorithms use?
Both algorithms read the parameters of the CSA from theCollateralAgreements table. The per-trade amounts of the IndependentAmounts table are not an input of the algorithms. See the data model for the field definitions.
Both algorithms use the counterparty margin period of risk .
How is the collateral balance looked up in time?
For each reporting time point , the algorithm values the CSA at the date , one margin period of risk earlier. The value of the CSA is the sum of the MtF values of the trades that name the CSA:- If is before the as-of date, the balance equals the initial collateral of the CSA, converted from the CSA parameter currency to the display currency with the FX rate at . The exposure formulas below are not applied.
- If is a date of the simulation grid, the algorithm uses the MtF value of the CSA at that date.
- If falls between two grid dates, the algorithm linearly interpolates the MtF value between the two nearest reporting dates.
TradeMaturityDate of its trades, and from then on the CSA holds no collateral in its master agreement. A master agreement with a CSA has no collateralized exposure after the latest TradeMaturityDate of all its trades, so the collateralized exposure, its metrics, and the xVA EE/ENE PV are empty after that date. A trade without a TradeMaturityDate counts as maturing on the maximum date, so the balance of its CSA continues to the last time point.
How are currencies converted?
The CSA parameters are expressed in the CSA parameter currency. For each scenario , the algorithm divides the MtF value at by the FX rate at to express it in that currency, and multiplies the resulting collateral by the FX rate at to return to the display currency. The FX vectors are the ones that convert the MtF vectors, including the pivot through the default currency for a pair with no quote. FX rates for dates between two grid dates are linearly interpolated. The conversion reads the market data set selected in the query, the default market data set when none is selected. When the netting set’s CSA currency has no rate to the display currency, the collateral balance and the collateralized exposure are empty. In the formulas below, is the CSA MtF value at in the CSA parameter currency, and is its positive part: The independent amounts and count as zero when .What is the total exposure under the Bilateral CSA algorithm?
The bilateral algorithm combines the counterparty-side and bank-side independent amount terms with the MtF value:What is the total exposure under the Unilateral (Bank) CSA algorithm?
The unilateral algorithm uses only the counterparty parameters and the positive part of the MtF value:How is the collateral call determined?
The collateral call turns the total exposure into a collateral amount, in the CSA parameter currency. A call is made only when the exposure exceeds the threshold by at least the minimum transfer amount. For the Bilateral CSA algorithm, the counterparty side is tested first, then the bank side: For the Unilateral (Bank) CSA algorithm, only the counterparty threshold and minimum transfer amount apply: The collateral balance in the display currency is .How is collateralized exposure computed?
An algorithm computes only the collateral balance of one CSA. The cube computes the exposure from the balances, per master agreement. A master agreement is the netting set: it holds any number of CSAs, plus trades that have no CSA. TheCollateralized MtM measure is the gross MtM of the master agreement, less the collateral balances of its CSAs, without any floor. With the balance of CSA of the master agreement in the cube base currency:
The measure is null at a time point that the selected algorithm of any CSA of the master agreement skips. A CSA that has no balance at a time point, such as the default CSA N/A, subtracts nothing.
The bank and counterparty collateralized exposure measures then depend on the Netted field of the master agreement:
- Master agreement that nets (
Nettedistrue): the bank side takes the positive part of and the counterparty side takes the negative part.
- Master agreement that does not net (
Nettedisfalse, or no master agreement row): each trade is floored on its own, then the collateral balances of the CSAs are subtracted from each side, and each side is floored again.
How is an algorithm selected?
Algorithms are the members of theCollateral Algorithm hierarchy. The hierarchy belongs to the dimension of the same name. It is a slicing hierarchy with one level, also named Collateral Algorithm. Its members are Bilateral CSA, Unilateral (Bank) CSA, and every algorithm that the application adds. Both built-in algorithms are available in the PFE and xVA cubes.
The cube has one set of collateralized measures, in the Collateralized Exposures folder. No measure name contains an algorithm name. The measures are evaluated with the algorithm that the query selects:
- A query that does not select a member uses the default member.
- A query that selects a member evaluates every collateralized measure with that algorithm.
- A query that puts the hierarchy on an axis shows one result per algorithm, which compares the algorithms side by side.
Unilateral (Bank) CSA algorithm. A slicing hierarchy has no [ALL].[AllMember] segment in its member path.
Which algorithm is the default?
Theatoti.solution.model.cubes.<cube>.collateral.default-evaluator property names the default member of the Collateral Algorithm hierarchy. It defaults to Bilateral CSA. Queries that do not select a member use this algorithm.
The default must be a built-in algorithm or one that the application adds. Otherwise the application fails at startup with an error that names the cube. The cube-specific properties are listed in Configuration.
How does the cube read the selected algorithm?
The hidden measureCollateral Algorithm returns the selected member. It is available as collateralAlgorithm() on ITechCollateralMeasures. The collateral data points, the collateral balance, and the Collateralized MtM measures read it for every cell and evaluate the algorithm of that name.
An application can redefine this measure to choose the algorithm by another rule, for example per CSA. See How to choose the algorithm per CSA.
How is an algorithm added or replaced?
The application declares oneICollateralConfigurer bean. The configurer adds evaluators by name to the cubes it names. An evaluator whose name equals a built-in name replaces that built-in algorithm. The evaluator contract and a complete example are in How to write your own collateral algorithm.