instcf

Construct cash flow instrument

Syntax

InstSet = instcf(InstSet, CFlowAmounts, CFlowDates, Settle,
Basis)
[FieldList, ClassList, TypeString] = instcf

Arguments

InstSet

Instrument variable. This argument is specified only when adding cash flow instruments to an existing instrument set. See instget for more information on the InstSet variable.

CFlowAmounts

Number of instruments (NINST) by maximum number of cash flows (MOSTCFS) matrix of cash flow amounts. Each row is a list of cash flow values for one instrument. If an instrument has fewer than MOSTCFS cash flows, the end of the row is padded with NaNs.

CFlowDates

NINST-by-MOSTCFS matrix of cash flow dates. Each entry contains the date of the corresponding cash flow in CFlowAmounts.

Settle

Settlement date on which the cash flows are priced.

Basis

(Optional) Day-count basis of the instrument. A vector of integers.

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (BMA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/actual (ISDA)

  • 13 = BUS/252

For more information, see basis.

Only one data argument is required to create an instrument. Other arguments can be omitted or passed as empty matrices []. Dates can be input as serial date numbers or date strings.

Description

InstSet = instcf(InstSet, CFlowAmounts, CFlowDates, Settle,
Basis)
creates a new instrument set from data arrays or adds instruments of type CashFlow to an instrument set.

[FieldList, ClassList, TypeString] = instcf lists field metadata for an instrument of type CashFlow.

FieldList is a number of fields (NFIELDS)-by-1 cell array of strings listing the name of each data field for this instrument type.

ClassList is an NFIELDS-by-1 cell array of strings listing the data class of each field. The class determines how arguments are parsed. Valid strings are 'dble', 'date', and 'char'.

TypeString specifies the type of instrument added; for example,
TypeString = 'CashFlow'.

Was this topic helpful?