Products
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:
-
Trade - The top-level container for trade information
- Contains trade date, identifiers, parties, and tradable product
-
TradeIdentifier - Identifies the trade uniquely
- Contains issuer, assigned identifier, and identifier type
-
TradableProduct - Represents the tradable product in the trade
- Contains product, trade lots, and counterparty information
-
ContractualProduct - Describes the contractual aspects of the product
- Contains product taxonomy and economic terms with payouts
-
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
-
RateSpecification - Contains either fixed or floating rate details
- In cross-currency swaps, often consists of FixedRateSpecification for both legs
-
CalculationPeriodDates - Defines calculation periods for the legs
- Contains effective date, termination date, and calculation period frequency
-
PaymentDates - Defines payment schedules
- Contains payment frequency, pay relative to, and adjustments
-
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
-
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/Structure | CDM Class/Structure | Context |
|---|---|---|
<trade> | Trade | Top-level trade container |
<tradeHeader> | Fields in Trade | Contains trade date and identifiers |
<tradeDate> | FieldWithMetaDate in Trade | Trade execution date |
<partyTradeIdentifier> | TradeIdentifier list in Trade | Trade identifiers |
<swap> | TradableProduct in Trade | Swap-specific information |
<swapStream> (multiple) | InterestRatePayout list | Individual swap legs in different currencies |
<party> | Party list in Trade | Party information |
<productType> | ProductTaxonomy list | Product classification |
<settlementProvision> | SettlementTerms in InterestRatePayout | Settlement information for cross-currency exchange |
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 | TradeLot | BigDecimal |
<notionalSchedule>/<notionalStepSchedule>/<currency> | priceQuantity[].quantity[].value.unit.currency.value | TradeLot | String |
<fixedRateSchedule>/<initialValue> | rateSpecification.fixedRate.rateSchedule.price.value.value | InterestRatePayout | BigDecimal |
<dayCountFraction> | dayCountFraction.value | InterestRatePayout | DayCountFractionEnum |
<paymentFrequency> | paymentDates.paymentFrequency | InterestRatePayout | Frequency |
<payRelativeTo> | paymentDates.payRelativeTo | InterestRatePayout | PayRelativeToEnum |
<settlementProvision>/<settlementCurrency> | settlementTerms.settlementCurrency.value | InterestRatePayout | String |
<fxFixingDate> | settlementTerms.cashSettlementTerms[].valuationDate.fxFixingDate | InterestRatePayout | FxFixingDate |
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 |
30/360 | DayCountFractionEnum._30_360 |
30E/360 | DayCountFractionEnum._30E_360 |
Counterparty Role Mapping
| FpML Value | CDM Enum Value |
|---|---|
PARTY1 | CounterpartyRoleEnum.PARTY_1 |
PARTY2 | CounterpartyRoleEnum.PARTY_2 |
Implementation Details
-
Multiple Currencies: Cross-currency swaps involve legs in different currencies, requiring precise handling of notional amounts and settlement provisions.
-
Cross-Currency Product Taxonomy: The mapper determines the product qualifier based on the nature of the legs:
InterestRate_CrossCurrency_FixedFixed: Both legs have fixed ratesInterestRate_CrossCurrency_FixedFloat: One leg has fixed rate, the other has floating rateInterestRate_CrossCurrency_FloatFloat: Both legs have floating rates
-
FX Settlement: Cross-currency swaps require specific settlement provisions for exchanging the different currencies, including FX fixing dates and settlement currencies.
-
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
-
Global Keys: The mapper uses specific global keys for common objects:
- Trade date:
3f28c9 - Trade identifier:
f3ebf782 - Party references:
f78b23fbfor Party1,67e3087dfor Party2
- Trade date: