1 How this workbook guide works
Bond mathematics is easier to understand once you have built it yourself in a spreadsheet. Each section below matches one sheet of the companion Excel workbook. Every sheet follows the same steps: inputs → cash flows → present value → yield → sensitivity.
| Sheet | What you build | Key Excel functions |
|---|---|---|
| 1 Coupon Bond | Price three ways, price–yield curve | PV PRICE RATE |
| 2 Zero Coupon | Price, yield, pull to par | PV RATE |
| 3 FRN | Quoted vs discount margin, rate-shock test | PV |
| 4 Convertible | Floor, conversion value, premiums, payback | PV MAX |
| 5 YTM YTC YTW | Yield to maturity, to each call, to worst | YIELD MIN |
| 6 Money Market | T-bills, T-notes, T-bonds and 32nds | TBILLPRICE TBILLEQ DOLLARDE |
| 7 Accrued Interest | Coupon calendar, clean vs dirty price | COUPDAYBS ACCRINT |
| 8 Duration Convexity | Macaulay, modified, convexity, short-cut formulas | DURATION MDURATION |
Each Excel panel shows the cell, what it holds, its value and the formula in it. Blue on yellow cells are inputs and green bold cells are key outputs. Prices are per 100 of face value unless a section says otherwise, and every bond here is a hypothetical teaching example.
2 Notation and Excel conventions
| Symbol | Meaning | In Excel |
|---|---|---|
| F | Face (par) value | Excel bond functions assume 100 |
| c | Annual coupon rate | Type 7% or 0.07, never 7 |
| m | Coupon payments per year | frequency: 1, 2 or 4 |
| n = mT | Number of coupon periods | nper in PV and RATE |
| y | Yield to maturity (annual, nominal) | yld; per period it is y/m |
| basis | Day-count convention | 0 = 30/360 · 1 = Actual/Actual · 2 = Act/360 · 3 = Act/365 |
The core equation behind every sheet: price equals the present value of the promised cash flows.
Excel treats money paid out as negative. =PV(rate,nper,pmt,fv) returns a negative number when the coupon and face are positive, so write =-PV(…). With RATE, enter the price as negative: =RATE(n, C, -P, F).
3 Sheet 1: Pricing a coupon bond three ways
Start with a 10-year, 7% semiannual bond priced at a 7.50% yield. Rebuilding the price three different ways shows that each Excel method computes the same thing.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B5 | Face value | 100.00 | input |
| B6 | Coupon rate | 7.00% | input |
| B7 | Payments per year | 2 | input |
| B8 | Years to maturity | 10 | input |
| B9 | Yield to maturity | 7.50% | input |
| B10 | Settlement | 15-Nov-2026 | input |
| B11 | Maturity | 15-Nov-2036 | input |
| B14 | Coupon per period | 3.5000 | =B5*B6/B7 |
| B15 | Periods n | 20 | =B7*B8 |
| B16 | Periodic yield | 3.7500% | =B9/B7 |
| B17 | ① Sum of PVs | 96.5259 | =SUM(I6:I65) |
| B18 | ② PV function | 96.5259 | =-PV(B16,B15,B14,B5) |
| B19 | ③ PRICE function | 96.5259 | =PRICE(B10,B11,B6,B9,100,B7,0)*B5/100 |
| B21 | Current yield | 7.2519% | =B5*B6/B18 |
| B22 | YTM back from price | 7.5000% | =B7*RATE(B15,B14,-B18,B5) |
G6 =IF(E6<=$B$15,$B$14+IF(E6=$B$15,$B$5,0),0) · H6 =1/(1+$B$16)^E6 · I6 =G6*H6, copied down to row 65.① The cash-flow table: the method that shows every step
Put one row for each half-year: period, cash flow (3.50 coupon, and 103.50 in period 20), discount factor and present value. Adding up the PV column gives 96.5259. This is the slowest method, but it shows every step, and you will reuse the same table for duration and convexity on Sheet 8.
② PV: one line, valid only on a coupon date
=-PV(3.75%,20,3.5,100) treats the coupons as an annuity and the face value as a lump sum. It needs a whole number of periods, so it only works when settlement falls on a coupon date.
③ PRICE: real dates, between coupon dates
PRICE(settlement, maturity, rate, yld, redemption, frequency, basis) works from actual dates and returns the clean price per 100. On a coupon date all three methods agree, as the sheet shows. Between coupon dates only PRICE is still correct (see Sheet 7).
The coupon (7.00%) is lower than the yield investors require (7.50%), so the bond sells at a discount: 96.53. The yields line up as coupon rate 7.00% < current yield 7.25% < YTM 7.50%. That ordering holds for every discount bond, and it reverses for a premium bond.
Change B9 to 7.00%: all three prices become exactly 100.0000 (par). Change it to 6.00%: the bond moves to a premium of 107.4387.
4 Sheet 2: Zero-coupon bonds
A zero-coupon bond has only one cash flow, the face value at maturity. Its price is a single discount factor, and its Macaulay duration equals its maturity. Treasury bills, STRIPS and deep-discount bonds are all priced this way.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B5 | Face value | 100.00 | input |
| B6 | Years to maturity | 5 | input |
| B7 | Yield | 7.00% | input |
| B8 | Compounding per year | 2 | input |
| B9 | Observed price | 72.00 | input |
| B12 | Price — formula | 70.8919 | =B5/(1+B7/B8)^(B8*B6) |
| B13 | Price — PV | 70.8919 | =-PV(B7/B8,B8*B6,0,B5) |
| B15 | Yield from 72.00 — formula | 6.6792% | =B8*((B5/B9)^(1/(B8*B6))-1) |
| B16 | Yield — RATE | 6.6792% | =B8*RATE(B8*B6,0,-B9,B5) |
| B17 | Price, annual compounding | 71.2986 | =B5/(1+B7)^B6 |
| B19 | Modified duration | 4.8309 | =B6/(1+B7/B8) |
A 5-year zero at 7% (semiannual compounding) costs 70.89 per 100. If the market price is 72.00 instead, the implied yield is 6.68%. Compounding matters: with annual compounding the price is 71.30, because the same 7% then compounds less often.
5 Sheet 3: Floating-rate notes (FRNs)
An FRN pays reference rate + quoted margin (QM). The reference rate is a benchmark such as a 3-month T-bill rate, MIBOR or SOFR, and the coupon is reset each period. The coupon follows the market, so the price stays close to par. Two margins matter, and confusing them is the most common mistake:
| Margin | Set by | Used for |
|---|---|---|
| Quoted margin (QM) | The bond contract, fixed at issue | The coupon: (ref + QM)/m × F |
| Discount (required) margin (DM) | The market today, based on credit and liquidity | The discount rate: (ref + DM)/m |
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B6 | Reference rate | 6.00% | input |
| B7 | Quoted margin | 0.80% | input |
| B8 | Discount margin | 1.00% | input |
| B9 | Resets per year | 4 | input |
| B10 | Years | 3 | input |
| B13 | Coupon per period | 1.7000 | =(B6+B7)/B9*B5 |
| B14 | Discount rate per period | 1.7500% | =(B6+B8)/B9 |
| B16 | FRN price | 99.4630 | =-PV(B14,B15,B13,B5) |
| B17 | Price if DM = QM | 100.0000 | =-PV((B6+B7)/B9,B15,B13,B5) |
The issuer’s credit has weakened, so investors now want 1.00% over the reference rate while the note pays only 0.80%. The 0.20% shortfall each year, discounted over 3 years, is about 0.54, so the price is 99.46. If DM = QM the note is worth exactly 100.00 on a reset date. DM > QM gives a discount and DM < QM gives a premium, just as YTM against coupon does for a fixed bond.
Hull’s approach: valuing the FRN as a swap leg
John Hull (Options, Futures and Other Derivatives, interest rate swaps chapter) values a floating-rate bond with one argument. If the coupon resets to the market rate and you discount on that same curve, with no credit spread, the bond is worth exactly par immediately after every reset. Between resets only the next coupon k* is already fixed, and everything after it is worth par at the next payment date. So you discount just one cash flow:
Here L is the notional, k* the floating payment fixed at the last reset, t* the time to the next payment and r* the continuously compounded zero rate for t*.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B5 | Notional L ($ m) | 100.00 | input |
| B6 | 6-month rate set at last reset | 10.20% | input |
| B8 | Time to next payment t* | 0.25 | input |
| B9 | Zero rate r* (continuous) | 10.00% | input |
| B12 | Next payment k* | 5.1000 | =B5*B6/B7 |
| B13 | Value at next payment L + k* | 105.1000 | =B5+B12 |
| B14 | Discount factor | 0.975310 | =EXP(-B9*B8) |
| B15 | Floating-rate bond B_fl | 102.5051 | =B13*B14 |
| K10 | Full check: every coupon projected from forwards | 102.5051 | =SUM(K6:K8) |
A swap receives 8% fixed (semiannual) and pays 6-month LIBOR on $100 m, with 1.25 years left. The zero rates are 10%, 10.5% and 11% for 0.25, 0.75 and 1.25 years.
Fixed leg: Bfix = 4e−0.10×0.25 + 4e−0.105×0.75 + 104e−0.11×1.25 = 98.24. Floating leg: Bfl = 105.1e−0.10×0.25 = 102.51.
Swap value to the receive-fixed party = 98.24 − 102.51 = −$4.27 m. Valuing the swap as a portfolio of FRAs gives the same figure, as Sheet 2 of the Hull workbook shows.
| Aspect | Hull | CFA-style margin approach (above) |
|---|---|---|
| Main use | Floating leg of an interest rate swap | Pricing a credit-risky FRN |
| Credit spread | None: same curve for coupon and discounting | Quoted margin vs discount margin |
| Price on a reset date | Exactly par | Par only if DM = QM |
| Cash flows modelled | One: (L + k*) at the next reset | All coupons, reference rate held flat |
| Compounding | Continuous | Periodic (rate/m) |
| Duration | ≈ time to next reset | Driven by the DM–QM gap and maturity |
Figure 3 above already uses Hull’s logic: the FRN is priced as (face + next coupon) discounted to the next reset, which is why it barely moves when rates shift.
6 Sheet 4: Convertible bonds
A convertible bond lets the holder swap the bond for a fixed number of shares (the conversion ratio). When the share price is low it behaves like a bond, and when the share price is high it behaves like the stock. In Excel, value it from two sides and take the higher.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B6 | Coupon (annual) | 6.00% | input |
| B7 | Years | 5 | input |
| B8 | Straight-bond yield | 9.00% | input |
| B9 | Conversion ratio | 25 | input |
| B10 | Share price | ₹32.00 | input |
| B11 | Market price of CB | ₹1,020.00 | input |
| B12 | Dividend per share | ₹1.00 | input |
| B15 | Straight value (floor) | 883.31 | =-PV(B8,B7,B5*B6,B5) |
| B16 | Conversion price | 40.00 | =B5/B9 |
| B17 | Conversion value | 800.00 | =B9*B10 |
| B18 | Minimum value | 883.31 | =MAX(B15,B17) |
| B19 | Market conversion price | 40.80 | =B11/B9 |
| B20 | Conversion premium per share | 8.80 | =B19-B10 |
| B21 | Conversion premium ratio | 27.50% | =B20/B10 |
| B22 | Premium over straight value | 15.47% | =B11/B15-1 |
| B23 | Favourable income difference | 35.00 | =B5*B6-B9*B12 |
| B24 | Premium payback (years) | 6.29 | =(B11-B17)/B23 |
Converting today would give 25 × ₹32 = ₹800. Holding the bond is worth ₹883.31. The market pays ₹1,020, which is 27.50% above conversion parity, because the share could still rise. Each year the bond pays ₹35 more than the dividends on 25 shares would, so the premium over conversion value is earned back in about 6.3 years.
7 Sheet 5 (part 1): Yield to maturity with RATE, YIELD and Goal Seek
Yield to maturity (YTM) is the single discount rate that makes the PV of the promised cash flows equal to the price, which is the bond’s internal rate of return. There is no closed-form formula, so Excel solves for it by iteration. Three ways to get it:
| Method | Formula | When to use |
|---|---|---|
| RATE | =m*RATE(n, C, -P, F) | Settlement on a coupon date |
| YIELD | =YIELD(settle, mat, c, P, 100, m, basis) | Any settlement date, using the clean price |
| Goal Seek | Data → What-If → Goal Seek: set the price cell to the market price by changing the yield cell | Any model you have built yourself |
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B5 | Settlement | 15-Nov-2026 | input |
| B6 | Maturity | 15-Nov-2036 | input |
| B7 | Coupon | 8.00% | input |
| B8 | Clean price | 104.50 | input |
| B13 | YTM — YIELD | 7.3565% | =YIELD(B5,B6,B7,B8,100,B9,B10) |
| B14 | YTM — RATE check | 7.3565% | =B9*RATE(COUPNUM(B5,B6,B9,B10),100*B7/B9,-B8,100) |
| B15 | Current yield | 7.6555% | =100*B7/B8 |
The bond is held to maturity, every coupon and principal payment is made, and every coupon is reinvested at the YTM. If any of these fails, the return you actually earn will differ from the YTM.
8 Sheet 5 (part 2): Yield to call and yield to worst
A callable bond can be redeemed early by the issuer, at a set call price, on set dates. Yield to call (YTC) uses the same YIELD function with two changes: maturity = call date and redemption = call price. Yield to worst (YTW) is the lowest of the YTM and every YTC. It is the yield you can count on whatever the issuer decides.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| G6 | YTC to 15-Nov-2029 @ 102 | 6.9243% | =YIELD($B$5,E6,$B$7,$B$8,F6,$B$9,$B$10) |
| G7 | YTC to 15-Nov-2031 @ 101 | 7.0856% | =YIELD($B$5,E7,$B$7,$B$8,F7,$B$9,$B$10) |
| G8 | YTC to 15-Nov-2033 @ 100 | 7.1711% | =YIELD($B$5,E8,$B$7,$B$8,F8,$B$9,$B$10) |
| G9 | YTM to 15-Nov-2036 @ 100 | 7.3565% | =B13 |
| B16 | Yield to worst | 6.9243% | =MIN(B13,G6:G8) |
| B17 | Worst-case date | 15-Nov-2029 | =INDEX(E6:E9,MATCH(B16,G6:G9,0)) |
At 104.50 the bond trades well above its call prices. If it is called in 2029, the holder loses the premium (104.50 down to 102) over just 3 years instead of 10, so the yield falls to 6.92% from a YTM of 7.36%. For a bond trading at a discount, an early call works in the investor’s favour, and the YTM is usually the worst case. Quote the YTW, which is the convention for callable bonds.
The same template works for a putable bond, which the investor can sell back early. Put dates help the holder, so compare yield-to-put with YTM and expect the put to matter when rates have risen.
9 Sheet 6 (part 1): Money-market instruments and T-bills
Money-market instruments (T-bills, commercial paper, certificates of deposit) mature in a year or less and are usually issued at a discount. They pay no coupon, and the return is the difference between the purchase price and face value. The maths is simple. What trips people up is the different yield quotation conventions.
Indian T-bills: yield on price, 365-day year
| Tenor | Yield (input) | Price per ₹100 |
|---|---|---|
| 91-day | 5.45% | 98.6594 |
| 182-day | 5.55% | 97.3071 |
| 364-day | 5.65% | 94.6660 |
A 91-day T-bill is allotted at ₹98.65. Yield = (100 − 98.65)/98.65 × 365/91 = 5.4889%. In the workbook: =(100-B10)/B10*365/91.
US T-bills: discount basis, 360-day year, with dedicated Excel functions
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B14 | Settlement | 15-Nov-2026 | input |
| B15 | Maturity | 14-May-2027 | input |
| B16 | Bank discount rate | 3.80% | input |
| B17 | Days to maturity | 180 | =B15-B14 |
| B18 | Price | 98.1000 | =TBILLPRICE(B14,B15,B16) |
| B19 | Price — by hand | 98.1000 | =100*(1-B16*B17/360) |
| B20 | Money-market yield | 3.8736% | =TBILLYIELD(B14,B15,B18) |
| B21 | MMY — by hand | 3.8736% | =(100-B18)/B18*360/B17 |
| B22 | Bond-equivalent yield | 3.9274% | =TBILLEQ(B14,B15,B16) |
| B23 | BEY — by hand | 3.9274% | =(100-B18)/B18*365/B17 |
The simple 365/d bond-equivalent formula applies to bills of up to 182 days. For longer bills the bond-equivalent convention adds a quadratic adjustment so that the yield reflects semiannual compounding, so the simple formula and a calculator may differ slightly. State which convention you are using.
10 Sheet 6 (part 2): T-notes, T-bonds and quotes in 32nds
| Instrument | Maturity at issue | Cash flows | Quote | Excel |
|---|---|---|---|---|
| T-bill | 4 to 52 weeks | None (discount) | Discount rate | TBILLPRICE TBILLEQ |
| T-note | 2, 3, 5, 7, 10 years | Semiannual coupon | Price in 32nds, e.g. 98-16 | DOLLARDE YIELD |
| T-bond | 20 and 30 years | Semiannual coupon | Price in 32nds | DOLLARDE YIELD |
| Indian G-sec | Up to 50 years | Semiannual coupon | Price per ₹100, two decimals | YIELD with basis 0 (30/360) |
US Treasury prices are quoted in 32nds: “98-16” means 98 + 16/32 = 98.50. Excel converts with DOLLARDE. Type the quote as 98.16 and the fraction denominator as 32, and DOLLARFR converts back.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B29 | T-note quote 98-16 (typed 98.16) | 98.16 | input |
| B30 | Clean price | 98.5000 | =DOLLARDE(B29,32) |
| B31 | Yield (Actual/Actual) | 4.4405% | =YIELD(B26,B27,B28,B30,100,2,1) |
| B32 | Accrued interest | 1.0625 | =100*B28/2*COUPDAYBS(B26,B27,2,1)/COUPDAYS(B26,B27,2,1) |
| B33 | Invoice (dirty) price | 99.5625 | =B30+B32 |
| B39 | T-bond quote 95-08 (typed 95.08) | 95.08 | input |
| B40 | Clean price | 95.2500 | =DOLLARDE(B39,32) |
| B41 | Yield | 4.9306% | =YIELD(B36,B37,B38,B40,100,2,1) |
| B43 | Invoice (dirty) price | 96.4062 | =B40+B42 |
The 4.25% T-note at 98-16 yields 4.44%. Settlement falls 92 days into a 184-day coupon period, so the buyer also pays accrued interest of 2.125 × 92/184 = 1.0625, giving an invoice price of 99.5625. US Treasuries use Actual/Actual (basis 1); Indian G-secs and most corporate bonds use 30/360 (basis 0).
11 Sheet 7: Accrued interest, clean price and dirty price
Bonds change hands between coupon dates. The seller has earned interest for part of the current period, so the buyer pays it on top of the quoted price. That gives three related numbers:
where A is the number of days from the last coupon to settlement and E is the number of days in the coupon period, both under the bond’s day-count basis. Excel’s coupon-calendar functions give you every piece:
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B13 | Previous coupon | 15-Aug-2026 | =COUPPCD(B5,B6,B9,B10) |
| B14 | Next coupon | 15-Feb-2027 | =COUPNCD(B5,B6,B9,B10) |
| B15 | Days accrued A | 90 | =COUPDAYBS(B5,B6,B9,B10) |
| B16 | Days in period E | 180 | =COUPDAYS(B5,B6,B9,B10) |
| B17 | Days to next coupon | 90 | =COUPDAYSNC(B5,B6,B9,B10) |
| B18 | Coupons remaining | 20 | =COUPNUM(B5,B6,B9,B10) |
| B21 | Accrued interest | 1.7500 | =100*B7/B9*B15/B16 |
| B22 | Accrued — ACCRINT | 1.7500 | =ACCRINT(B13,B14,B5,B7,100,B9,B10) |
| B23 | Clean price | 96.5692 | =PRICE(B5,B6,B7,B8,100,B9,B10) |
| B24 | Dirty price | 98.3192 | =B23+B21 |
| B25 | Dirty — PV of cash flows | 98.3192 | =SUM(H29:H48) |
From 15 Aug to 15 Nov is 90 days on a 30/360 basis, out of a 180-day period. Accrued interest = 3.50 × 90/180 = 1.75. PRICE gives a clean price of 96.5692, so the buyer pays a dirty price of 98.3192 per 100. On ₹10 crore face value that is ₹9.8319 crore.
The same bond settled on the same date accrues differently under each basis. On 30/360 every month has 30 days; on Actual/Actual (US Treasuries) the period here has 184 actual days. Always set basis to match the market the bond trades in.
12 Sheet 8 (part 1): Macaulay duration
Macaulay duration is the PV-weighted average time to receive the bond’s cash flows, measured in years. Each period’s weight is its share of the total price.
| Period t | Time | Cash flow | PV @ 3.75% | Weight | t × PV |
|---|---|---|---|---|---|
| 1 | 0.5 | 3.5000 | 3.3735 | 3.49% | 3.3735 |
| 2 | 1.0 | 3.5000 | 3.2516 | 3.37% | 6.5031 |
| 3 | 1.5 | 3.5000 | 3.1340 | 3.25% | 9.4021 |
| … | … | … | … | … | … |
| 19 | 9.5 | 3.5000 | 1.7390 | 1.80% | 33.0406 |
| 20 | 10.0 | 103.5000 | 49.5654 | 51.35% | 991.3071 |
| Σ | 96.5259 | 100.00% | 1,409.4681 |
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B16 | Macaulay duration (table) | 7.3010 | =SUM(J6:J65)/B15/B7 |
| B22 | Macaulay duration (DURATION) | 7.3010 | =DURATION(B10,B11,B6,B9,B7,0) |
Σ t × PV = 1,409.4681 (in half-years). Divide by the price of 96.5259: 14.6020 half-years, which is 7.3010 years. Excel’s DURATION function returns the same figure.
Duration is longer for a longer maturity, a lower coupon or a lower yield. A zero-coupon bond’s duration equals its maturity, and a coupon bond’s is always shorter. An FRN’s duration is roughly the time to its next reset.
13 Sheet 8 (part 2): Modified duration and DV01
Macaulay duration is measured in time. Modified duration converts it into price sensitivity: the approximate percentage change in price for a 1-percentage-point (100 bp) change in yield.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B17 | Modified duration | 7.0371 | =B16/(1+B9/B7) |
| B23 | Modified duration — MDURATION | 7.0371 | =MDURATION(B10,B11,B6,B9,B7,0) |
| B19 | DV01 per 100 face | 0.067926 | =B17*B15*0.0001 |
ModD = 7.3010 / 1.0375 = 7.0371. If the yield rises by 100 bp, the price should fall by about 7.04%. The DV01 is 0.0679 per 100 face, so a ₹100 crore position loses about ₹6.79 lakh for each basis point the yield rises.
14 Sheet 8 (part 3): Convexity and the short-cut formulas
The price–yield curve is convex, so duration alone underestimates price gains and overestimates price losses. Convexity measures the curvature. Excel has no CONVEXITY function, so build it from the cash-flow table:
Short-cut (effective) formulas: three prices and no cash-flow table
Reprice the bond at y − Δy (V−), at y (V0) and at y + Δy (V+). With these three prices you can approximate duration and convexity for any bond you can price, which is how analysts do it for callable bonds, MBS and portfolios.
| Cell | Item | Value | Excel formula |
|---|---|---|---|
| B18 | Convexity (table) | 63.3632 | =SUM(K6:K65)/(1+B9/B7)^2/B15/B7^2 |
| B27 | V− at 7.25% | 98.2434 | =-PV((B9-B12)/B7,B7*B8,B5*B6/B7,B5) |
| B28 | V0 at 7.50% | 96.5259 | =-PV(B9/B7,B7*B8,B5*B6/B7,B5) |
| B29 | V+ at 7.75% | 94.8467 | =-PV((B9+B12)/B7,B7*B8,B5*B6/B7,B5) |
| B30 | Approx. duration | 7.0377 | =(B27-B29)/(2*B28*B12) |
| B31 | Approx. convexity | 63.3668 | =(B27+B29-2*B28)/(B28*B12^2) |
Approx. duration = (98.2434 − 94.8467) / (2 × 96.5259 × 0.0025) = 7.0377, almost identical to MDURATION. Approx. convexity = (98.2434 + 94.8467 − 2 × 96.5259) / (96.5259 × 0.0025²) = 63.37.
Duration effect = −7.0377 × 1% = -7.0377%. Convexity effect = ½ × 63.37 × (1%)² = +0.3168%. Total = -6.7209%, giving an estimated price of 90.0385 against an exact repriced value of 90.0292. The error is only 0.0093.
| Δy | Exact price | Duration only | Duration + convexity | Error of D + C |
|---|---|---|---|---|
| -300 bp | 119.95 | 116.91 | 119.66 | -0.2965 |
| -200 bp | 111.42 | 110.11 | 111.34 | -0.0847 |
| -100 bp | 103.63 | 103.32 | 103.63 | -0.0098 |
| +0 bp | 96.53 | 96.53 | 96.53 | +0.0000 |
| +100 bp | 90.03 | 89.73 | 90.04 | +0.0093 |
| +200 bp | 84.09 | 82.94 | 84.16 | +0.0761 |
| +300 bp | 78.65 | 76.15 | 78.90 | +0.2525 |
Use a small, symmetric bump: 5 to 25 bp. If it is too large, higher-order curvature distorts the estimate. If it is too small, rounding error in the prices takes over. For an option-free bond the short-cut measures match the analytical ones closely, as the sheet shows. For callable bonds, value V− and V+ with a model that lets the issuer’s call decision change.
15 Interactive lab: the price–yield curve, the duration line and convexity
A bond’s price is a curved function of its yield. Duration replaces that curve with a straight line, the tangent at today’s yield. Convexity measures how much the true curve bends away from that line. This lab makes all three visible: move the yield and watch the gap open up.
| Measure | Geometry | Price-change formula | Accuracy |
|---|---|---|---|
| Duration | Slope of the tangent line at today’s yield | %ΔP ≈ −ModD · Δy | Good for small moves; error grows with Δy² |
| Duration + convexity | Tangent plus a parabola that bends with the curve | %ΔP ≈ −ModD · Δy + ½ · C · Δy² | Very close even for ±200 bp |
| Exact repricing | The curve itself | P = Σ CF / (1 + y/m)t | Exact (what Excel PV / PRICE give) |
Which bonds are more convex?
Tick bonds to compare their percentage price changes. Longer maturities and lower coupons make the curve steeper (higher duration) and more bent (higher convexity).
- Duration is the slope: a linear, first-order estimate, exact only for tiny moves.
- Convexity is the curvature: for an option-free bond it is always positive, so the true price is always above the duration line.
- Positive convexity is valuable: you gain more when yields fall than you lose when they rise by the same amount.
- Convexity rises with maturity and with lower coupons and lower yields. Callable bonds and MBS can show negative convexity near the call price, where the curve bends the other way.
Set the coupon to 0 and maturity to 30 years, then drag Δy to ±400 bp. The duration-only error becomes large, while duration + convexity stays close to the exact price. Then try a 2-year bond: the curve is almost a straight line.
16 Interactive bond calculator: the workbook in your browser
Change any input. The calculator repeats the workbook’s logic for a bond settled on a coupon date: it prices the bond, computes Macaulay duration, modified duration and convexity, runs the short-cut formulas, and compares the estimated price shock with an exact repricing. The Excel formula for the current inputs is printed so you can paste it straight into a cell.
17 Excel function cheat sheet and common mistakes
| Function | Syntax | Returns |
|---|---|---|
| PV | PV(rate, nper, pmt, [fv]) | Price on a coupon date (negate it) |
| RATE | RATE(nper, pmt, pv, [fv]) | Periodic yield; multiply by m |
| PRICE | PRICE(settle, mat, rate, yld, redemption, freq, [basis]) | Clean price per 100 |
| YIELD | YIELD(settle, mat, rate, pr, redemption, freq, [basis]) | YTM, or YTC when given a call date and call price |
| ACCRINT | ACCRINT(issue, first_interest, settle, rate, par, freq, [basis]) | Accrued interest |
| COUPPCD / COUPNCD | COUPPCD(settle, mat, freq, [basis]) | Previous / next coupon date |
| COUPDAYBS / COUPDAYS | COUPDAYBS(settle, mat, freq, [basis]) | Days accrued / days in the period |
| DURATION / MDURATION | DURATION(settle, mat, coupon, yld, freq, [basis]) | Macaulay / modified duration |
| TBILLPRICE | TBILLPRICE(settle, mat, discount) | T-bill price per 100 |
| TBILLYIELD / TBILLEQ | TBILLYIELD(settle, mat, pr) · TBILLEQ(settle, mat, discount) | Money-market yield / bond-equivalent yield |
| DOLLARDE / DOLLARFR | DOLLARDE(98.16, 32) | 98.50; DOLLARFR converts back to 32nds |
- Typing 7 instead of 7%. Excel then reads the rate as 700%.
- Forgetting to divide by m. A semiannual bond needs y/2 and 2T periods in PV and RATE.
- Treating PRICE as the cash you pay. PRICE is clean; add accrued interest to get the invoice price.
- Using PV between coupon dates. It assumes whole periods, so use PRICE or the fractional-period table instead.
- The wrong basis. Indian G-secs and corporates use 30/360 (0); US Treasuries use Actual/Actual (1).
- Typing “98-16” as 98.16. Excel then treats it as 98.16 rather than 98.50. Convert with DOLLARDE first.
- Quoting YTM on a premium callable bond. The yield to worst is the honest number.
18 Practice exercises (solve in Excel, then check)
Q1. A 5-year, 8% annual-coupon bond yields 6%. What is its price per 100, and what Excel formula gives it?
=-PV(6%,5,8,100) = 108.4247. It trades at a premium because the coupon is higher than the yield.
Q2. A 3-year zero-coupon bond costs 85.00 per 100. What is its yield with semiannual compounding?
=2*RATE(6,0,-85,100) = 5.4913%.
Q3. A 91-day Indian T-bill is allotted at ₹98.70. What is its yield?
(100 − 98.70)/98.70 × 365/91 = 5.2830%.
Q4. A 91-day US T-bill is quoted at a 4.00% discount rate. Find its price and bond-equivalent yield.
Price = 100 × (1 − 0.04 × 91/360) = 98.9889. BEY = 365 × 0.04 / (360 − 0.04 × 91) = 4.0970%. In Excel use TBILLPRICE and TBILLEQ.
Q5. A 6% semiannual bond (30/360) settles 60 days after its last coupon at a clean price of 101.20. What is the dirty price?
Accrued interest = 3 × 60/180 = 1.00, so the dirty price = 101.20 + 1.00 = 102.20.
Q6. A bond has modified duration 6.5 and convexity 55. Estimate the % price change if its yield rises by 100 bp.
−6.5 × 0.01 + ½ × 55 × 0.01² = −6.50% + 0.275% = −6.225%.
Q7. V− = 102.10, V0 = 100.00 and V+ = 97.98 for Δy = 0.50%. Find the approximate duration and convexity.
Duration = (102.10 − 97.98)/(2 × 100 × 0.005) = 4.12. Convexity = (102.10 + 97.98 − 200)/(100 × 0.005²) = 32.0.
Q8. A convertible has a conversion ratio of 20, the share price is ₹55 and the straight value is ₹1,040. What is its minimum value?
Conversion value = 20 × 55 = ₹1,100. Minimum value = MAX(1,040, 1,100) = ₹1,100, so the bond now trades like the equity.
Q9. An FRN pays reference + 1.20% and investors now require reference + 0.90%. Premium or discount?
The quoted margin is higher than the discount margin, so the FRN trades at a premium, because its coupon is more generous than the market now requires.
Q10. Why is yield to worst usually the first call yield for a bond trading well above its call price?
An early call returns only the call price, so the premium paid is lost over a short period. That gives the lowest annualised yield.
19 References and next steps
- Microsoft Support — PRICE function
- Microsoft Support — YIELD function
- Microsoft Support — ACCRINT function
- Microsoft Support — COUPDAYBS function and COUPDAYS function
- Microsoft Support — DURATION function and MDURATION function
- Microsoft Support — TBILLPRICE, TBILLYIELD and TBILLEQ
- Microsoft Support — DOLLARDE function
- Microsoft Support — Financial functions reference
- TreasuryDirect — Treasury bills, notes and bonds
- Reserve Bank of India — FAQs on the Government Securities Market
- CFA Institute, Fixed Income curriculum readings on bond valuation, yield measures and interest-rate risk (Level I).
- John C. Hull, Options, Futures and Other Derivatives (Pearson), chapter on interest rate swaps: valuing a swap in terms of bond prices and as a portfolio of FRAs.
- Frank J. Fabozzi, Bond Markets, Analysis, and Strategies (Pearson), chapters on pricing, yield measures, duration and convexity.
Educational content only. All bonds, quotes and yields are hypothetical examples chosen for teaching and are not market data or investment advice. Excel results shown were produced by the companion workbook.