getInstrumentPayoffType
Syntax
getInstrumentPayoffType(instrument)
Details
Get the payoff type 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
option = {
"productType": "Option",
"optionType": "EuropeanOption",
"assetType": "FxEuropeanOption",
"version": 0,
"notional": ["EUR", 1000000.0],
"strike": 1.2,
"maturity": "2025.10.08",
"payoffType": "Call",
"dayCountConvention": "Actual365",
"underlying": "EURUSD"
}
ins = parseInstrument(option)
getInstrumentPayoffType(ins)
// output: Call
Related functions: parseInstrument, getInstrumentField, getInstrumentKeys
