LSEG Data Library for TypeScript

About Financial Contracts IRSwap

The IRSwap class allows to form the financial instrument from instrument codes and parameters.

IRSwap.Definition object

This object creates the definition of information about the IRSwap that we want to get.

Syntax

FinancialContracts.IRSwap.Definition(params: FinancialContracts.IRSwap.Params)

Parameters

Value Description Data type Optional Default value
params An object literal of type FinancialContracts.IRSwap.Params. object No -

IRSwap.Params properties:

Value Description Data type Optional Default value
instrumentTag A user provided string that will also be part of the response. Max length: 40 characters. Only alphabetic, numeric and '- _.#=@' characters are allowed. string Yes -
tradeDate Swap contract creation date. string Yes -
startDate The date on which the swap starts accruing interest (effective date). string Yes -
endDate The maturity date of the swap. string Yes -
tenor The period code that represents the time between the start date and end date. string Yes -
settlementCcy For non-deliverable instrument, the ISO 4217 code of the settlement currency. string Yes -
isNonDeliverable A flag that indicates if the swap is non-deliverable. boolean Yes -
instrumentCode A swap RIC that is used to retrieve the description of the swap contract. string Yes -
startTenor The code indicating the period from a spot date to startDate of the instrument. string Yes -
template A reference to a common swap contract. string Yes -
legs The legs of the Swap to provide a full definition of the swap if no template or instrumentCode have been defined (see IRSwap.SwapLegDefinition below). object Yes -
pricingParameters Pricing parameters to apply to the IRSwap instrument (see IRSwap.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 IRSwap.Output). enum[] Yes -
extendedParams Additional parameters to apply to the request. object Yes -

IRSwap.SwapLegDefinition properties:

Value Description Data type Optional Default value
interestType A flag that indicates whether the leg is fixed or float (see IRSwap.InterestType). enum No -
direction The direction of the leg (see IRSwap.Direction). enum No -
notionalCcy ISO 4217 code of the notional currency. string No -
interestPaymentFrequency Frequency of the interest payments (see IRSwap.PaymentFrequency). enum Yes -
interestCalculationMethod User-defined string to identify the leg (see IRSwap.DayCountBasisConvention). enum Yes -
legTag The method used to calculate the interest payments. string Yes -
notionalAmount Notional amount of the leg at the period start date. number Yes -
fixedRatePercent Fixed coupon rate in percentage. number Yes -
indexName The name of the floating rate index. Cf list of index names below. string Yes -
indexTenor The tenor (1M, 2M, ..., 1Y) of the floating rate index. string Yes -
indexFixingRIC RIC to get the fixing. This value overrides the RIC associated internally with the IndexName and IndexTenor. string Yes -
spreadBp The spread in basis point that is added to the floating rate index value. number Yes -
accruedCalculationMethod The method used calculate the accrued interest payment. Possible values are the same as for the interestCalculationMethod (see IRSwap.DayCountBasisConvention). enum Yes -
paymentBusinessDayConvention The method to adjust dates to a working day (see IRSwap.BusinessDayConvention). enum Yes -
paymentRollConvention The method to adjust payment dates when they fall at the end of the month (28th of February, 30th, 31st) (see IRSwap.PaymentRollConvention). enum Yes -
indexResetFrequency The reset frequency in case the leg Type is Float (see IRSwap.ResetFrequency). enum Yes -
indexResetType A flag that indicates if the floating rate index is reset before the coupon period starts or at the end of the coupon period (see IRSwap.ResetType). enum Yes -
indexFixingLag Defines the number of working days between the fixing date and the start of the coupon period ('InAdvance') or the end of the coupon period ('InArrears'). Cf indexResetType field. number Yes -
firstRegularPaymentDate The first regular coupon payment date for swaps with an odd first coupon. string Yes -
lastRegularPaymentDate The last regular coupon payment date for swaps with an odd last coupon. string Yes -
amortizationSchedule A structure that defines the amortization schedule of the swap (see Amortizations section for more details). any Yes -
paymentBusinessDays A list of coma-separated calendar codes to adjust dates (e.g., 'EMU' or 'USA'). string Yes -
notionalExchange A flag that indicates if and when the notional amount exchanged (see IRSwap.NotionalExchange). enum Yes -
adjustInterestToPaymentDate A flag that indicates if the coupon dates are adjusted to the payment dates (see IRSwap.AdjustInterest). enum Yes -
indexCompoundingMethod A flag that defines how the coupon rate is calculated from the reset floating rates when the reset frequency is higher than the interest payment frequency (e.g. daily index reset with quarterly interest payment) (see IRSwap.IndexCalculationMethod). enum Yes -
interestPaymentDelay The number of working days between the end of coupon period and the actual interest payment date. number Yes -
stubRule The rule that defines whether coupon roll dates are calculated backwards from maturity or forward from the issue date (see IRSwap.StubRule). enum Yes -

IRSwap.PricingParameters properties:

Value Description Data type Optional Default value
applySeasonality A flag indicating if the seasonality vector is used to adjust the inflation swap cashFlows. boolean Yes -
benchmarkInstrumentCode The instrument code of the bond used as benchmark to hedge the swap (available for IRS only). string Yes -
dealtFx see IRSwap.DealtFx below. object Yes -
indexConvexityAdjustmentIntegrationMethod The integration method used for static replication method (see ConvexityAdjustmentIntegrationMethod). string Yes -
indexConvexityAdjustmentMethod The convexity adjustment method (see ConvexityAdjustmentMethod). string Yes -
valuationDate The valuation date for pricing. 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 -
marketDataDate The market data date for pricing. string Yes -
marketValueInReportCcy The market value of the instrument. number Yes -
marketValueInDealCcy The target market value of the swap expressed in deal currency. number Yes -
priceSide The price side of the instrument which comes from the instrument's quote or from the curve (derived from quotes) used to value the instrument (see PriceSide). string Yes -
discountingTenor User defined discounting tenor (ex: OIS, 1M, 3M, 6M, 1Y) applied to both legs of the swap. string Yes -
discountingCcy User defined discounting currency. string Yes -
indexConvexityAdjustmentType Convexity adjustment type for CMS swaps and Libor in arrears swaps. Values can be: None, BlackScholes, LiborSwapMethod, or Replication. string Yes -
tenorReferenceDate A reference if the contract's start date is calculated from a valuation date or a spot date (see TenorReferenceDate). string Yes -
useLegsSigning An indicator that changes the sign of risk measures, pricing analysis and valuation fields computed for the paid leg. boolean Yes -

IRSwap.DealtFx

Value Description Data type Optional Default value
crossCode - string Yes -
rate - number Yes -

Returned value

ContentDefinition object.

Usage

The following example demonstrates how to create a definition for financial contracts IRSwap:

import { IPA } from '@lsegroup/data';

const definition = IPA.FinancialContracts.IRSwap.Definition({
    instrumentCode: 'EURAB6E17Y=TWEB',
    startDate: '2020-08-17T00:00:00Z',
    endDate: '2020-08-22T00:00:00Z',
    pricingParameters: {
        valuationDate: '2020-08-21T00:00:00Z',
    },
    outputs: [IPA.FinancialContracts.IRSwap.Output.Data, IPA.FinancialContracts.IRSwap.Output.Headers],
});
`
1136 words (5:59 mins)