Duration and Convexity
Bond prices change inversely with interest rates, and, hence, there is interest rate risk with bonds. However, interest rate risk is greatest when interest rates are near 0 and least when interest rates are high. Therefore, it is more accurate to describe the interest rate sensitivity of bonds. One method of measuring interest rate sensitivity due to changes in market interest rates is by the full valuation approach, which simply calculates what bond prices will be if the interest rate changed by specific amounts. The full valuation approach is based on the fact that the price of a bond = the sum of the present value of each coupon payment + the present value of the principal payment. That the present value of a future payment depends on the interest rate is what causes bond prices to vary with the interest rate, as well.
Bond Value = Present Value of Coupon Payments + Present Value of Par Value
Duration
Another method to measure interest rate sensitivity, which is less computationally intensive, is by calculating the duration of a bond, which is the weighted average of the present value of the bond's payments. The longer the duration, the greater the sensitivity to interest rate changes. Mathematically, duration is the 1^{st} derivative of the priceyield curve, which is a line tangent to the curve at the current priceyield point.
The effective duration compares the interest rate sensitivities of different securities, especially for securities where the cash flow may change because of the yield change, such as for a callable bond. Securities with the same duration have the same interest rate sensitivity. For instance, since zerocoupon bonds only pay the face value at maturity, the duration of a zero = its maturity. It also follows that any bond of a certain duration will have an interest rate sensitivity equal to a zerocoupon bond with a maturity equal to the bond's duration.
Duration is also often interpreted as the percentage change in a bond's price for a small change in its yield to maturity (YTM). It should not be surprising that there is a relationship between the change in bond price and the change in duration when the yield changes, since both the bond and duration depend on the present values of the bond's cash flows. In fact, a very simple relationship exists between the two: when the YTM changes by 1%, the bond price changes by the duration converted to a percentage. So, for instance, the price of a bond with a 10year duration would change by 10% for a 1% change in the interest rate.
Macaulay Duration
Before 1938, it was well known that the maturity of a bond affected its interest rate sensitivity, but it was also known that bonds with the same maturity could differ widely in price changes with changes to yield. On the other hand, zerocoupon bonds always exhibited the same interest rate sensitivity. Therefore, Frederick Macaulay reasoned that a better measure of interest rate sensitivity is to consider a coupon bond as a series of zerocoupon bonds, where each payment is a zerocoupon bond weighted by the present value of the payment divided by the bond price.
Consequently, duration has several simple properties:
 duration is proportional to the maturity of the bond, since the principal repayment is the largest cash flow of the bond and it is received at maturity;
 duration is inversely related to the coupon rate, since more of the cash flow will be received earlier;
 duration decreases with increasing payment frequency, since more of the present value of the cash flows is received earlier than with less frequent payments, which is why coupon bonds always have a shorter duration than zeros with the same maturity.
If a bond is callable or has prepayment risk, such as with mortgage bonds, then the maturity of the bond, and therefore its duration, may be less than what the stated maturity would suggest. In these cases, duration is calculated by using the effective maturity (a.k.a. average maturity), which is the shortest maturity if the bond was called or the average maturity of a group of bonds with prepayment risk that have similar characteristics, such as similar mortgage bonds.
The Macaulay duration is calculated by the following formula:
Macaulay Duration  =  1 × PVCF_{1} + 2 × PVCF_{2 }+ ... + n × PVCF_{n} k × p 

Using sigma notation:
Macaulay Duration  =  T ∑ t=1  t  ×  PVCF_{t} 
k × p  

Example 1: Calculating Macaulay Duration
A 3year bond has a par value of $100 with a coupon rate of 6% and a current yield of 6%. The duration can be calculated as follows:
Interest Rate  6.0%  
Coupon Rate  6.0%  
Par Value  $100  
Current Bond Price  $100.00  
Number of Payments per Year  2  
Time Period  Cash Flow  Discount  PV  Time Period × Present Value of Cash Flow 
1  $3.00  0.9709  $2.91  $2.91 
2  $3.00  0.9426  $2.83  $5.66 
3  $3.00  0.9151  $2.75  $8.24 
4  $3.00  0.8885  $2.67  $10.66 
5  $3.00  0.8626  $2.59  $12.94 
6  $103.00  0.8375  $86.26  $517.57 
Totals:  $118  $100.00  $557.97 
Duration  =  Sum of (Time Period × Present Value of Cash Flows) (Number of Payments per Year × Bond Price) 
=  $557.97 / (2 × $100)  
=  2.79 
Because the bond price = the total present value of all bond payments, the bond price will change inversely to changes in yield, which can be calculated approximately by the following equation:
 P = Bond Price
 ΔP = Price Change
 y = Market Yield
 D = Duration
ΔP P  =  −Δy  ×  T ∑ t=1  CF_{t} × t e^{yt}  =  −Δy × D 
Multiply both sides by P:
ΔP  =  −Δy  ×  P  ×  T ∑ t=1  CF_{t} × t e^{yt}  =  −Δy × P × D 
New Bond Price = P + ΔP
So if interest rates increased by 1%, then the change in the bond price in Example 1 can be calculated thus:
Example: New Bond Price = $100 − 1% × 2.79 × $100 = $100 − 2.79% × $100 = $100 − $2.79 = $97.21
Compare this calculation with the bond price as given by the sum of the present value of its payments:
Interest Rate  7.0%  
Coupon Rate  6.0%  
Par Value  $97.34  
Current Bond Price  $100.00  
Number of Payments per Year  2  
Time Period  Cash Flow  Discount  PV 
1  $3.00  0.9662  $2.90 
2  $3.00  0.9335  $2.80 
3  $3.00  0.9019  $2.71 
4  $3.00  0.8714  $2.61 
5  $3.00  0.8420  $2.53 
6  $103.00  0.8135  $83.79 
Totals:  $118  $97.34 
As you can see, bond prices as calculated using Macaulay duration is very close to the price calculated with the present values of the cash flows when the interest rate change is small. Note that in the above example, when the yield changes by 1%, then the bond price can simply be multiplied by the duration converted to a percentage, since 1% × 2.79 = .0279 = 2.79%.
The duration adjustment is a close approximation for small changes in interest rates. However, duration changes as well, which is measured by the bond's convexity (discussed later). Because duration also changes, larger changes in interest rates will yield larger discrepancies between the actual bond price and the price calculated using duration. Duration can also be approximated by the following formula:
Duration  =  P_{} − P_{+} 2 × P_{0}(Δy) 
P_{0} = Bond price. P_{} = Bond price when interest rate is incremented. P_{+ }= Bond price when interest rate is decremented. Δy = change in interest rate in decimal form. 
Modified Duration
Macaulay duration is a better measure of interest rate sensitivity than the term of a bond. So, interest rate sensitivity can easily be compared by comparing the durations of different bonds or portfolios. Modified duration gives a better measure of the sensitivity of changes in bond price with changes in yield. Specifically:
dP/P dy  =  −  D_{Mac} 1 + y/k 

Modified Duration  =  D_{Mac} 1 + y/k 

So equating the change in bond price calculated for Example 1 above to modified duration yields:
Modified Duration = 2.79 / (1 + 0.07/2) = 2.79 / 1.035 = 2.69
 New Price based on Modified Duration = $100 − 2.69 = $97.31
 New Price based on Present Value of Cash Flows = $97.34
 Price based on Macaulay Duration = $97.21
As you can see, modified duration gives a better estimate of the new price than Macaulay duration, since it is closer to the price as determined by discounted cash flows. Like Macaulay duration, modified duration is valid only when the change in yield is small and the yield change will not alter the cash flow of the bond, such as may occur, for instance, if the price change for a callable bond increases the likelihood it will be called. Of course, interest rates usually change in small steps, so duration measures interest rate sensitivity effectively.
Duration = DURATION(settlement,maturity,coupon,yield,frequency,basis) Modified Duration = MDURATION(settlement,maturity,coupon,yield,frequency,basis)

Example: Calculating Modified Duration using Microsoft Excel
Calculate the duration and modified duration of a 10year bond paying a coupon rate of 6%, a yield to maturity of 8%, and with a settlement date of 1/1/2008 and maturity date of 12/31/2017.
Duration = DURATION("1/1/2008","12/31/2017",0.06,0.08,2) = 7.45
Modified duration = MDURATION("1/1/2008","12/31/2017",0.06,0.08,2) = 7.16
Note that modified duration is always slightly less than duration, since the modified duration is the duration divided by 1 plus the yield per payment period.
Convexity adds a term to the modified duration, making it more precise, by accounting for the change in duration as the yield changes — hence, convexity is the 2^{nd} derivative of the priceyield curve at the current priceyield point.
Although duration itself can never be negative, convexity can make it negative, since there are some securities, such as some mortgagebacked securities that exhibit negative convexity, meaning that the bond changes in price in the same direction as the yield changes.
Effective Duration for OptionEmbedded Bonds
Because duration depends on the weighted averages of the present value of the bond's cash flows, a simple calculation for duration is not valid if the change in yield could result in a change of cash flow. Valuation models must be used in calculating new prices for changes in yield when the cash flow is modified by options. The effective duration (aka optionadjusted duration) is the change in bond prices per change in yield when the change in yield can cause different cash flows. For instance, for a callable bond, the bond will not rise above the call price when interest rates decline because the issuer can call the bond back for the call price, and will probably do so if rates drop.
Because cash flows can change, the effective duration of an optionembedded bond is defined as the change in bond price per change in the market interest rate:
Effective Duration  =  −  ΔP/P Δi 

Note that i is the change in the term structure of interest rates and not the yield to maturity for the bond, because YTM is not valid for an optionembedded bond when the future cash flows are uncertain.
Duration Formulas for Specific Bonds and Annuities
There are several formulas for calculating the duration of specific bonds that are simpler than the above general formula.
The formula for the duration of a coupon bond is the following:
Coupon Bond Duration  =  1 + y y  −  (1 + y) + T (c − y) c [(1 + y)^{T}− 1] + y 

If the coupon bond is selling for par value, then the above formula can be simplified:
Duration for Coupon Bond Selling for Face Value  =  1 + y y  [  1 −  1 (1 + y)^{T}  ] 

The duration of a fixed annuity for a specified number of payments T and yield per payment y can be calculated with the following formula:
Fixed Annuity Duration  =  1 + y y  −  T (1 + y)^{T }− 1 

A perpetuity is a bond without a maturity date, so it pays interest indefinitely. Although the series of payments is infinite, the duration is finite, usually less than 15 years. The formula for the duration of a perpetuity is especially simple, since there is no principal repayment:
Perpetuity Duration  =  1 + y y 

Portfolio Duration
Duration is an effective analytic tool for the portfolio management of fixedincome securities because it provides an average maturity for the portfolio, which, in turn, provides a measure of interest rate sensitivity to the portfolio.
The duration for a bond portfolio = the weighted average of the duration for each type of bond in the portfolio:
Portfolio Duration = w_{1}D_{1 }+ w_{2}D_{2} + … + w_{K}D_{K}
 w_{i} = market value of bond i / market value of portfolio
 D_{i} = duration of bond i
 K = number of bonds in portfolio
To better measure the interest rate exposure of a portfolio, it is better to measure the contribution of the issue or sector duration to the portfolio duration rather than just measuring the market value of that issue or sector to the value of the portfolio:
Portfolio Duration Contribution = Weight of Issue in Portfolio × Duration of Issue
Investment Tip: Minimize Duration Risk
When yields are low, investors, who are riskaverse but who want to earn a higher yield, will often buy bonds with longer durations, since longerterm bonds pay higher interest rates. But even the yields of longerterm bonds are only marginally higher than shortterm bonds, because insurance companies and pension funds, who are major buyers of bonds, are restricted to investment grade bonds, so they bid up those prices, forcing the remaining bond buyers to bid up the price of junk bonds, thereby diminishing their yield even though they have higher risk. Indeed, interest rates may even turn negative. In June 2016, the 10year German bond, known as the bund, sported negative interest rates several times, when the price of the bond actually exceeded its principal.
Interest rates vary continually from high to low to high in an endless cycle, so buying longduration bonds when yields are low increases the likelihood that bond prices will be lower if the bonds are sold before maturity. This is sometimes called duration risk, although it is more commonly known as interest rate risk. Duration risk would be especially large in buying bonds with negative interest rates. On the other hand, if longterm bonds are held to maturity, then you may incur an opportunity cost, earning low yields when interest rates are higher.
Therefore, especially when yields are extremely low, as they were starting in 2008 and continuing even into 2016, it is best to buy bonds with the shortest durations, especially when the difference in interest rates between longduration portfolios and shortduration portfolios is less than the historical average.
On the other hand, buying longduration bonds make sense when interest rates are high, since you not only earn the high interest, but you may also realize capital appreciation if you sell when interest rates are lower.
Convexity
Duration is only an approximation of the change in bond price. For small changes in yield, it is very accurate, but for larger changes in yield, it always underestimates the resulting bond prices for noncallable, optionfree bonds. This is because duration is a tangent line to the priceyield curve at the calculated point, and the difference between the duration tangent line and the priceyield curve increases as the yield moves farther away in either direction from the point of tangency.
Convexity is the rate that the duration changes along the priceyield curve, and, thus, is the 1^{st} derivative to the equation for the duration and the 2^{nd} derivative to the equation for the priceyield function. Convexity is always positive for vanilla bonds. Furthermore, the priceyield curve flattens out at higher interest rates, so convexity is greater on the upside than on the downside, so the absolute change in price for a given change in yield will be slightly greater when yields decline rather than increase. Consequently, bonds with higher convexity will have greater capital gains for a given decrease in yields than the corresponding capital losses that would occur when yields increase by the same amount.
Some additional properties of convexity include the following:
 Convexity increases as yield to maturity decreases, and vice versa.
 Convexity decreases at higher yields because the priceyield curve flattens at higher yields, so modified duration is more accurate, requiring smaller convexity adjustments. This is also why convexity is more positive on the upside than on the downside.
 Among bonds with the same YTM and term length, lower coupon bonds have a higher convexity, with zerocoupon bonds having the highest convexity.
 This results because lower coupons or no coupons have the highest interest rate volatility, so modified duration requires a larger convexity adjustment to reflect the higher change in price for a given change in interest rates.
Convexity is calculated by the following equation:
Convexity  =  1 P × (1 + y)^{2}  T ∑ t=1  [  CF_{t} (1 + y)^{t}  (t^{2} + t)  ] 
P = Bond price. y = Yield to maturity in decimal form. T = Maturity in years. CF_{t}=Cash flow at time t. 
The equation for duration can be improved by adding the convexity term:
ΔP P  =  D_{m}  ×  Δy  +  (Δy)^{2} 2  ×  Convexity 
Δy = yield change ΔP = Bond price change 
Convexity can also be estimated with a simpler formula:
Convexity  =  P_{+} + P_{}  2P_{0} 2 × P_{0}(Δy)^{2} 
P_{0} = Bond price. P_{} = Bond price when interest rate is incremented. P_{+ }= Bond price when interest rate is decremented. Δy = change in interest rate in decimal form. 
Note, however, that this convexity approximation formula must be used with this convexity adjustment formula, then added to the duration adjustment:
Convexity Adjustment  =  Convexity  ×  100  ×  (Δy)^{2} 
Δy = change in interest rate in decimal form. 
Hence:
Bond Price Change  =  Duration  ×  Yield Change  +  Convexity Adjustment 
Important Note! The convexity can actually have several values depending on the convexity adjustment formula used. Many calculators on the Internet calculate convexity according to the following formula:
Convexity  =  P_{+} + P_{}  2P_{0} P_{0}(Δy)^{2} 
P_{0} = Bond price. P_{} = Bond price when interest rate is incremented. P_{+ }= Bond price when interest rate is decremented. Δy = change in interest rate in decimal form. 
Note that this formula yields double the convexity as the Convexity Approximation Formula #1. However, if this equation is used, then the convexity adjustment formula becomes:
Convexity Adjustment  =  Convexity/2  ×  100  ×  (Δy)^{2} 
Δy = change in interest rate in decimal form. 
As you can see in the Convexity Adjustment Formula #2 that the convexity is divided by 2, so using the Formula #2's together yields the same result as using the Formula #1's together.
To add further to the confusion, sometimes both convexity measure formulas are calculated by multiplying the denominator by 100, in which case, the corresponding convexity adjustment formulas are multiplied by 10,000 instead of just 100! Just keep in mind that convexity values as calculated by various calculators on the Internet can yield results that differ by a factor of 100. They can all be correct if the correct convexity adjustment formula is used!
Convexity is usually a positive term regardless of whether the yield is rising or falling, hence, it is positive convexity. However, sometimes the convexity term is negative, such as occurs when a callable bond is nearing its call price. Below the call price, the priceyield curve follows the same positive convexity as an optionfree bond, but as the yield falls and the bond price rises to near the call price, the positive convexity becomes negative convexity, where the bond price is limited at the top by the call price. Hence, like the terms for modified and effective duration, there is also modified convexity, which is the measured convexity when there is no expected change in future cash flows, and effective convexity, which is the convexity measure for a bond for which future cash flows are expected to change.
Basis Point Value (BPV) Measures the Change in Cash Price of a Bond When Yield Changes by 1 Basis Point
Bond managers will often want to know how much the market value of a bond portfolio will change when interest rates change by 1 basis point. This can be calculated using the basis point value (BPV) [aka price value of a basis point (PVBP), dollar value of a 01 (DV01)], which also measures the volatility of bond prices to interest rates, calculated as the absolute value of the change in price when the interest rate changes by 1 basis point (0.01%). At bond trading desks, trading exposure is often set in terms of the BPV.
BPV = initial price − price if yield changes by 1 basis point
(Math note: the expression × denotes the absolute value of ×.)
Because BPV depends on modified duration and on the convexity of the bond price/yield, BPV is larger at lower interest rates, and the difference in BPV between an upward shift and downward shift in interest rates will be larger for longer maturities.
Although bond prices increase more when yields decline than decrease when yields increase, a change in yield of 1 basis point is considered so small that the difference is negligible, although this difference is larger for longer maturities. Since modified duration is the approximate change in bond price for a 100 basis point change in yield, the price value of a basis point is 1% of the price change predicted by modified duration. Recall that:
Change in Market Price  =  Yield Change Percentage  ×  Modified Duration 100  ×  Bond Price 
So the price change per basis point change in market yield is:
BPV  =  .01  ×  Modified Duration 100  ×  Bond Price 
Examples: Calculating the Price Change of a Basis Point Change in Yield for a Given Duration
Given:
 Modified Duration = 7.45% = 7.45/100 = .0745
Case #1:
 Market Price of Bond = $1,000
 BPV = .0745 × .01 × 1,000 = 0.75
 So if the yield fell by 1 basis point, the bond price would rise to $1000 + 0.75 = $1000.75
Case #2:
 Market Price = $900
 BPV = 0.0745 × .01 × 900 = 0.67
 So if the yield rose by 1 basis point, the bond price would decline to $900 − 0.67 = $899.33
Yield Volatility (Interest Rate Volatility)
Duration gives an estimate of the interest rate sensitivity of a particular bond by relating the change in price to the change in yield, but neither duration nor convexity gives a complete picture of interest rate risk because bond yields can also change because of changes in the credit default risk as evidenced by changes in the credit ratings of the issuer or because of detrimental changes to the economy that may increase the credit default risk of many businesses.
For instance, U.S. Treasuries have lower coupon rates and current yields than corporate bonds of similar maturities because of the difference in default risk. Therefore, U.S. Treasuries should have higher durations than corporate bonds, and, therefore, change in price more when market interest rates change. However, changes in perception of the risk of default may also change bond prices, blunting or augmenting what duration would predict.
For instance, during the 2007  2009 subprime mortgage crisis, many bonds were riskier than investors realized, even those that had received top ratings from the credit rating agencies, and so, many securities, especially those based on subprime mortgages, lost value, greatly increasing their yields, while yields on Treasuries declined as the demand for these securities, which are considered free of default risk, increased in price, caused, not by the decline in market interest rates, but by the flight to quality — selling risky securities to buy securities with little or no default risk. The flight to quality is augmented by the fact that laws and regulations require that pension funds and other funds held for the benefit of others in a fiduciary capacity be invested only in investment grade securities. So when investment ratings decline for a large number of securities to below investment grade, managers of funds held in trust must sell the riskier securities and buy securities likely to retain an investment grade rating or be free of default risk, such as U.S. Treasuries.
Therefore, yield volatility, and therefore, interest rate risk, is greater for securities with more default risk, even if their durations are the same.