getInstrumentRate
Syntax
getInstrumentRate(instrument)
Details
Get the deposit interest rate of the input instrument(s).
Arguments
instrument is an INSTRUMENT scalar/vector indicating one or more instrument objects.
Returns
A scalar/vector of DOUBLE type.
Examples
deposit = {
"productType": "Cash",
"assetType": "Deposit",
"version": 0,
"start": 2025.05.15,
"maturity": 2025.08.15,
"rate": 0.02,
"dayCountConvention": "Actual360",
"notional":["CNY", 1E6],
"payReceive": "Receive"
}
instrument = parseInstrument(deposit)
getInstrumentRate(instrument)
// output: 0.02
Related functions: parseInstrument, getInstrumentField, getInstrumentKeys
