Credit - Credit Default Swap

Credit - Credit Default Swap Documentation

Overview

The CreditSingleNameCDSCDMMapper class is responsible for mapping FpML (Financial Products Markup Language) credit default swaps (CDS) to the ISDA Common Domain Model (CDM) format. It extends the AbstractCreditProductsCDMMapper class, inheriting common mapping functionality for credit products.

A credit default swap is a financial derivative that allows the buyer to purchase protection against the default of a reference entity. This mapper handles the conversion of FpML XML elements representing single-name CDS contracts to the corresponding CDM objects.

Key ISDA CDM Structures

The following key ISDA CDM structures are important for this mapper:

  1. Trade - The top-level container for trade information

    • Contains trade date, identifiers, parties, and tradable product
  2. TradeIdentifier - Identifies the trade uniquely

    • Contains issuer, assigned identifier, and identifier type
  3. TradableProduct - Represents the tradable product in the trade

    • Contains product information, trade lots, and counterparty information
  4. ContractualProduct - Describes the contractual aspects of the product

    • Contains product taxonomy and economic terms with payouts
  5. CreditDefaultPayout - Represents the credit default protection terms

    • Contains reference entity, obligations, credit events, and settlement terms
  6. InterestRatePayout - Represents the fee leg (premium payments)

    • Contains payment details, fixed rate, and payment schedule
  7. GeneralTerms - Contains general terms of the CDS contract

    • Includes reference information, effective date, and scheduled termination date
  8. ReferenceInformation - Identifies the reference entity and obligations

    • Contains details about the entity being protected against
  9. ProtectionTerms - Defines the credit events that trigger settlement

    • Includes bankruptcy, failure to pay, restructuring, and other credit events
  10. SettlementTerms - Defines how the contract settles after a credit event

    • Includes physical or cash settlement details, currencies, and deliverable obligations

FpML to CDM Mapping

Main Mapping Structures

FpML Element/StructureCDM Class/StructureContext
<trade>TradeTop-level trade container
<tradeHeader>Fields in TradeContains trade date and identifiers
<creditDefaultSwap>TradableProduct with CreditDefaultPayoutCDS-specific information
<generalTerms>GeneralTerms in CreditDefaultPayoutGeneral contract terms
<referenceInformation>ReferenceInformation in GeneralTermsReference entity details
<feeLeg>InterestRatePayout in PayoutPremium payment terms
<protectionTerms>ProtectionTerms in CreditDefaultPayoutCredit event definitions
<creditEvents>CreditEvents in ProtectionTermsCredit events that trigger payment
<party>Party list in TradeParty information
<settlementTerms>SettlementTerms in CreditDefaultPayoutSettlement details after credit event

Detailed Element Mapping

FpML ElementCDM FieldParent CDM ClassType
<tradeDate>tradeDate.valueTradeDate
<partyTradeIdentifier>/<tradeId>tradeIdentifier[].assignedIdentifier[].identifier.valueTradeString
<scheduledTerminationDate>/<unadjustedDate>economicTerms.terminationDate.adjustableDate.unadjustedDateContractualProductDate
<referenceEntity>/<entityId>referenceInformation.referenceEntity.entityId.valueGeneralTermsString
<referenceEntity>/<entityName>referenceInformation.referenceEntity.name.valueGeneralTermsString
<referenceObligation>/<bond>/<instrumentId>referenceInformation.referenceObligation.security.productIdentifier.identifierValueGeneralTermsString
<referenceObligation>/<bond>/<seniority>referenceInformation.referenceObligation.security.debtType.debtEconomics.debtSeniorityGeneralTermsDebtSeniorityEnum
<feeLeg>/<periodicPayment>/<fixedAmountCalculation>/<calculationAmount>/<amount>priceQuantity.quantity[].value.valueTradeLotBigDecimal
<feeLeg>/<periodicPayment>/<fixedAmountCalculation>/<calculationAmount>/<currency>priceQuantity.quantity[].value.unit.currency.valueTradeLotString
<feeLeg>/<periodicPayment>/<fixedAmountCalculation>/<fixedRate>interestRatePayout.rateSpecification.fixedRate.rateSchedule.price.value.valuePayoutBigDecimal
<feeLeg>/<periodicPayment>/<paymentFrequency>interestRatePayout.paymentDates.paymentFrequencyPayoutFrequency
<feeLeg>/<periodicPayment>/<firstPaymentDate>interestRatePayout.paymentDates.firstPaymentDatePayoutDate
<protectionTerms>/<creditEvents>/<bankruptcy>/<applicable>creditDefaultPayout.protectionTerms.creditEvents.bankruptcyCreditDefaultPayoutboolean
<protectionTerms>/<creditEvents>/<failureToPay>/<paymentRequirement>creditDefaultPayout.protectionTerms.creditEvents.failureToPay.paymentRequirementCreditDefaultPayoutMoney
<protectionTerms>/<creditEvents>/<restructuring>/<applicable>creditDefaultPayout.protectionTerms.creditEvents.restructuring.applicableCreditDefaultPayoutboolean
<protectionTerms>/<obligations>/<category>creditDefaultPayout.protectionTerms.obligations.categoryCreditDefaultPayoutObligationCategoryEnum
<protectionTerms>/<settlementTerms>/<settlementCurrency>creditDefaultPayout.settlementTerms.settlementCurrency.valueCreditDefaultPayoutString
<protectionTerms>/<settlementTerms>/<physicalSettlementPeriod>/<businessDays>creditDefaultPayout.settlementTerms.physicalSettlementTerms.physicalSettlementPeriod.businessDaysCreditDefaultPayoutint

Special Considerations

Enum Mappings

The mapper handles several important enum mappings between FpML and CDM:

Obligation Category Mapping

FpML ValueCDM Enum Value
PAYMENTObligationCategoryEnum.PAYMENT
BORROWED_MONEYObligationCategoryEnum.BORROWED_MONEY
REFERENCE_OBLIGATIONS_ONLYObligationCategoryEnum.REFERENCE_OBLIGATIONS_ONLY
BONDObligationCategoryEnum.BOND
LOANObligationCategoryEnum.LOAN
BOND_OR_LOANObligationCategoryEnum.BOND_OR_LOAN

Debt Seniority Mapping

FpML ValueCDM Enum Value
SENIORDebtSeniorityEnum.SENIOR
SUBORDINATEDDebtSeniorityEnum.SUBORDINATED
SENIOR_SECUREDDebtSeniorityEnum.SENIOR_SECURED
JUNIOR_SUBORDINATEDDebtSeniorityEnum.JUNIOR_SUBORDINATED

Implementation Details

  1. Reference Entity: The mapper creates a LegalEntity for the reference entity, extracting entity ID, name, and other identifying information from the FpML.

  2. Reference Obligation: The mapper creates a ReferenceObligation for the debt instrument being referenced, including details like ISIN code and seniority.

  3. Credit Events: The mapper supports multiple credit events:

    • Bankruptcy
    • Failure to Pay (with payment requirement amount)
    • Restructuring (with restructuring type)
  4. Settlement: The mapper handles both physical and cash settlement, with appropriate settlement terms:

    • Physical settlement period (business days)
    • Settlement currency
    • Deliverable obligations
  5. Fee Leg: The fee leg is represented as an InterestRatePayout with:

    • Fixed rate (premium/coupon)
    • Payment frequency (quarterly, semi-annual, etc.)
    • First payment date and schedule