About Swaption
A Swaption class allows you to form the financial instrument from the instrument code and parameters.
Swaption.Definition object
This object creates the definition of information about the Swaption that we want to get.
Syntax
FinancialContracts.Swaption.Definition(params: FinancialContracts.Swaption.Params)
Parameters
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| params | An object literal of type FinancialContracts.Swaption.Params. | object | No | - |
Swaption.Params properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| underlyingDefinition | The definition of attributes of the underlying asset (see Swaption.SwapDefinition below). | object | No | - |
| bermudanSwaptionDefinition | The definition of attributes of Bermudan swaptions (see Swaption.BermudanSwaptionDefinition below). | object | Yes | - |
| buySell | The indicator of the deal side (see Swaption.BuySell). | enum | Yes | - |
| callPut | (see Swaption.CallPut). | enum | Yes | - |
| deliveryDate | The date on which the option is settled. | string | Yes | - |
| endDate | The maturity or expiry date of the instrument's leg. The value is expressed in ISO 8601 format. | string | Yes | - |
| exerciseStyle | The option style based on its exercise restrictions (see Swaption.ExerciseStyle). | enum | Yes | - |
| instrumentTag | A user defined string to identify the instrument. It can be used to link output results to the instrument definition. | string | Yes | - |
| notionalAmount | The notional amount of the instrument. | number | Yes | - |
| payments | The array of properties which can be used to define instrument’s premium for cash flow analysis (see InputFlow). | array | Yes | - |
| premiumSettlementType | The settlement type of the option premium (see Swaption.PremiumSettlementType). | string | Yes | - |
| settlementType | The settlement method for options when exercised (see Swaption.OptionSettlementType). | enum | Yes | - |
| spreadVsAtmInBp | The spread added to the strike rate of the equivalent at-the-money swaption. | number | Yes | - |
| startDate | The start date of the instrument. | string | Yes | - |
| strikePercent | The set price at which the owner of the option can buy or sell the underlying asset. | number | Yes | - |
| swaptionType | The indicator if the swaption is a payer or a receiver (see Swaption.SwaptionType). | string | Yes | - |
| tenor | The code indicating the period between StartDate and EndDate of the instrument (e.g. '6M', '1Y'). | string | Yes | - |
| pricingParameters | Pricing parameters to apply to the Swaption instrument (see Swaption.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 Swaption.Output). | enum[] | Yes | - |
| extendedParams | Additional parameters to apply to the request. | object | Yes | - |
Swaption.InputFlow properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| amount | The amount paid (negative sign of the amount) or received (positive sign of the amount). | number | Yes | - |
| currency | The code of amount currency, expressed in ISO 4217 alphabetical format (e.g., 'CHF'). | string | Yes | - |
| date | The date of the instrument cash flow. | string | Yes | - |
Swaption.SwapDefinition properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| instrumentCode | Code used in the input to define the option instrument. | string | Yes | - |
| instrumentTag | A user defined string to identify the instrument. It can be used to link output results to the instrument definition | string | Yes | - |
| isNonDeliverable | An indicator whether the instrument is non-deliverable. | boolean | Yes | - |
| legs | The input array which defines the instrument’s legs using the SwapLegDefinition list. It is used if no template or instrumentCode have been defined (see IRSwap.SwapLegDefinition). | object[] | Yes | - |
| settlementCcy | The currency code, which defines the choice of the discounting curve for non-deliverable swaps. The value is expressed in ISO 4217 alphabetical format. | string | Yes | - |
| startDate | The start date of the instrument. This value is expressed in ISO 8601 format. | string | Yes | - |
| startTenor | The code indicating the period from a spot date to startDate of the instrument. | string | Yes | - |
| endDate | The maturity or expiry date of the instrument. The value is expressed in ISO 8601 format. | string | Yes | - |
| template | A reference to a style used to define the instrument. | string | Yes | - |
| tenor | The code indicating the period between StartDate and EndDate of the instrument (e.g. '6M', '1Y'). | string | Yes | - |
| tradeDate | The date when the instrument is traded. The value is expressed in ISO 8601 format. | number | Yes | - |
Swaption.BermudanSwaptionDefinition properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| exerciseSchedule | The exercise date of the Bermudan swaption. | string[] | No | - |
| exerciseScheduleType | Type of exercise type of the bermudan option (see Swaption.ScheduleType). | enum | No | - |
| notificationDays | The notification days. | number | No | - |
Swaption.PricingParameters properties:
| Value | Description | Data type | Optional | Default value |
|---|---|---|---|---|
| exerciseDate | The date when the option can be exercised. | string | Yes | - |
| impliedVolatilityBp | User defined implied normal volatility, expressed in basis points. | number | Yes | - |
| impliedVolatilityPercent | User defined implied lognormal volatility, expressed in percent. | number | Yes | - |
| marketDataDate | The date at which the market data is retrieved. | string | Yes | - |
| marketValueInDealCcy | The market value of the instrument. The value is expressed in the deal currency. | number | Yes | - |
| nbIterations | The number of steps for the Bermudan swaption pricing via the Hull-White One-Factor (HW1F) tree. | number | Yes | - |
| priceSide | The quoted price side of the instrument (see Swaption.PriceSide). | string | Yes | - |
| reportCcy | The currency code set for the fields ending with 'xxxInReportCcy'. | string | Yes | - |
| simulateExercise | An indicator if the option should be assumed to be exercised or not. | boolean | Yes | - |
| valuationDate | The date at which the instrument's leg is valued. The value is expressed in ISO 8601 format. | string | Yes | - |
Returned value
ContentDefinition object.
Usage
The following example demonstrates how to create a definition for financial contracts Swaption:
import { IPA } from '@lsegroup/data';
const definition = IPA.FinancialContracts.Swaption.Definition({
instrumentTag: 'myEURswaption',
settlementType: IPA.FinancialContracts.Swaption.OptionSettlementType.Cash,
tenor: '5Y',
strikePercent: 2,
buySell: IPA.FinancialContracts.Swaption.BuySell.Buy,
callPut: IPA.FinancialContracts.Swaption.CallPut.Call,
exerciseStyle: IPA.FinancialContracts.Swaption.ExerciseStyle.Euro,
underlyingDefinition: {
tenor: '5Y',
template: 'EUR_AB6E',
},
pricingParameters: { valuationDate: '2020-04-24' },
});
`