Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

cfamounts - Cash flow and time mapping for bond portfolio

Syntax

[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] =
cfamounts(CouponRate, Settle, Maturity)
[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] =
cfamounts(CouponRate, Settle, Maturity, Period,
Basis, EndMonthRule, IssueDate, FirstCouponDate,
LastCouponDate, StartDate, Face)
[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] =
cfamounts(CouponRate, Settle, Maturity,
'ParameterName', 'ParameterValue ...)

Description

[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] = cfamounts(CouponRate, Settle, Maturity) returns matrices of cash flow amounts, cash flow dates, time factors, and cash flow flags for a portfolio of NUMBONDS fixed income securities.

[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 defined using required and optional inputs.

[CFlowAmounts, CFlowDates, TFactors, CFlowFlags] = cfamounts(CouponRate, Settle, Maturity, 'ParameterName', 'ParameterValue ...) accepts optional inputs as one or more comma-separated parameter/value pairs. '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 case-insensitive.

Inputs

CouponRate

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

Settle

Settlement date. A vector of serial date numbers or date strings. Settle must be earlier than or equal to Maturity.

Maturity

Maturity date. A vector of serial date numbers or date strings.

Ordered Input or Parameter–Value Pairs

Enter the following inputs using an ordered syntax or as parameter/value pairs. You cannot mix ordered syntax with parameter/value pairs.

Period

Coupons per year of the bond. A vector of integers. Values are 0, 1, 2, 3, 4, 6, and 12.

Default: 2

Basis

Day-count basis of the instrument. A vector of integers.

  • 0 = actual/actual

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ISMA)

  • 9 = actual/360 (ISMA)

  • 10 = actual/365 (ISMA)

  • 11 = 30/360E (ISMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

Default: 0

EndMonthRule

End-of-month rule. A vector. This rule applies only when Maturity is an end-of-month date for a month having 30 or fewer days. 0 = ignore rule, meaning that a bond coupon payment date is always the same numerical day of the month. 1 = set rule on, meaning that a bond coupon payment date is always the last actual day of the month.

Default: 1

IssueDate

Issue date for a bond.

FirstCouponDate

Irregular or normal first coupon date.

LastCouponDate

Irregular or normal last coupon date.

StartDate

Date when a bond actually starts (the date from which a bond cash flow is considered). To make an instrument forward-starting, specify this date as a future date. If you do not specify StartDate, the effective start date is the Settle date.

Face

Face or par value.

Default: 100

Parameter–Value Pairs

Enter the following inputs only as parameter/value pairs.

CompoundingFrequency

Compounding frequency for yield calculation. By default, SIA bases (0-7) and BUS/252 use a semiannual compounding convention and ISMA bases (8-12) use an annual compounding convention.

DiscountBasis

Basis used to compute the discount factors for computing the yield. The default behavior is for SIA bases to use the actual/actual day count to compute discount factors. If you use ISMA day counts and BUS/252, the specified bases are used.

Outputs

CFlowAmounts

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

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

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

where:

PV =

Present value of a cash flow.

CF =

The cash flow amount.

z =

The risk-adjusted annualized rate or yield corresponding to a given cash flow. The yield is quoted on a semiannual basis.

f =

The frequency of quotes for the yield.

TF =

Time factor for a given cash flow. Time is measured in semiannual periods from the settlement date to the cash flow date. In computing time factors, use SIA actual/actual day count conventions for all time factor calculations.

CFlowFlags

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 (for example, nominal coupon cash flow, front, or end partial, or "stub" coupon, maturity cash flow). Possible values are

Flag

Cash Flow Type

0

Accrued interest due on a bond at settlement.

1

Initial cash flow amount smaller than normal due to a "stub" coupon period. A stub period is created when the time from issue date to first coupon is shorter than normal.

2

Larger than normal initial cash flow amount because the first coupon period is longer than normal.

3

Nominal coupon cash flow amount.

4

Normal maturity cash flow amount (face value plus the nominal coupon amount).

5

End "stub" coupon amount (last coupon period is abnormally short and actual maturity cash flow is smaller than normal).

6

Larger than normal maturity cash flow because the last coupon period longer than normal.

7

Maturity cash flow on a coupon bond when the bond has less than one coupon period to maturity.

8

Smaller than normal maturity cash flow when the bond has less than one coupon period to maturity.

9

Larger than normal maturity cash flow when the bond has less than one coupon period to maturity.

10

Maturity cash flow on a zero coupon bond.

Definitions

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 NaNs as necessary to ensure that all rows have the same number of elements.

Examples

Compute the cash flow structure and time factors for a bond portfolio containing a corporate bond paying interest quarterly and a Treasury bond paying interest semiannually:

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)

This returns:

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

References

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, McGraw-Hill, 1996.

See Also

accrfrac | cfamounts | cfdates | cpncount | cpndaten | cpndatenq | cpndatep | cpndatepq | cpndaysn | cpndaysp

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS