pricing and computing yields for fixed-income securities
introduction
the financial toolbox™ product provides functions for computing accrued interest, price, yield, convexity, and duration of fixed-income securities. various conventions exist for determining the details of these computations. the financial toolbox software supports conventions specified by the securities industry and financial markets association (sifma), used in the us markets, the international capital market association (icma), used mainly in the european markets, and the international swaps and derivatives association (isda). for historical reasons, sifma is referred to in financial toolbox documentation as sia and isma is referred to as international capital market association (icma). financial instruments toolbox™supports additional functionality for pricing fixed-income securities. for more information, see price interest-rate instruments (financial instruments toolbox).
fixed-income terminology
since terminology varies among texts on this subject, here are some basic definitions that apply to these financial toolbox functions.
the settlement date of a bond is the date when money first changes hands; that is, when a buyer pays for a bond. it need not coincide with the issue date, which is the date a bond is first offered for sale.
the first coupon date and last coupon date are the dates when the first and last coupons are paid, respectively. although bonds typically pay periodic annual or semiannual coupons, the length of the first and last coupon periods may differ from the standard coupon period. the toolbox includes price and yield functions that handle these odd first and/or last periods.
successive quasi-coupon dates determine the length of the standard coupon period for the fixed income security of interest, and do not necessarily coincide with actual coupon payment dates. the toolbox includes functions that calculate both actual and quasi-coupon dates for bonds with odd first and/or last periods.
fixed-income securities can be purchased on dates that do not coincide with coupon payment dates. in this case, the bond owner is not entitled to the full value of the coupon for that period. when a bond is purchased between coupon dates, the buyer must compensate the seller for the pro-rata share of the coupon interest earned from the previous coupon payment date. this pro-rata share of the coupon payment is called accrued interest. the purchase price, the price paid for a bond, is the quoted market price plus accrued interest.
the maturity date of a bond is the date when the issuer returns the final face value, also known as the redemption value or par value, to the buyer. the yield-to-maturity of a bond is the nominal compound rate of return that equates the present value of all future cash flows (coupons and principal) to the current market price of the bond.
period
the period of a bond refers to the frequency with which the issuer of a bond makes coupon payments to the holder.
period of a bond
period value | payment schedule |
---|---|
| no coupons (zero coupon bond) |
| annual |
| semiannual |
| tri-annual |
| quarterly |
| bi-monthly |
| monthly |
basis
the basis of a bond refers to the basis or day-count convention for a bond. day count basis determines how interest accrues over time for various instruments and the amount transferred on interest payment dates. basis is normally expressed as a fraction in which the numerator determines the number of days between two dates, and the denominator determines the number of days in the year.
for example, the numerator of actual/actual means that when
determining the number of days between two dates, count the actual number of days; the
denominator means that you use the actual number of days in the given year in any
calculations (either 365 or 366 days depending on whether the given year is a leap year).
the calculation of accrued interest for dates between payments also uses day count basis.
day count basis is a fraction of number of interest accrual days
/
days in the relevant coupon period
.
supported day count conventions and basis values are:
basis value | day count convention |
---|---|
| actual/actual (default) — number of days in both a period and
a year is the actual number of days. also, another common actual/actual basis
is basis |
| 30/360 sia — year fraction is calculated based on a 360 day year with 30-day months, after applying the following rules: if the first date and the second date are the last day of february, the second date is changed to the 30th. if the first date falls on the 31st or is the last day of february, it is changed to the 30th. if after the preceding test, the first day is the 30th and the second day is the 31st, then the second day is changed to the 30th. |
| actual/360 — number of days in a period is equal to the actual number of days, however the number of days in a year is 360. |
| actual/365 — number of days in a period is equal to the actual number of days, however the number of days in a year is 365 (even in a leap year). |
| 30/360 psa — number of days in every month is set to 30 (including february). if the start date of the period is either the 31st of a month or the last day of february, the start date is set to the 30th, while if the start date is the 30th of a month and the end date is the 31st, the end date is set to the 30th. the number of days in a year is 360. |
| 30/360 isda — number of days in every month is set to 30, except for february where it is the actual number of days. if the start date of the period is the 31st of a month, the start date is set to the 30th while if the start date is the 30th of a month and the end date is the 31st, the end date is set to the 30th. the number of days in a year is 360. |
| 30e /360 — number of days in every month is set to 30 except for february where it is equal to the actual number of days. if the start date or the end date of the period is the 31st of a month, that date is set to the 30th. the number of days in a year is 360. |
| actual/365 japanese — number of days in a period is equal to the actual number of days, except for leap days (29th february) which are ignored. the number of days in a year is 365 (even in a leap year). |
| actual/actual icma — number of days in both a period and a year is the actual number of days and the compounding frequency is annual. |
| actual/360 icma — number of days in a period is equal to the actual number of days, however the number of days in a year is 360 and the compounding frequency is annual. |
| actual/365 icma — number of days in a period is equal to the actual number of days, however the number of days in a year is 365 (even in a leap year) and the compounding frequency is annual. |
| 30/360 icma — number of days in every month is set to 30, except for february where it is equal to the actual number of days. if the start date or the end date of the period is the 31st of a month, that date is set to the 30th. the number of days in a year is 360 and the compounding frequency is annual. |
| actual/365 isda — the day count fraction is calculated using
the following formula: |
| bus/252 — the number of days in a period is equal to the actual number of business days. the number of business days in a year is 252. |
note
although the concept of day count sounds deceptively simple, the actual calculation of day counts can be complex. you can find a good discussion of day counts and the formulas for calculating them in chapter 5 of stigum and robinson, money market and bond calculations in .
end-of-month rule
the end-of-month rule affects a bond's coupon payment structure. when the rule is in effect, a security that pays a coupon on the last actual day of a month will always pay coupons on the last day of the month. this means, for example, that a semiannual bond that pays a coupon on february 28 in nonleap years will pay coupons on august 31 in all years and on february 29 in leap years.
end-of-month rule
end-of-month rule value | meaning |
---|---|
| rule in effect. |
| rule not in effect. |
framework
although not all financial toolbox functions require the same input arguments, they all accept the following common set of input arguments.
common input arguments
input | meaning |
---|---|
| settlement date |
| maturity date |
| coupon payment period |
| day-count basis |
| end-of-month payment rule |
| bond issue date |
| first coupon payment date |
| last coupon payment date |
of the common input arguments, only settle
and
maturity
are required. all others are optional. they are set to the
default values if you do not explicitly set them. by default, the
firstcoupondate
and lastcoupondate
are
nonapplicable. in other words, if you do not specify firstcoupondate
and
lastcoupondate
, the bond is assumed to have no odd first or last coupon
periods. in this case, the bond is a standard bond with a coupon payment structure based
solely on the maturity date.
default parameter values
to illustrate the use of default values in financial toolbox functions, consider the function, which computes actual cash flow payment dates for a portfolio of fixed income securities regardless of whether the first and/or last coupon periods are normal, long, or short.
the complete calling syntax with the full input argument list is
cflowdates = cfdates(settle, maturity, period, basis, ... endmonthrule, issuedate, firstcoupondate, lastcoupondate)
while the minimal calling syntax requires only settlement and maturity dates
cflowdates = cfdates(settle, maturity)
single bond example
as an example, suppose that you have a bond with these characteristics:
settle = '20-sep-1999' maturity = '15-oct-2007' period = 2 basis = 0 endmonthrule = 1 issuedate = nan firstcoupondate = nan lastcoupondate = nan
period
, basis
, and
endmonthrule
are set to their default values, and
issuedate
, firstcoupondate
, and
lastcoupondate
are set to nan
.
formally, a nan
is an ieee® arithmetic standard for not-a-number and is used to
indicate the result of an undefined operation (for example, zero divided by zero).
however, nan
is also a convenient placeholder. in the sia functions of
financial toolbox software, nan
indicates the presence of a nonapplicable
value. it tells the financial toolbox functions to
ignore the input value and apply the default. setting issuedate
,
firstcoupondate
, and lastcoupondate
to
nan
in this example tells to assume that the bond has been issued before settlement and that
no odd first or last coupon periods exist.
having set these values, all these calls to produce the same result.
cfdates(settle, maturity)
cfdates(settle, maturity, period)
cfdates(settle, maturity, period, [])
cfdates(settle, maturity, [], basis)
cfdates(settle, maturity, [], [])
cfdates(settle, maturity, period, [], endmonthrule)
cfdates(settle, maturity, period, [], nan)
cfdates(settle, maturity, period, [], [], issuedate)
cfdates(settle, maturity, period, [], [], issuedate, [], [])
cfdates(settle, maturity, period, [], [], [], [],lastcoupondate)
cfdates(settle, maturity, period, basis, endmonthrule, ...
issuedate, firstcoupondate, lastcoupondate)
thus, leaving a particular input unspecified has the same effect as passing an empty
matrix ([]
) or passing a nan
– all three tell
(and other financial toolbox functions) to use the default value for a particular
input parameter.
bond portfolio example
since the previous example included only a single bond, there was no difference
between passing an empty matrix or passing a nan
for an optional input
argument. for a portfolio of bonds, however, using nan
as a placeholder
is the only way to specify default acceptance for some bonds while explicitly setting
nondefault values for the remaining bonds in the portfolio.
now suppose that you have a portfolio of two bonds.
settle = '20-sep-1999' maturity = ['15-oct-2007'; '15-oct-2010']
these calls to all set the coupon period to its
default value (period = 2
) for both bonds.
cfdates(settle, maturity, 2) cfdates(settle, maturity, [2 2]) cfdates(settle, maturity, []) cfdates(settle, maturity, nan) cfdates(settle, maturity, [nan nan]) cfdates(settle, maturity)
the first two calls explicitly set period = 2
. since
maturity
is a 2
-by-1
vector of
maturity dates, knows that you have a two-bond
portfolio.
the first call specifies a single (that is, scalar) 2 for period
.
passing a scalar tells to apply the scalar-valued input to
all bonds in the portfolio. this is an example of implicit scalar-expansion. the
settlement date has been implicit scalar-expanded as well.
the second call also applies the default coupon period by explicitly passing a
two-element vector of 2's. the third call passes an empty matrix, which interprets as an invalid period, for which the default value is
used. the fourth call is similar, except that a nan
has been passed.
the fifth call passes two nan
's, and has the same effect as the third.
the last call passes the minimal input set.
finally, consider the following calls to for the same two-bond portfolio.
cfdates(settle, maturity, [4 nan]) cfdates(settle, maturity, [4 2])
the first call explicitly sets period = 4
for the first bond and
implicitly sets the default period = 2
for the second bond. the second
call has the same effect as the first but explicitly sets the periodicity for both
bonds.
the optional input period
has been used for illustrative purpose
only. the default-handling process illustrated in the examples applies to any of the
optional input arguments.
coupon date calculations
calculating coupon dates, either actual or quasi dates, is notoriously complicated. financial toolbox software follows the sia conventions in coupon date calculations.
the first step in finding the coupon dates associated with a bond is to determine the reference, or synchronization date (the sync date). within the sia framework, the order of precedence for determining the sync date is:
the first coupon date
the last coupon date
the maturity date
in other words, a financial toolbox function first
examines the firstcoupondate
input. if firstcoupondate
is specified, coupon payment dates and quasi-coupon dates are computed with respect to
firstcoupondate
; if firstcoupondate
is unspecified,
empty ([]
), or nan
, then the
lastcoupondate
is examined. if lastcoupondate
is
specified, coupon payment dates and quasi-coupon dates are computed with respect to
lastcoupondate
. if both firstcoupondate
and
lastcoupondate
are unspecified, empty ([]
), or
nan
, the maturity
(a required input argument) serves
as the synchronization date.
yield conventions
there are two yield and time factor conventions that are used in the financial toolbox software – these are determined by the input basis
.
specifically, bases 0
to 7
are assumed to have
semiannual compounding, while bases 8
to 12
are
assumed to have annual compounding regardless of the period of the bond's coupon payments
(including zero-coupon bonds). in addition, any yield-related sensitivity (that is, duration
and convexity), when quoted on a periodic basis, follows this same convention. (see
, , , , and .)
pricing functions
this example shows how easily you can compute the price of a bond with an odd first period using the function . assume that you have a bond with these characteristics:
settle = '11-nov-1992'; maturity = '01-mar-2005'; issuedate = '15-oct-1992'; firstcoupondate = '01-mar-1993'; couponrate = 0.0785; yield = 0.0625;
allow coupon payment period (period = 2
), day-count basis
(basis = 0
), and end-of-month rule (endmonthrule =
1
) to assume the default values. also, assume that there is no odd last coupon
date and that the face value of the bond is $100. calling the function
[price, accruedint] = bndprice(yield, couponrate, settle, ...
maturity, [], [], [], issuedate, firstcoupondate)
price = 113.5977 accruedint = 0.5855
bndprice
returns a price of $113.60 and accrued interest of $0.59.
similar functions compute prices with regular payments, odd first and last periods, and prices of treasury bills and discounted securities such as zero-coupon bonds.
note
bndprice
and other functions use nonlinear formulas to compute the
price of a security. for this reason, financial toolbox software uses newton's method when solving for an independent variable
within a formula. see any elementary numerical methods textbook for the mathematics
underlying newton's method.
yield functions
to illustrate toolbox yield functions, compute the yield of a bond that has odd first and last periods and settlement in the first period. first set up variables for settlement, maturity date, issue, first coupon, and a last coupon date.
settle = '12-jan-2000'; maturity = '01-oct-2001'; issuedate = '01-jan-2000'; firstcoupondate = '15-jan-2000'; lastcoupondate = '15-apr-2000';
assume a face value of $100. specify a purchase price of $95.70, a coupon rate of 4%,
quarterly coupon payments, and a 30/360 day-count convention (basis = 1
).
price = 95.7; couponrate = 0.04; period = 4; basis = 1; endmonthrule = 1;
calling the function
yield = bndyield(price, couponrate, settle, maturity, period,...
basis, endmonthrule, issuedate, firstcoupondate, lastcoupondate)
yield = 0.0659
the function returns a yield = 0.0659
(6.60%).
fixed-income sensitivities
financial toolbox software supports the following options for managing interest-rate risk for one or more bonds:
and support duration and convexity analysis based on market quotes and assume parallel shifts in the bond yield curve.
supports key rate duration based on a market yield curve and can model nonparallel shifts in the bond yield curve.
calculating duration and convexity for bonds
the toolbox includes functions to perform sensitivity analysis such as convexity and
the macaulay and modified durations for fixed-income securities. the macaulay duration of
an income stream, such as a coupon bond, measures how long, on average, the owner waits
before receiving a payment. it is the weighted average of the times payments are made,
with the weights at time t
equal to the present value of the money
received at time t
. the modified duration is the macaulay duration
discounted by the per-period interest rate; that is, divided by (1 rate/frequency). the
macaulay duration is a measure of price sensitivity to yield
changes. this duration is measured in years and is a weighted average-time-to-maturity of
an instrument.
to illustrate, the following example computes the annualized macaulay and modified
durations, and the periodic macaulay duration for a bond with settlement (12-jan-2000) and
maturity (01-oct-2001) dates as above, a 5% coupon rate, and a 4.5% yield to maturity. for
simplicity, any optional input arguments assume default values (that is, semiannual
coupons, and day-count basis
= 0 (actual/actual), coupon payment
structure synchronized to the maturity date, and end-of-month payment rule in
effect).
couponrate = 0.05; yield = 0.045; settle = '12-jan-2000'; maturity = '01-oct-2001'; [modduration, yearduration, perduration] = bnddury(yield,... couponrate, settle, maturity)
modduration = 1.6107 yearduration = 1.6470 perduration = 3.2940
the durations are
modduration = 1.6107 (years) yearduration = 1.6470 (years) perduration = 3.2940 (semiannual periods)
note that the semiannual periodic macaulay duration (perduratio
n)
is twice the annualized macaulay duration (yearduration
).
calculating key rate durations for bonds
key rate duration enables you to evaluate the sensitivity and price of a bond to nonparallel changes in the spot or zero curve by decomposing the interest rate risk along the spot or zero curve. key rate duration refers to the process of choosing a set of key rates and computing a duration for each rate. specifically, for each key rate, while the other rates are held constant, the key rate is shifted up and down (and intermediate cash flow dates are interpolated), and then the present value of the security given the shifted curves is computed.
the calculation of supports:
where pv is the current value of the instrument, pv_up and pv_down are the new values after the discount curve has been shocked, and shiftvalue is the change in interest rate. for example, if key rates of 3 months, 1, 2, 3, 5, 7, 10, 15, 20, 25, 30 years were chosen, then a 30-year bond might have corresponding key rate durations of:
3m | 1y | 2y | 3y | 5y | 7y | 10y | 15y | 20y | 25y | 30y |
.01 | .04 | .09 | .21 | .4 | .65 | 1.27 | 1.71 | 1.68 | 1.83 | 7.03 |
the key rate durations add up to approximately equal the duration of the bond.
for example, compute the key rate duration of the us treasury bond with maturity date of august 15, 2028 and coupon rate of 5.5%.
settle = datenum('18-nov-2008'); couponrate = 5.500/100; maturity = datenum('15-aug-2028'); price = 114.83;
for the zerodata
information on the current spot curve for this
bond, refer to :
zerodates = daysadd(settle ,[30 90 180 360 360*2 360*3 360*5 ...
360*7 360*10 360*20 360*30]);
zerorates = ([0.06 0.12 0.81 1.08 1.22 1.53 2.32 2.92 3.68 4.42 4.20]/100)';
compute the key rate duration for a specific set of rates (choose this based on the maturities of the available hedging instruments):
krd = bndkrdur([zerodates zerorates],couponrate,settle,maturity,'keyrates',[2 5 10 20])
krd = 0.2865 0.8729 2.6451 8.5778
note, the sum of the key rate durations approximately equals the duration of the bond:
[sum(krd) bnddurp(price,couponrate,settle,maturity)]
ans = 12.3823 12.3919
see also
| | | |