Products
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:
-
Trade - The top-level container for trade information
- Contains trade date, parties, product details and tradable product information
-
TradeIdentifier - Identifies the trade uniquely
- Contains issuer, identifier values, and identifier type
-
TradableProduct - Represents the tradable product in the trade
- Contains product information, trade lots, and counterparty information
-
ContractualProduct - Describes the contractual aspects of the product
- Contains product taxonomy and economic terms
-
InterestRatePayout - Represents the interest rate payout terms
- Contains payer/receiver, calculation period dates, and rate specifications
-
RateSpecification - Contains either fixed or floating rate details
- Includes fixed rate (FixedRateSpecification) or floating rate (FloatingRateSpecification) information
-
CalculationPeriodDates - Defines when calculations occur
- Contains effective date, termination date, and calculation period frequency
-
PaymentDates - Defines payment schedules
- Contains payment frequency, pay relative to, and payment dates adjustments
-
ResetDates - Defines when rates are reset (for floating legs)
- Contains reset frequency, reset relative to, and fixing dates
-
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/Structure | CDM Class/Structure | Context |
|---|---|---|
<trade> | Trade | Top-level trade container |
<tradeHeader> | Fields in Trade | Contains trade date and trade identifiers |
<tradeDate> | FieldWithMetaDate in Trade | Trade execution date |
<partyTradeIdentifier> | TradeIdentifier list in Trade | Trade identifiers |
<swap> | TradableProduct in Trade | Swap-specific information |
<swapStream> | InterestRatePayout list in economic terms | Individual swap legs |
<party> | Party list in Trade | Party information |
<productType> | ProductTaxonomy list in ContractualProduct | Product classification |
Detailed Element Mapping
| FpML Element | CDM Field | Parent CDM Class | Type |
|---|---|---|---|
<tradeDate> | tradeDate.value | Trade | Date |
<partyTradeIdentifier>/<issuer> | tradeIdentifier[].issuer.value | Trade | String |
<partyTradeIdentifier>/<tradeId> | tradeIdentifier[].assignedIdentifier[].identifier.value | Trade | String |
<party>/<partyId> | party[].partyId[].identifier.value | Trade | String |
<party>/<partyName> | party[].name.value | Trade | String |
<party>/<businessUnit>/<n> | party[].businessUnit[].name | Trade | String |
<payerPartyReference> | payerReceiver.payer | InterestRatePayout | CounterpartyRoleEnum |
<receiverPartyReference> | payerReceiver.receiver | InterestRatePayout | CounterpartyRoleEnum |
<effectiveDate>/<unadjustedDate> | calculationPeriodDates.effectiveDate.adjustableDate.unadjustedDate | InterestRatePayout | Date |
<terminationDate>/<unadjustedDate> | calculationPeriodDates.terminationDate.adjustableDate.unadjustedDate | InterestRatePayout | Date |
<calculationPeriodFrequency> | calculationPeriodDates.calculationPeriodFrequency | InterestRatePayout | CalculationPeriodFrequency |
<notionalSchedule>/<notionalStepSchedule>/<initialValue> | priceQuantity.quantity[].value.value in TradeLot | TradableProduct | BigDecimal |
<notionalSchedule>/<notionalStepSchedule>/<currency> | priceQuantity.quantity[].value.unit.currency.value in TradeLot | TradableProduct | String |
<fixedRateSchedule>/<initialValue> | rateSpecification.fixedRate.rateSchedule.price.value.value | InterestRatePayout | BigDecimal |
<floatingRateCalculation>/<floatingRateIndex> | rateSpecification.floatingRate.rateOption.value.floatingRateIndex.value | InterestRatePayout | FloatingRateIndexEnum |
<floatingRateCalculation>/<indexTenor> | rateSpecification.floatingRate.rateOption.value.indexTenor | InterestRatePayout | Period |
<dayCountFraction> | dayCountFraction.value | InterestRatePayout | DayCountFractionEnum |
<paymentFrequency> | paymentDates.paymentFrequency | InterestRatePayout | Frequency |
<resetDates>/<resetFrequency> | resetDates.resetFrequency | InterestRatePayout | ResetFrequency |
Special Considerations
Enum Mappings
The mapper handles several important enum mappings between FpML and CDM:
Day Count Fraction Mapping
| FpML Value | CDM Enum Value |
|---|---|
ACT/360 | DayCountFractionEnum.ACT_360 |
ACT/365L | DayCountFractionEnum.ACT_365L |
ACT/364 | DayCountFractionEnum.ACT_364 |
ACT/365.FIXED | DayCountFractionEnum.ACT_365_FIXED |
ACT/ACT.AFB | DayCountFractionEnum.ACT_ACT_AFB |
ACT/ACT.ICMA | DayCountFractionEnum.ACT_ACT_ICMA |
ACT/ACT.ISDA | DayCountFractionEnum.ACT_ACT_ISDA |
ACT/ACT.ISMA | DayCountFractionEnum.ACT_ACT_ISMA |
30/360 | DayCountFractionEnum._30_360 |
30E/360 | DayCountFractionEnum._30E_360 |
Floating Rate Index Mapping
| FpML Value | CDM Enum Value |
|---|---|
USD-LIBOR-BBA | FloatingRateIndexEnum.USD_LIBOR_BBA |
USD-Federal Funds-H.15 | FloatingRateIndexEnum.USD_FEDERAL_FUNDS_H_15 |
USD-SOFR-COMPOUND | FloatingRateIndexEnum.USD_SOFR_COMPOUND |
USD-LIBOR | FloatingRateIndexEnum.USD_LIBOR |
Implementation Notes
-
Global Keys: The mapper uses deterministic global keys for certain objects to ensure consistency in references.
-
Default Values: Where FpML elements are missing, the mapper provides sensible defaults with appropriate log warnings.
-
Fallbacks: The mapper includes fallback logic for handling incomplete or missing data.
-
References: The mapper manages internal references using the
ReferenceWithMetapattern, particularly for floating rate options and price schedules. -
Meta Fields: Key meta fields are added to provide additional context and global keys.