Cash flow and time mapping for bond portfolio
[CFlowAmounts,CFlowDates,TFactors,CFlowFlags,CFPrincipal]
= cfamounts(CouponRate,Settle,Maturity)
[CFlowAmounts,CFlowDates,TFactors,CFlowFlags,CFPrincipal]
= cfamounts(CouponRate,Settle,Maturity,Period,Basis,EndMonthRule,IssueDate,FirstCouponDate,LastCouponDate,StartDate,Face)
[CFlowAmounts,CFlowDates,TFactors,CFlowFlags,CFPrincipal]
= cfamounts(CouponRate,Settle,Maturity,'ParameterName'
,ParameterValue
,
...)
[CFlowAmounts,CFlowDates,TFactors,CFlowFlags,CFPrincipal]
= cfamounts(CouponRate,Settle,Maturity)
returns matrices
of cash flow amounts, cash flow dates, time factors, and cash flow
flags for a portfolio of NUMBONDS
fixedincome
securities.
The elements contained in the cfamounts
cash
flow matrix, time factor matrix, and cash flow flag matrix correspond
to the cash flow dates for each security. The first element of each
row in the cash flow matrix is the accrued interest payable on each
bond. This accrued interest is zero in the case of all zero coupon
bonds. cfamounts
determines all cash flows and
time mappings for a bond whether or not the coupon structure contains
odd first or last periods. All output matrices are padded with NaN
s
as necessary to ensure that all rows have the same number of elements.
[CFlowAmounts,CFlowDates,TFactors,CFlowFlags,CFPrincipal]
= cfamounts(CouponRate,Settle,Maturity,Period,Basis,EndMonthRule,IssueDate,FirstCouponDate,LastCouponDate,StartDate,Face)
returns
matrices of cash flow amounts, cash flow dates, time factors, and
cash flow flags for a portfolio of NUMBONDS
fixedincome
securities defined using required and optional inputs.
[CFlowAmounts,CFlowDates,TFactors,CFlowFlags,CFPrincipal]
= cfamounts(CouponRate,Settle,Maturity,
accepts optional inputs as one or more commaseparated
parameter/value pairs. 'ParameterName'
,ParameterValue
,
...)'ParameterName'
is
the name of the parameter inside single quotes. ParameterValue
is
the value corresponding to 'ParameterName'
.
Specify parameter/value pairs in any order. Names are caseinsensitive.

Decimal number indicating the annual percentage rate used to
determine the coupons payable on a bond.
 

Settlement date. A vector of serial date numbers, date character
vectors, or datetime arrays.  

Maturity date. A vector of serial date numbers, date character vectors, or datetime arrays. 
Enter the following inputs using an ordered syntax or as parameter/value pairs. You cannot mix ordered syntax with parameter/value pairs.

Coupons per year of the bond. A vector of integers. Values are Default:  

Daycount basis of the instrument. A vector of integers.
For more information, see basis. Default:  

Endofmonth rule. A vector. This rule applies only when
Default:  

Issue date for a bond. Default: If you do not specify an  

Date when a bond makes its first coupon payment, specified as
a serial date number, date character vector, or datetime array. Default: If you do not specify a  

Last coupon date of a bond before the maturity date, specified
as a serial date number, date character vector, or datetime array. Default: If you do not specify a  

Date, specified as a serial date number, date character vector, or datetime array, when a bond actually starts (the date from which a bond cash flow is considered). To make an instrument forwardstarting, specify this date as a future date. Default: If you do not specify  

Face or par value.
Default: 
Enter the following inputs only as parameter/value pairs.

Adjust the cash flows based on the actual period day count. Default: 

Require payment dates to be business dates.
Default: 

Compounding frequency for yield calculation. Possible values
include: Default: SIA bases (0–7) and BUS/252 use a semiannual compounding convention and ICMA bases (8–12) use an annual compounding convention. 

Basis used to compute the discount factors for computing the
yield. The possible values for
If a SIA daycount basis is defined in the If an ICMA daycount basis or BUS/252 is defined in the Default: SIA bases use the 

Holidays used for business day convention. Default: If no dates are specified, 

Type of principal for case when a Default: 

Cash flow amounts. First entry in each row vector is the accrued interest due at settlement. This amount could be zero, positive or negative. If no accrued interest is due, the first column is zero. If the bond is trading excoupon then the accrued interest is negative.  

Cash flow date matrix of a portfolio of bonds. Each row represents a single bond in the portfolio. Each element in a column represents a cash flow date of that bond. If all of the above inputs (  

Matrix of time factors for a portfolio of bonds. Each row corresponds to the vector of time factors for each bond. Each element in a column corresponds to the specific time factor associated with each cash flow of a bond. Time factors help determine the present value of a stream of cash flows. The term time factor refers to the exponent TF in the discounting equation $$PV={\displaystyle \sum _{i=1}^{n}\left(\frac{CF}{{(1+\frac{z}{f})}^{TF}}\right)},$$ where:
 

Matrix of cash flow flags for a portfolio of bonds. Each row corresponds to the vector of cash flow flags for each bond. Each element in a column corresponds to the specific flag associated with each cash flow of a bond. Flags identify the type of each cash flow (for example, nominal coupon cash flow, front, or end partial, or "stub" coupon, maturity cash flow).
 


Krgin, Dragomir. Handbook of Global Fixed Income Calculations. John Wiley & Sons, 2002.
Mayle, Jan. "Standard Securities Calculations Methods: Fixed Income Securities Formulas for Analytic Measures." SIA, Vol 2, Jan 1994.
Stigum, Marcia, and Franklin Robinson. Money Market and Bond Calculations. McGrawHill, 1996.
accrfrac
 cfdates
 cftimes
 cpncount
 cpndaten
 cpndatenq
 cpndatep
 cpndatepq
 cpndaysn
 cpndaysp
 datetime