getInstrumentPayReceive

Syntax

getInstrumentPayReceive(instrument)

Details

Specify the direction of payments (pay/receive) of the input instrument(s).

Arguments

instrument is an INSTRUMENT scalar/vector indicating one or more instrument objects.

Returns

A scalar/vector of STRING type.

Examples

swap = {
    "productType": "Swap",
    "swapType": "IrSwap",
    "irSwapType": "IrFixedFloatingSwap",
    "version": 0,
    "start": 2021.05.15,
    "maturity": 2023.05.15,
    "frequency": "Quarterly",
    "fixedRate": 0.02,
    "calendar": "CFET", 
    "fixedDayCountConvention": "Actual365",
    "floatingDayCountConvention": "Actual360",
    "payReceive": "Pay",
    "iborIndex": "SHIBOR_3M",
    "spread": 0.0005,
    "notional":["CNY", 1E8]
}
ins = parseInstrument(swap)
getInstrumentPayReceive(ins)
// output: Pay

Related functions: parseInstrument, getInstrumentField, getInstrumentKeys