| Contents | Index |
[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 fixed-income securities.
[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 fixed-income securities defined using required and optional inputs.
[CFlowAmounts, CFlowDates, TFactors, CFlowFlags, CFPrincipal] = 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.
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.
For more information, see basis. 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.
Default: 1 | |
IssueDate |
Issue date for a bond. Default: If you do not specify an IssueDate, the cash flow payment dates are determined from other inputs. | |
FirstCouponDate |
Date when a bond makes its first coupon payment; used when bond has an irregular first coupon period. When FirstCouponDate and LastCouponDate are both specified, FirstCouponDate takes precedence in determining the coupon payment structure. Default: If you do not specify a FirstCouponDate, the cash flow payment dates are determined from other inputs. | |
LastCouponDate |
Last coupon date of a bond before the maturity date; used when bond has an irregular last coupon period. In the absence of a specified FirstCouponDate, a specified LastCouponDate determines the coupon structure of the bond. The coupon structure of a bond is truncated at the LastCouponDate, regardless of where it falls, and is followed only by the bond's maturity cash flow date. Default: If you do not specify a LastCouponDate, the cash flow payment dates are determined from other inputs. | |
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. Default: If you do not specify StartDate, the effective start date is the Settle date. | |
Face |
Face or par value.
Default: 100 |
Enter the following inputs only as parameter/value pairs.
AdjustCashFlowsBasis |
Adjust the cash flows based on the actual period day count. NINST-by-1 of logicals. Default: False |
BusinessDayConvention |
Require payment dates to be business dates. NINST-by-1 cell array with possible choices of business day convention:
Default: actual |
CompoundingFrequency |
Compounding frequency for yield calculation. 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. If you use ISMA day counts and BUS/252, the specified basis are used. Default: SIA bases use the actual/actual day count to compute discount factors. |
Holidays |
Holidays used for business day convention. NHOLIDAYS-by-1 of MATLAB date numbers. Default: If no dates are specified, holidays.m is used. |
PrincipalType |
Type of principal for case when a Face schedule is specified. The principal type is either sinking or bullet. If sinking, principal cash flows are returned throughout the life of the bond. If bullet, principal cash flow is only returned at maturity. Default: sinking |
CFlowAmounts |
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 |
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 |
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
where:
| ||||||||||||||||||||||||||||||
CFlowFlags |
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).
| ||||||||||||||||||||||||||||||
CFPrincipal |
CFPrincipal contains the principal cash flows. If PrincipalType is bullet, CFPrincipal is all zeros and, at Maturity, the appropriate Face value. |
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.
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
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. Use parameter/value pairs for the following optional input arguments: Period, Basis, BusinessDayConvention, and AdjustCashFlowsBasis:
Settle = '01-Jun-2010'; Maturity = ['15-Dec-2011';'15-Jun-2012']; CouponRate= [0.06; 0.05]; Period = [4; 2]; Basis = [1; 0]; [CFlowAmounts, CFlowDates, TFactors, CFlowFlags] = ... cfamounts(CouponRate,Settle, Maturity, 'Period',Period, ... 'Basis', Basis, 'AdjustCashFlowsBasis', true,... 'BusinessDayConvention','modifiedfollow')
This returns:
CFlowAmounts =
-1.2667 1.5000 1.5000 1.5000 1.5000 1.5000 1.5000 101.5000
-2.3077 2.4932 2.5068 2.4932 2.5068 102.5000 NaN NaN
CFlowDates =
Columns 1 through 7
734290 734304 734396 734487 734577 734669 734761
734290 734304 734487 734669 734852 735035 NaN
Column 8
734852
NaN
TFactors =
0 0.0769 0.5761 1.0769 1.5761 2.0769 2.5761 3.0769
0 0.0769 1.0769 2.0769 3.0769 4.0769 NaN NaN
CFlowFlags =
0 3 3 3 3 3 3 4
0 3 3 3 3 4 NaN NaNFor CouponRate and Face that change over the life of the bond, schedules for Coupon Rate and Face can be specified with an NINST-by-1 cell array, where each element is a NumDates-by-2 matrix where the first column is dates and the second column is associated rates.
An example of cfamounts using a CouponRate schedule is:
CouponSchedule = {[datenum('15-Mar-2012') .04;datenum('15- Mar -2013') .05;...
datenum('15- Mar -2015') .06]}
cfamounts(CouponSchedule,'01-Mar-2011','15-Mar-2015' )
This returns:
CouponSchedule =
[3x2 double]
ans =
-1.8453 2.0000 2.0000 2.0000 2.5000 2.5000 3.0000 3.0000 3.0000 103.0000
An example of cfamounts using a Face schedule is:
FaceSchedule = {[datenum('15-Mar-2012') 100;datenum('15- Mar -2013') 90;...
datenum('15- Mar -2015') 80]}
cfamounts(.05,'01-Mar-2011','15-Mar-2015', 'Face', FaceSchedule)
This returns:
FaceSchedule =
[3x2 double]
ans =
-2.3066 2.5000 2.5000 2.5000 2.2500 2.2500 2.0000 2.0000 2.0000 82.0000
Use cfamounts to generate the cash flows for a sinking bond:
[CFlowAmounts,CFDates,TFactors,CFFlags,CFPrincipal] = cfamounts(.05,'04-Nov-2010',...
{'15-Jul-2014';'15-Jul-2015'},'Face',{[datenum('15-Jul-2013') 100;datenum('15-Jul-2014')...
90;datenum('15-Jul-2015') 80]}) This returns:
CFlowAmounts = -1.5217 2.5000 2.5000 2.5000 2.5000 2.5000 12.5000 2.2500 92.2500 NaN NaN -1.5217 2.5000 2.5000 2.5000 2.5000 2.5000 12.5000 2.2500 12.2500 2.0000 82.0000 CFDates = Columns 1 through 9 734446 734518 734699 734883 735065 735249 735430 735614 735795 734446 734518 734699 734883 735065 735249 735430 735614 735795 Columns 10 through 11 NaN NaN 735979 736160 TFactors = 0 0.3913 1.3913 2.3913 3.3913 4.3913 5.3913 6.3913 7.3913 NaN NaN 0 0.3913 1.3913 2.3913 3.3913 4.3913 5.3913 6.3913 7.3913 8.3913 9.3913 CFFlags = 0 3 3 3 3 3 13 3 4 NaN NaN 0 3 3 3 3 3 13 3 13 3 4 CFPrincipal = 0 0 0 0 0 0 10 0 90 NaN NaN 0 0 0 0 0 0 10 0 10 0 80
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.
accrfrac | cfdates | cftimes | cpncount | cpndaten | cpndatenq | cpndatep | cpndatepq | cpndaysn | cpndaysp
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-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |