Financial Derivatives Toolbox    
instcf

Construct cash flow instrument

Syntax

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 bond. A vector of integers.
0 = actual/actual (default), 1 = 30/360, 2 = actual/360,
3 = actual/365.

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 meta-data 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, e.g.,
TypeString = 'CashFlow'.

See Also

hjmprice, instaddfield, instdisp, instget, intenvprice


  instcap instdelete