Products
FX - Forward
FX - Forward Documentation
Overview
The FXForwardCDMMapper class is responsible for mapping FpML (Financial Products Markup Language) foreign exchange forward contracts to the ISDA Common Domain Model (CDM) format. It extends the AbstractFXProductsCDMMapper class, inheriting common mapping functionality for FX products.
An FX forward is a contract to exchange one currency for another at a predetermined exchange rate on a specified future date. This mapper handles the conversion of FpML XML elements representing FX forward contracts 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 information, trade lots, and counterparty information
-
ContractualProduct - Describes the contractual aspects of the product
- Contains product taxonomy and economic terms
-
FXForwardPayout - Represents the FX forward payout terms
- Contains currency pair, exchange rate, and settlement terms
-
CurrencyPair - Defines the currencies being exchanged
- Contains base currency and quote currency
-
ExchangeRate - Contains the forward exchange rate
- Includes rate value and quotation method
-
SettlementTerms - Defines settlement details
- Contains settlement date, currencies, and amounts
-
TradeLot - Contains pricing and quantity information
- Includes price quantities for both currencies
-
PriceQuantity - Contains pricing and amount details
- Includes observable with exchange rate
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 |
<fxForward> | TradableProduct with FXForwardPayout | FX forward-specific information |
<party> | Party list in Trade | Party information |
<productType> | ProductTaxonomy list | Product classification |
<settlementTerms> | SettlementTerms in FXForwardPayout | Settlement details |
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 |
<buyerPartyReference> | payerReceiver.payer | FXForwardPayout | CounterpartyRoleEnum |
<sellerPartyReference> | payerReceiver.receiver | FXForwardPayout | CounterpartyRoleEnum |
<valueDate> | settlementTerms.settlementDate | FXForwardPayout | Date |
<currency1> | currencyPair.baseCurrency.value | FXForwardPayout | String |
<currency2> | currencyPair.quoteCurrency.value | FXForwardPayout | String |
<exchangeRate> | exchangeRate.rate.value | FXForwardPayout | BigDecimal |
<amount1> | priceQuantity[0].quantity[].value.value | TradeLot | BigDecimal |
<amount2> | priceQuantity[1].quantity[].value.value | TradeLot | BigDecimal |
<settlementType> | settlementTerms.settlementType | FXForwardPayout | SettlementTypeEnum |
<settlementCurrency> | settlementTerms.settlementCurrency.value | FXForwardPayout | String |
Special Considerations
Enum Mappings
The mapper handles several important enum mappings between FpML and CDM:
Settlement Type Mapping
| FpML Value | CDM Enum Value |
|---|---|
Regular | SettlementTypeEnum.REGULAR |
Cash | SettlementTypeEnum.CASH |
Physical | SettlementTypeEnum.PHYSICAL |
Counterparty Role Mapping
| FpML Value | CDM Enum Value |
|---|---|
PARTY1 | CounterpartyRoleEnum.PARTY_1 |
PARTY2 | CounterpartyRoleEnum.PARTY_2 |
Implementation Details
-
Currency Pair: The mapper creates a
CurrencyPairobject with base and quote currencies, following standard FX market conventions. -
Exchange Rate: The exchange rate is stored as a
PriceQuantitywith an observable containing the rate value. -
Settlement: The mapper handles different settlement types:
- Regular settlement (standard FX forward)
- Cash settlement (NDF - Non-Deliverable Forward)
- Physical settlement (standard FX forward)
-
Amounts: The mapper handles both currency amounts:
- Base currency amount
- Quote currency amount (calculated using the exchange rate)
-
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: