Rates - Cross-Currency Swap

Rates - Cross-Currency Swap Documentation

Overview

The IRCrossCurrencySwapCDMMapper class is responsible for mapping FpML (Financial Products Markup Language) cross-currency swaps to the ISDA Common Domain Model (CDM) format. It extends the AbstractRateProductsCDMMapper class, inheriting common mapping functionality for interest rate products.

A cross-currency swap involves the exchange of interest payments and principal amounts in different currencies. This mapper handles the conversion of FpML XML elements representing these complex products 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, trade lots, and counterparty information
  4. ContractualProduct - Describes the contractual aspects of the product

    • Contains product taxonomy and economic terms with payouts
  5. InterestRatePayout - Represents the interest rate payout terms for each leg

    • For cross-currency swaps, there are two legs (typically fixed-fixed or fixed-floating)
    • Each leg is denominated in a different currency
  6. RateSpecification - Contains either fixed or floating rate details

    • In cross-currency swaps, often consists of FixedRateSpecification for both legs
  7. CalculationPeriodDates - Defines calculation periods for the legs

    • Contains effective date, termination date, and calculation period frequency
  8. PaymentDates - Defines payment schedules

    • Contains payment frequency, pay relative to, and adjustments
  9. SettlementTerms - Contains settlement information specific to cross-currency swaps

    • Includes settlement currency and cash settlement terms
    • Contains FX fixing dates for settlement of currency exchanges
  10. PriceQuantity - Contains pricing and notional amount details

    • For cross-currency swaps, includes different notional amounts in different currencies

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
<tradeDate>FieldWithMetaDate in TradeTrade execution date
<partyTradeIdentifier>TradeIdentifier list in TradeTrade identifiers
<swap>TradableProduct in TradeSwap-specific information
<swapStream> (multiple)InterestRatePayout listIndividual swap legs in different currencies
<party>Party list in TradeParty information
<productType>ProductTaxonomy listProduct classification
<settlementProvision>SettlementTerms in InterestRatePayoutSettlement information for cross-currency exchange

Detailed Element Mapping

FpML ElementCDM FieldParent CDM ClassType
<tradeDate>tradeDate.valueTradeDate
<partyTradeIdentifier>/<issuer>tradeIdentifier[].issuer.valueTradeString
<partyTradeIdentifier>/<tradeId>tradeIdentifier[].assignedIdentifier[].identifier.valueTradeString
<party>/<partyId>party[].partyId[].identifier.valueTradeString
<party>/<partyName>party[].name.valueTradeString
<party>/<businessUnit>/<n>party[].businessUnit[].nameTradeString
<payerPartyReference>payerReceiver.payerInterestRatePayoutCounterpartyRoleEnum
<receiverPartyReference>payerReceiver.receiverInterestRatePayoutCounterpartyRoleEnum
<effectiveDate>/<unadjustedDate>calculationPeriodDates.effectiveDate.adjustableDate.unadjustedDateInterestRatePayoutDate
<terminationDate>/<unadjustedDate>calculationPeriodDates.terminationDate.adjustableDate.unadjustedDateInterestRatePayoutDate
<calculationPeriodFrequency>calculationPeriodDates.calculationPeriodFrequencyInterestRatePayoutCalculationPeriodFrequency
<notionalSchedule>/<notionalStepSchedule>/<initialValue>priceQuantity[].quantity[].value.valueTradeLotBigDecimal
<notionalSchedule>/<notionalStepSchedule>/<currency>priceQuantity[].quantity[].value.unit.currency.valueTradeLotString
<fixedRateSchedule>/<initialValue>rateSpecification.fixedRate.rateSchedule.price.value.valueInterestRatePayoutBigDecimal
<dayCountFraction>dayCountFraction.valueInterestRatePayoutDayCountFractionEnum
<paymentFrequency>paymentDates.paymentFrequencyInterestRatePayoutFrequency
<payRelativeTo>paymentDates.payRelativeToInterestRatePayoutPayRelativeToEnum
<settlementProvision>/<settlementCurrency>settlementTerms.settlementCurrency.valueInterestRatePayoutString
<fxFixingDate>settlementTerms.cashSettlementTerms[].valuationDate.fxFixingDateInterestRatePayoutFxFixingDate

Special Considerations

Enum Mappings

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

Day Count Fraction Mapping

FpML ValueCDM Enum Value
ACT/360DayCountFractionEnum.ACT_360
ACT/365LDayCountFractionEnum.ACT_365L
ACT/364DayCountFractionEnum.ACT_364
ACT/365.FIXEDDayCountFractionEnum.ACT_365_FIXED
ACT/ACT.AFBDayCountFractionEnum.ACT_ACT_AFB
30/360DayCountFractionEnum._30_360
30E/360DayCountFractionEnum._30E_360

Counterparty Role Mapping

FpML ValueCDM Enum Value
PARTY1CounterpartyRoleEnum.PARTY_1
PARTY2CounterpartyRoleEnum.PARTY_2

Implementation Details

  1. Multiple Currencies: Cross-currency swaps involve legs in different currencies, requiring precise handling of notional amounts and settlement provisions.

  2. Cross-Currency Product Taxonomy: The mapper determines the product qualifier based on the nature of the legs:

    • InterestRate_CrossCurrency_FixedFixed: Both legs have fixed rates
    • InterestRate_CrossCurrency_FixedFloat: One leg has fixed rate, the other has floating rate
    • InterestRate_CrossCurrency_FloatFloat: Both legs have floating rates
  3. FX Settlement: Cross-currency swaps require specific settlement provisions for exchanging the different currencies, including FX fixing dates and settlement currencies.

  4. Payer/Receiver Pattern: For cross-currency swaps, the mapper enforces a specific payer/receiver pattern:

    • First leg: Party1 pays to Party2
    • Second leg: Party2 pays to Party1
  5. Global Keys: The mapper uses specific global keys for common objects:

    • Trade date: 3f28c9
    • Trade identifier: f3ebf782
    • Party references: f78b23fb for Party1, 67e3087d for Party2