Financial Toolbox | ![]() ![]() |
Cash flow and time mapping for bond portfolio (SIA compliant)
Syntax
[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] = cfamounts(CouponRate, Settle, Maturity, Period, Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate, StartDate, Face)
Arguments
Required arguments must be number of bonds (NUMBONDS
) by 1 or 1-by-NUMBONDS
conforming vectors or scalars. Optional arguments must be either NUMBONDS
-by-1 or 1-by-NUMBONDS
conforming vectors, scalars, or empty matrices.
Description
[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] =
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
fixed income securities. The elements contained in the 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 is zero in the case of all zero coupon bonds. This function 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
is the cash flow matrix of a portfolio of bonds. Each row represents the cash flow vector of a single bond. Each element in a column represents a specific cash flow for that bond.
CFlowDates
is the 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.
TFactors
is the 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 are useful in determining the present value of a stream of cash flows. The term "time factor" refers to the exponent TF
in the discounting equation
CFlowFlags
is the 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 (e.g., nominal coupon cash flow, front or end partial or "stub" coupon, maturity cash flow). Possible values are shown in the table.
Examples
Consider a portfolio containing a corporate bond paying interest quarterly and a treasury bond paying interest semi-annually. Compute the cash flow structure and the time factors for each bond.
Settle = '01-Nov-1993'; Maturity = ['15-Dec-1994';'15-Jun-1995']; CouponRate= [0.06; 0.05]; Period = [4;2]; Basis = [1;0]; [CFlowAmounts, CFlowDates, TFactors, CFlowFlags] = ... cfamounts(CouponRate,Settle, Maturity, Period, Basis) CFlowAmounts = -0.7667 1.5000 1.5000 1.5000 1.5000 101.5000 -1.8989 2.5000 2.5000 2.5000 102.5000 NaN CFlowDates = 728234 728278 728368 728460 728552 728643 728234 728278 728460 728643 728825 NaN TFactors = 0 0.2404 0.7403 1.2404 1.7403 2.2404 0 0.2404 1.2404 2.2404 3.2404 NaN CFlowFlags = 0 3 3 3 3 4 0 3 3 3 4 NaN
See Also
accrfrac
, cfdates
, cpncount
, cpndaten
, cpndatenq
, cpndatep
, cpndatepq
, cpndaysn
, cpndaysp
, cpnpersz
![]() | candle | cfconv | ![]() |