Rates - Fix-Float Swap

Rates - Fix-Float Swap Documentation

Overview

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

This mapper handles the conversion of FpML XML elements to the corresponding CDM objects, transforming the data representation while preserving the semantic meaning of interest rate fixed-float swaps.

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, parties, product details and tradable product information
  2. TradeIdentifier - Identifies the trade uniquely

    • Contains issuer, identifier values, 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
  5. InterestRatePayout - Represents the interest rate payout terms

    • Contains payer/receiver, calculation period dates, and rate specifications
  6. RateSpecification - Contains either fixed or floating rate details

    • Includes fixed rate (FixedRateSpecification) or floating rate (FloatingRateSpecification) information
  7. CalculationPeriodDates - Defines when calculations occur

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

    • Contains payment frequency, pay relative to, and payment dates adjustments
  9. ResetDates - Defines when rates are reset (for floating legs)

    • Contains reset frequency, reset relative to, and fixing dates
  10. PriceQuantity - Represents pricing and quantity information

    • Contains price (for rates), quantity (for notional amounts), and observable (for rate options)

FpML to CDM Mapping

Main Mapping Structures

FpML Element/StructureCDM Class/StructureContext
<trade>TradeTop-level trade container
<tradeHeader>Fields in TradeContains trade date and trade identifiers
<tradeDate>FieldWithMetaDate in TradeTrade execution date
<partyTradeIdentifier>TradeIdentifier list in TradeTrade identifiers
<swap>TradableProduct in TradeSwap-specific information
<swapStream>InterestRatePayout list in economic termsIndividual swap legs
<party>Party list in TradeParty information
<productType>ProductTaxonomy list in ContractualProductProduct classification

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.value in TradeLotTradableProductBigDecimal
<notionalSchedule>/<notionalStepSchedule>/<currency>priceQuantity.quantity[].value.unit.currency.value in TradeLotTradableProductString
<fixedRateSchedule>/<initialValue>rateSpecification.fixedRate.rateSchedule.price.value.valueInterestRatePayoutBigDecimal
<floatingRateCalculation>/<floatingRateIndex>rateSpecification.floatingRate.rateOption.value.floatingRateIndex.valueInterestRatePayoutFloatingRateIndexEnum
<floatingRateCalculation>/<indexTenor>rateSpecification.floatingRate.rateOption.value.indexTenorInterestRatePayoutPeriod
<dayCountFraction>dayCountFraction.valueInterestRatePayoutDayCountFractionEnum
<paymentFrequency>paymentDates.paymentFrequencyInterestRatePayoutFrequency
<resetDates>/<resetFrequency>resetDates.resetFrequencyInterestRatePayoutResetFrequency

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
ACT/ACT.ICMADayCountFractionEnum.ACT_ACT_ICMA
ACT/ACT.ISDADayCountFractionEnum.ACT_ACT_ISDA
ACT/ACT.ISMADayCountFractionEnum.ACT_ACT_ISMA
30/360DayCountFractionEnum._30_360
30E/360DayCountFractionEnum._30E_360

Floating Rate Index Mapping

FpML ValueCDM Enum Value
USD-LIBOR-BBAFloatingRateIndexEnum.USD_LIBOR_BBA
USD-Federal Funds-H.15FloatingRateIndexEnum.USD_FEDERAL_FUNDS_H_15
USD-SOFR-COMPOUNDFloatingRateIndexEnum.USD_SOFR_COMPOUND
USD-LIBORFloatingRateIndexEnum.USD_LIBOR

Implementation Notes

  1. Global Keys: The mapper uses deterministic global keys for certain objects to ensure consistency in references.

  2. Default Values: Where FpML elements are missing, the mapper provides sensible defaults with appropriate log warnings.

  3. Fallbacks: The mapper includes fallback logic for handling incomplete or missing data.

  4. References: The mapper manages internal references using the ReferenceWithMeta pattern, particularly for floating rate options and price schedules.

  5. Meta Fields: Key meta fields are added to provide additional context and global keys.