About Financial Contracts FxCross
An FxCross class allows the financial instrument to be formed from the instrument code and parameters.
FxCross.Definition object
This object creates the definition of information about the FxCross that we want to get.
Syntax
FinancialContracts.FxCross.Definition(params: FinancialContracts.FxCross.Params)
Parameters
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| params | An object literal of type FinancialContracts.FxCross.Params. | object | No | - |
FxCross.Params properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| fxCrossCode | The code of the cross currency (e.g., EURCHF). | string | Yes | . |
| fxCrossType | The type of the FX Cross instrument (see FxCross.FxCrossType). | enum | Yes | . |
| instrumentTag | This is a user-provided string that will also be part of the response. | string | Yes | . |
| tradedCrossRate | The contractual exchange rate agreed by the two counterparties. It is used to compute contraAmount if it isn't provided. | number | Yes | . |
| tradedSwapPoints | The contractual forward points agreed by the two counterparties. | number | Yes | . |
| referenceSpotRate | This is the contractual spot rate the counterparties agreed to use to calculate the outright, in case of a Forward contract. | number | Yes | . |
| referenceSwapPoints | This is the contractual swap points the counterparties agreed to use to calculate the outright, in case of a Forward/Forward contract. | number | Yes | . |
| ndfFixingSettlementCcy | This is the ISO code (e.g., EUR) of the settlement currency, in case of an NDF contract. | string | Yes | . |
| legs | Extra parameters to further describe the contract (see FxCross.FxCrossLegDefinition below). | object | Yes | . |
| pricingParameters | Pricing parameters to apply to FxCross (see FxCross.PricingParameters below). | object | Yes | |
| fields | A list of fields to return with the response. | string[] | Yes | |
| outputs | The list of outputs which can be requested (see FxCross.Output). | enum[] | Yes | |
| extendedParams | Additional parameters to apply to the request. | object | Yes |
FxCross.FxCrossLegDefinition properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| contraAmount | The amount of contraCcy exchanged to buy or sell the amount of the deal (base) currency. | number | Yes | - |
| contraCcy | The contra (quote) currency code, expressed in ISO 4217 alphabetical format (e.g., 'CHF'). | string | Yes | - |
| dealAmount | The amount of the deal (base) currency bought or sold. | number | Yes | - |
| dealCcy | The deal (base) currency code, expressed in ISO 4217 alphabetical format (e.g., 'EUR'). | string | Yes | - |
| dealCcyBuySell | The direction of the transaction in terms of the deal (base) currency (see FxCross.DealCcyBuySell). | string | Yes | - |
| endDate | The maturity date of the instrument. | string | Yes | - |
| fxLegType | The type of the FX Cross instrument's leg (see FxCross.FxCorssLegType). | string | Yes | - |
| legTag | A user defined string to identify the leg. | string | Yes | - |
| startDate | The start date of the instrument. | string | Yes | - |
| startTenor | The code indicating the period from a spot date to startDate of the instrument (e.g., '1M'). | string | Yes | - |
| tenor | The code indicating the period between startDate to endDate of the instrument (e.g., '6M', '1Y'). | string | Yes | - |
FxCross.PricingParameters properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| adjustAllDepositPointsToCrossCalendars | An indicator if DepositCcy1 and DepositCcy2 are adjusted to the cross calendar dates. | boolean | Yes | - |
| adjustAllSwapPointsToCrossCalendars | An indicator if FxSwapsCcy1 and FxSwapsCcy2 are adjusted to the cross calendar dates. | boolean | Yes | - |
| impliedDepositDateConvention | An indicator for the "DepositCcy1ImpliedFromFxSwap", "DepositCcy2ImpliedFromFxSwap" calculation methods, used to check whether DTS or DTM period is selected for the Implied Deposits calculation (see FxCross.ImpliedDepositDateConvention). | string | Yes | - |
| tenorReferenceDate | The reference date for the computation of the start date from the tenor (see FxCross.TenorReferenceDate). | string | Yes | - |
| valuationDate | The valuation date for pricing in ISO 8601 format. | string | Yes | - |
| marketDataDate | The market data date for pricing in ISO 8601 format. | string | Yes | - |
| reportCcy | Pricing data is computed in deal currency. If a report currency is set, pricing data is also computed in report currency. | string | Yes | - |
| ignoreRefCcyHolidays | The possibility to choose if holidays of the reference currency are included or not in the pricing when dates are computed. | boolean | Yes | - |
| fxSwapCalculationMethod | The method to price outrights or implied deposits (see FxCross.FxSwapCalculationMethod). | enum | Yes | - |
| priceSide | The type of price returned for pricing analysis (see FxCross.PriceSide). | enum | Yes | - |
| useDirectQuote | An indicator if the spot and the swap points should be retrieved without a pivot currency. | boolean | Yes | - |
Returned value
ContentDefinition object.
Usage
The following example demonstrates how to create a definition for financial contracts FxCross:
import { IPA } from '@lsegroup/data';
const definition = IPA.FinancialContracts.FxCross.Definition({
fxCrossCode: 'EURGBP',
fxCrossType: IPA.FinancialContracts.FxCross.FxCrossType.FxSwap,
legs: [
{
legTag: 'received',
fxLegType: IPA.FinancialContracts.FxCross.FxCrossLegType.SwapFar,
dealAmount: 1000000,
tenor: '6M',
},
{
legTag: 'paid',
fxLegType: IPA.FinancialContracts.FxCross.FxCrossLegType.SwapNear,
dealCcyBuySell: IPA.FinancialContracts.FxCross.BuySell.Sell,
dealAmount: 1000000,
tenor: '1M',
},
],
pricingParameters: { priceSide: IPA.FinancialContracts.FxCross.PriceSide.Bid },
});
`