common-domain-model
common-domain-model copied to clipboard
Manuel Carrera Standardized Schedule calculations for IM
Deploy Preview for finos-cdm ready!
| Name | Link |
|---|---|
| Latest commit | ea73b2dfc68407fb1cedee78d6acecc98070650c |
| Latest deploy log | https://app.netlify.com/sites/finos-cdm/deploys/669fc44380544100089f57c0 |
| Deploy Preview | https://deploy-preview-3062--finos-cdm.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Implementation of the Standardized Schedule Method for Initial Margin Calculation in CDM - Release Notes
Standardised Schedule - Key Features
Background
The financial crisis that began in 2007 highlighted significant weaknesses in the resilience of banks and market participants to financial and economic shocks. To address these vulnerabilities and curb excessive risk-taking, the Basel Committee on Banking Supervision (BCBS) published the D499 document in April 2020, detailing new margin requirements aimed at reducing systemic risk and promoting central clearing. These requirements mandate that Initial Margin (IM) be calculated using either a quantitative model or a standardized method, ensuring uniformity and comprehensive coverage of counterparty risk.
What is being released?
The implementation of the Standardized Schedule Method for calculating Initial Margin (IM) within the Common Domain Model (CDM) is being released. This release introduces a structured approach to computing IM, providing a conservative and straightforward alternative for market participants who either lack the resources to develop quantitative models or prefer not to use third-party services.
Key components of this release include:
- New enumerations have been created to cover the asset typologies and subtypes of financial products included in this methodology.
- Functions have been developed to extract the duration and notional of financial products in accordance with specification D499.
- After extracting the necessary data, additional functions have been developed to compute the initial margin by integrating the extracted data with the model formulas.
- A package of examples of various covered products has been assembled to test the functionality of the implemented functions.
Data types
- Added new
StandardizedScheduletype. - Added new
GrossInitialMarginAndMarkToMarketValuetype. - Added new
CreditEventtype.
Enumerations
- Added new
StandardizedScheduleAssetClassEnumenumeration. - Added new
StandardizedScheduleProductClassEnumenumeration.
Functions
- Added new
AdjustableDateResolutionfunction.- A fall back for unadjustedDate when adjustedDate is only available.
- Added new
AdjustableOrAdjustedOrRelativeDateResolutionfunction.- A fall back for unadjustedDate when adjustedDate is only available.
- Added new
AuxiliarEffectiveDatefunction.- Extracts the effective date of specific products such as interest rate swaps and swaptions.
- Added new
AuxiliarTerminationDatefunction.- Extracts the termination date of specific products such as interest rate swaps and swaptions.
- Added new
BuildStandardizedSchedulefunction.- Takes a trade and uses qualification to extract the relevant information to populate the grid that will be used to calculate the gross initial margin.
- Added new
DateDifferenceYearsfunction.- Computes the difference in years between two dates. All years are supposed to have 365 days.
- Added new
EconomicTermsForProductfunction.- Extracts the economic terms from a product.
- Added new
FXFarLegfunction.- Extracts the far leg of an FX swap (deliverable or not) based on two criteria: the forward payout with the latest value date or the forward payout with the latest settlement date.
- Added new
GetGrossInitialMarginFromStandardizedSchedulefunction.- Takes the grid information from an specific trade and calculates the gross initial margin.
- Added new
GetIMRequirementfunction.- Computes the IM requirement, which is required in the calculation of the gross initial margin. It depends exclusively on the asset class of the trade and, in some cases, on the duration as well.
- Added new
GetNetInitialMarginFromBaseCurrencyExposurefunction.- Computes the net initial margin, taking the gross initial margin result and the mark to market value."
- Added new
IsCreditNthToDefaultfunction.- Identifies a product as a CR basket Nth to default.
- Added new
IsFXDeliverableOptionfunction.- Identifies a product as an FX deliverable option.
- Added new
IsFXNonDeliverableOptionfunction.- Identifies a product as an FX non-deliverable option.
- Added new
IsIRSwaptionStraddlefunction.- Identifies a product as an IR swaption straddle.
- Added new
IsIRSwapWithCallableBermudanRightToEnterExitSwapsfunction.- Identifies a product as an IR swap with bermudan/callable right to enter/exit swaps.
- Added new
ProductForTradefunction.- Extracts the product from a trade.
- Added new
StandardizedScheduleAssetClassfunction.- Identifies the asset class of a trade, according to the standardized schedule classification.
- Added new
StandardizedScheduleCommodityForwardNotionalAmountfunction.- Extracts the notional amount of a CO forward. Floating price forwards not supported.
- Added new
StandardizedScheduleCommoditySwapFixedFloatNotionalAmountfunction.- Extracts the notional amount of a CO fixed float swap.
- Added new
StandardizedScheduleDurationfunction.- Extracts the duration of a trade, according to the product class-depending extraction method defined in the ISDA industry survey.
- Added new
StandardizedScheduleEquityForwardNotionalAmountfunction.- Extracts the notional amount of an EQ forward.
- Added new
StandardizedScheduleFXNDFNotionalfunction.- Extracts the notional amount and currency of an FX non-deliverable forward.
- Added new
StandardizedScheduleFXNDONotionalfunction.- Extracts the notional amount and currency of an FX non-deliverable option.
- Added new
StandardizedScheduleFXSwapNotionalfunction.- Extracts the notional amount and currency of an FX swap.
- Added new
StandardizedScheduleFXVarianceNotionalAmountfunction.- Extracts the notional amount of an FX variance swap.
- Added new
StandardizedScheduleMonetaryNotionalCurrencyFromResolvablePQfunction.- Extracts the notional currency for all products that have it populated in the resolvable priceQuantity.
- Added new
StandardizedScheduleMonetaryNotionalFromResolvablePQfunction.- Extracts the notional amount for all products that have it populated in the resolvable priceQuantity.
- Added new
StandardizedScheduleNotionalfunction.- Extracts the notional amount of a trade, according to the product class-depending extraction method defined in the ISDA industry survey.
- Added new
StandardizedScheduleNotionalCurrencyfunction.- Extracts the notional currency of a trade, according to the product class-depending extraction method defined in the ISDA industry survey.
- Added new
StandardizedScheduleOptionNotionalAmountfunction.- Extracts the notional amount of a CO or EQ option.
- Added new
StandardizedScheduleProductClassfunction.- Identifies the product class of a trade, according to the standardized schedule classification.
- Added new
StandardizedScheduleVarianceSwapNotionalAmountfunction.- Extracts the notional amount of an EQ variance swap.
- Added new
UnderlierForProductfunction.- Extracts the underlier product.
Review directions
In the CDM Portal, select the Textual Browser and inspect each of the changes identified above.
In the CDM Portal, select Function and select the ones you want to test and upload a sample from our test pack.
Hi @manucarreramoreno,
I haven't had a chance to fully review this yet but it's a nice looking PR 🙂
My main question is really why this is all in a new namespace? The functionality being added looks pretty core to derivatives so should it not be in the core namespaces? There are also a few functions that look pretty generic and could be used by other functions in the model, so perhaps could be put elsewhere too (like into base.datetime).
Thanks!