Markets II: Rates, FX and Credit · Markets
3Government Bonds
Two traders on a chat agree to trade USD 10 million of a ten-year note at a yield of 4.200%. When the tickets come back they differ by USD 47 351. Both priced the same note at the same yield on the same settlement date, and both are right: one booked the price quoted on the screen, 100-12+, and the other the amount that changes hands, which adds the coupon interest earned since the last payment date, forty-one days of a 4.25% coupon. The note is the simplest instrument in this book: a fixed schedule of payments from a government that borrows in its own currency. Everything about it, its quoted price, its yield, its sensitivity to rates, depends on conventions that are fixed by regulation and market practice and that any system touching it must get exactly right. This chapter sets them out and derives the risk measures on which the rest of the book rests.
3.1 Cash flows, day counts and accrued interest
Definition 3.1 (Coupon bond)
A fixed-coupon bond pays, per 100 of face value, a coupon of on each of dates a year and repays its face value, called par, at maturity. The coupon dates are generated backwards from the maturity date in steps of months; if the maturity is the last day of a month, so is every coupon date.
Definition 3.2 (Day-count convention)
A day-count convention turns two dates into a fraction of a year. Actual/360 divides the actual number of days by 360; actual/365 fixed by 365; 30/360 counts every month as 30 days; actual/actual (ICMA) counts the actual days elapsed in a coupon period and divides by the actual days in that period, so every full period earns exactly .
Definition 3.3 (Accrued interest, clean and dirty price)
Between two coupon dates the seller of a bond has earned part of the next coupon, and the buyer pays it to her: this is accrued interest, under actual/actual, where is the fraction of the current period still to run. The dirty price (or full, or invoice price) is what changes hands; the clean price quoted on screens is the dirty price less accrued interest.
The market quotes clean prices because they do not jump on coupon dates (Figure 3.4): a clean price that moves means that the market moved. In the dollar market clean prices of notes and bonds are quoted in thirty-seconds of a point, so 100-12 is , and a trailing plus adds a sixty-fourth: 100-12+ is 100.390625.
Example 3.4 (Forty-one days)
A note paying 4.25% semiannually on 15 February and 15 August settles on 25 September 2026. The current period runs 184 days, of which 41 have elapsed: per 100, USD 4 735 per million, USD 47 351 on the trade of the opening paragraph.
As of September 2026 — Conventions of three sovereign markets
US Treasury notes and bonds: semiannual coupons on dates set by the maturity; each regular payment is exactly half the annual coupon; accrued interest on the actual days of the half-year; prices in 32nds of a point. UK gilts: semiannual coupons; actual/actual accrued interest since November 1998; ex-dividend seven business days before each payment, after which the buyer does not receive the coming coupon. German Bunds: issued at 7, 10, 15 or 30 years with a fixed annual coupon.
3.2 Price and yield
Definition 3.5 (Yield to maturity)
The yield to maturity of a bond with remaining coupons, settled at fraction of a period before the next one, is the rate, compounded times a year, that equates the dirty price with its discounted flows:
Proposition 3.6 (Price and yield)
The dirty price is a strictly decreasing, strictly convex function of . On a coupon date ( for the period just starting) the price is 100 if and only if .
Proof. Each term with is strictly decreasing and strictly convex in , so is their sum. With and the price is ; with the annuity equals and the price is . Uniqueness follows from monotonicity. ∎
Remark 3.7 (Two conventions for the fraction)
The formula above, which compounds over the fraction , is the market’s. The US Treasury’s own regulation, used to set auction prices, discounts the fractional period at simple interest, value at the next coupon date. The two agree on coupon dates and differ by a few thousandths of a point between them. A system that reproduces the regulation’s worked examples and the market’s screens must implement both (Section 3.6).
As of September 2026 — US marketable debt
Outstanding on 31 August 2026: USD 31.8 trillion of marketable Treasury securities, of which bills 7.2 trillion, notes 16.2 trillion, bonds 5.5 trillion, inflation-protected securities 2.2 trillion and floating-rate notes 0.7 trillion.
3.3 Duration, DV01 and convexity
Definition 3.8 (Duration, DV01, convexity)
With flows at times (in periods) and , the Macaulay duration is the present-value weighted average time of the flows, , in years. The modified duration is . The DV01 is the fall in price for a one-basis-point rise in yield, per 100, usually quoted per million of face. The convexity is .
Proposition 3.9 (Second-order price change)
For a parallel change of the yield,
Proof. Taylor’s formula in , with and . ∎
Example 3.10 (The ten-year note)
At 4.200% the note of Example 3.4 has a clean price of 100.397405 (100-12+), a dirty price of 100.870911, a Macaulay duration of 8.142 years, a modified duration of 7.975, a DV01 of USD 804 per million and a convexity of 75.8. A 100-basis-point rise costs 7.675 points; duration alone predicts 8.044, duration and convexity together 7.662 (Figure 3.2).
Method 3.11 (Hedging one bond with another)
To hedge a face of bond 1 against parallel moves with bond 2, sell of face. The hedge leaves: the difference in convexity, the risk that the two yields do not move together (curve risk), and the drift of both DV01s as time passes and yields move, which calls for rebalancing.
3.4 Zero-coupon rates, par yields and strips
Definition 3.12 (Zero-coupon rate, par yield, STRIPS)
The zero-coupon rate for maturity is the yield of a single payment at : . The par yield for is the coupon that would price a bond maturing at at 100. STRIPS are the US Treasury’s zero-coupon securities, created by separating an eligible note or bond into its individual coupon and principal payments, each of which then trades on its own; a complete set can be reassembled into the original security.
Proposition 3.13 (Par yields from discount factors, and back)
With discount factors ,
The second formula bootstraps the discount factors one maturity at a time from par yields.
3.5 Tutorial: a bond on a real calendar
Goal. Price the ten-year note from its yield on 25 September 2026, check its DV01 against a bumped reprice, and bootstrap a zero curve. End state: the numbers of Example 3.10 and Figures 3.2 and 3.3.
The schedule and the accrued interest, generated back from maturity with the end-of-month rule.
def coupon_dates(self, settle: dt.date) -> tuple[dt.date, list[dt.date]]: """(previous coupon date, remaining coupon dates after settle), generated back from maturity.""" eom = is_month_end(self.maturity) step = 12 // self.freq dates, k = [], 0 d = self.maturity while d > settle: dates.append(d) k += 1 d = add_months(self.maturity, -step * k, eom) return d, dates[::-1] def period_fraction(self, settle: dt.date) -> tuple[float, int]: """w = days from settle to the next coupon / days in the current period; n = coupons left.""" prev, nxt = self.coupon_dates(settle) return (nxt[0] - settle).days / (nxt[0] - prev).days, len(nxt) def accrued(self, settle: dt.date) -> float: """Actual/actual (ICMA): the period's coupon times the fraction of its days elapsed.""" w, _ = self.period_fraction(settle) return self.coupon / self.freq * (1.0 - w)Listing 3.1. Coupon dates, the fraction of the period to run, accrued interest. code/firm/bond/firm_bond.py You should see 0.473505 for the note on 25 September 2026.
The price in both conventions of Remark 3.7.
def dirty_price(self, y: float, settle: dt.date, treasury: bool = False) -> float: w, n = self.period_fraction(settle) c, f = self.coupon / self.freq, self.freq v = 1.0 / (1.0 + y / f) at_next = c * sum(v ** k for k in range(n)) + 100.0 * v ** (n - 1) # value at the next coupon date return at_next / (1.0 + w * y / f) if treasury else at_next * v ** wListing 3.2. Dirty price from yield: street and Treasury conventions. code/firm/bond/firm_bond.py Check the regulation’s examples: 99.057893 and 99.730918.
Risk, in the systems language of the firm. The C++20 twin computes duration, DV01 and convexity in one pass over the flows.
Risk risk(double y, year_month_day settle) const { int n = 0; const double w = fraction_to_next(settle, n); const double c = coupon / freq, v = 1.0 / (1.0 + y / freq); double p = 0.0, t1 = 0.0, t2 = 0.0; for (int k = 0; k < n; ++k) { const double t = k + w; // periods to the flow const double pv = (c + (k == n - 1 ? 100.0 : 0.0)) * std::pow(v, t); p += pv; t1 += t * pv; t2 += t * (t + 1.0) * pv; } const double mac = t1 / p / freq, mod = mac / (1.0 + y / freq); const double conv = t2 / p / (freq * freq) / ((1.0 + y / freq) * (1.0 + y / freq)); return {p, mac, mod, p * mod * 1e-4, conv};Listing 3.3. Duration, DV01 and convexity (C++20). code/firm/bond/cpp/firm_bond.hpp DV01 should equal half the price difference between yields 1 basis point either side, to six significant figures.
The zero curve.
def bootstrap_par(par_yields: list[float], freq: int = 2) -> list[float]: """Discount factors at 1/freq, 2/freq, ... years from par yields at those maturities.""" dfs: list[float] = [] for y in par_yields: c = y / freq dfs.append((1.0 - c * sum(dfs)) / (1.0 + c)) return dfsListing 3.4. Bootstrapping discount factors from par yields. code/firm/bond/firm_bond.py fig_bond.pywrites the three charts of the chapter.
What to change next. Price the same note on 13 February 2027 and on 16 February 2027 and compare clean and dirty prices across the coupon; then set the coupon to zero and check that the Macaulay duration equals the remaining life.
3.6 Build: the bond library
Purpose. The first piece of the miniature firm’s pricing library (extended in One Quant Books 5 and 6): every rates component, the futures basis (Chapter 6), the auction analyser (Chapter 4), the spread measures of the credit part (Chapter 21), prices bonds through it. Python for research, C++20 for the trading path, Rust as the twin.
Interface. Bond(coupon, maturity, freq) with coupon_dates(settle), accrued(settle), dirty_price(y, settle, treasury), clean_price(…), yield_from_clean(clean, settle), risk(y, settle); act_360, act_365f, thirty_360; bootstrap_par(pars), par_yield(dfs). The C++ header and the Rust crate expose the same names.
Rules. Coupon dates from maturity backwards, end-of-month preserved; actual/actual accrued interest; the street convention by default and the Treasury convention on request; yields decimal, compounded at the coupon frequency.
Acceptance tests. code/firm/bond/tests/, cpp/firm_bond_test.cpp, rust/: the regulation’s worked examples (99.057893; accrued 0.367403 and 99.730918); a leap-year month-end schedule; price and yield round trip; DV01 and convexity against bumps; a zero bond’s duration equals its life; bootstrapped factors reprice their par yields.
Stretch. Short and long first coupons (the regulation’s other examples); ex-dividend periods as in gilts; the 30/360 European variant; a business-day calendar for payment dates.
Sources and further reading
- 31 CFR Part 356, Appendix B, Formulas and Tables, sections I and II. US Treasury, STRIPS (TreasuryDirect); Monthly Statement of the Public Debt, August 2026.
- UK Debt Management Office, Formulae for Calculating Gilt Prices from Yields. Deutsche Finanzagentur, Federal Bonds.
- P. Ritchken, Fixed Income, chapter 2, “Treasury Securities”.
- F. J. Fabozzi (ed.), The Handbook of Fixed Income Securities, McGraw-Hill, for the conventions of other markets.
3.7 Exercises
Exercise 3.1 ★
A 4.25% semiannual note paid a coupon on 15 August. Give its accrued interest per 100 for settlement on 25 September, the period being 184 days long.
Solution
Solution of Exercise 3.1.
Forty-one days of 184 have elapsed: per 100.
Exercise 3.2 ★
Convert 99-16+ to a decimal price, and 101.296875 to a quote in 32nds.
Solution
Solution of Exercise 3.2.
. : 101-09+.
Exercise 3.3 ★
Give the clean price, on a coupon date, of a three-year 4% semiannual bond at a yield of 4%, then at 5%.
Exercise 3.4 ★★
For a two-year 4% semiannual bond at a yield of 4% on a coupon date, give the Macaulay duration, the modified duration and the DV01 per million.
Solution
Solution of Exercise 3.4.
Flows of 2, 2, 2 and 102 at 1, 2, 3, 4 half-years, : Macaulay duration 1.9419 years, modified , DV01 per 100, USD 190.39 per million.
Exercise 3.5 ★★
For the ten-year note of Example 3.10, estimate the price change for a 100-basis-point fall in yield with duration alone and with convexity, and compare with a full reprice.
Solution
Solution of Exercise 3.5.
Duration alone: . With convexity: . Full reprice at 3.20%: . For the fall, as for the rise, the second-order estimate is within 0.014 of the truth; the first-order one misses by 0.40.
Exercise 3.6 ★★
A 5% semiannual bond pays on 15 February and 15 August. Compute its accrued interest for settlement on 31 March 2026 under actual/actual and under 30/360. Which market’s investor would care about the difference?
Solution
Solution of Exercise 3.6.
Actual/actual: 44 days of a 181-day period, . 30/360: from 15 February to 31 March counts days, . The difference, 0.031 per 100 (USD 312 per million), matters to anyone who holds a bond of one convention hedged with, or financed against, an instrument of the other: every bond’s terms name its day count, and a system that assumes one for all will misprice the others.
Exercise 3.7 ★★★
Coding. With bootstrap_par, bootstrap the par curve of Figure 3.3 and report the ten-year discount factor and zero-coupon rate. Explain the sign of zero minus par at ten years.
Solution
Solution of Exercise 3.7.
Ten-year discount factor 0.657651, zero-coupon rate 4.2350% against a par yield of 4.21%. The par curve rises from two to ten years, so the earlier coupons of a ten-year par bond are discounted at lower zero rates than its final payment; its yield is a weighted average of those rates, below the ten-year zero rate.
Exercise 3.8 ★★★
Find the flaw. “A new thirty-year bond has a duration of thirty years, so a one-basis-point rise in yields costs 0.30% of its price.” Correct it for a 4.5% semiannual bond issued at par.
Solution
Solution of Exercise 3.8.
Only a zero-coupon bond has a duration equal to its life. A 4.5% thirty-year bond at par has a Macaulay duration of 16.74 years and a modified duration of 16.37; a one-basis-point rise costs of its price, USD 1 637 per million, about half of the claim.
3.8 Problem: The Two-Bond Desk
Problem 3.1
Weekend problem — a DV01-neutral curve position
On 25 September 2026 a desk buys USD 100 million face of a five-year note (4% coupon, maturing 30 September 2031, yield 3.95%) and hedges it with the ten-year note of Example 3.10 (4.25%, 15 August 2036, yield 4.20%).
Part I — Prices.
- Give the five-year note’s previous and next coupon dates. Why is its next coupon so close?
- Give its accrued interest and its clean price, in decimal and in 32nds.
- Give its dirty value for USD 100 million face.
- Give both notes’ DV01 per million.
- Give both notes’ convexity.
Part II — The hedge.
- What face of the ten-year note must the desk sell to be DV01-neutral?
- What is the net cash of the position (long dirty value less short dirty value)?
- Reprice both notes with both yields 1 basis point higher. What is the P&L?
- Reprice with both yields 25 basis points higher, then 25 lower. What is the P&L each time?
- Why is it negative both ways?
Part III — The curve.
- The five-year yield rises 10 basis points, the ten-year does not move. What is the P&L?
- The ten-year yield rises 10 basis points, the five-year does not move. What is the P&L?
- Which curve move does the position profit from? Name it.
- Is the position’s duration zero? Its DV01?
- Four weeks later neither yield has moved. Is the position still DV01-neutral? What changed?
Part IV — Judgement.
- Why hedge DV01 rather than face value, or market value?
- Name two risks the hedge leaves.
- Why would the desk quote both notes in 32nds but compute in decimals?
- State the named result: the hedge ratio and the P&L of the hedged position for a 25-basis-point parallel move either way.
- In one sentence: what does a DV01-neutral position bet on?
Solution
Solution of Problem 3.1.
1. The maturity, 30 September, is a month-end, so the coupon dates are 31 March and 30 September: previous 31 March 2026, next 30 September 2026, five days after settlement. 2. ; clean price 100.224893, quoted 100-07 to the nearest 64th. 3. Dirty 102.170249: USD 102 170 249. 4. Five-year USD 451.43 per million; ten-year USD 804.44 per million. 5. 23.18 and 75.82. 6. million of the ten-year (ratio 0.5612). 7. The short leg’s dirty value is ; net long, to be financed (Chapter 5). 8. : the position has no DV01, only a trace of convexity. 9. : . : . 10. The position is short convexity: per unit of DV01, the ten-year has more convexity ( against ), and the desk is short it. Whatever the direction, the short leg’s price moves by more than its duration predicts in the unfavourable way. 11. . 12. . 13. A rise of the ten-year yield relative to the five-year: the position is a 5s10s steepener. 14. Its DV01 is zero by construction, and so is its duration (DV01 divided by value): the 45.6 million of net value carries no first-order rate risk. 15. No. Time shortens both notes and the five-year’s coupon of 30 September leaves its dirty price; after 28 days the long leg’s DV01 is USD 44 519 and the short leg’s USD 44 863: net short USD 344 per basis point. The hedge must be rebalanced. 16. A basis point moves a ten-year note almost twice as much as a five-year: equal face or equal value would leave a large directional position. DV01 matches the price change per unit of yield change. 17. Curve risk (the two yields move differently), convexity, and the drift of the DV01s; also the financing of each leg in repo (Chapter 5). 18. Quotes and trade prices are in 32nds by convention; risk, P&L and hedge ratios are continuous quantities that must not be rounded to a 64th before they are summed. 19. Named result: the DV01-neutral hedge sells USD 56.12 million of the ten-year against USD 100 million of the five-year (ratio 0.5612); a 25-basis-point parallel move either way costs about USD 6 000 ( up, down), the price of being short convexity, while a 10-basis-point steepening earns USD 449 295. 20. On the shape of the curve, not its level.
3.9 Interview questions
Interview question 3.1 ★ trader, bank
What is the difference between a bond’s clean and dirty price, and why does the market quote the clean one?
Solution
Solution of Interview question 3.1.
The dirty price is what the buyer pays: the clean price plus the interest accrued since the last coupon, which belongs to the seller. The clean price removes the sawtooth of accrual and coupon payment, so its changes reflect changes in yield only; that is why screens quote it and why yields are quoted from it.
What the interviewer is looking for: accrued interest as the difference, and why a quoted price must not jump on coupon dates.
Interview question 3.2 ★ trader, researcher
Why is the price–yield relation convex? Is convexity good for the holder?
Solution
Solution of Interview question 3.2.
The price is a sum of discount factors , each convex in . Convexity means the bond gains more for a fall in yield than it loses for an equal rise, which is good for a holder, other things equal; markets price it, so a position long convexity usually gives up yield (carry) for it.
What the interviewer is looking for: the sum of convex terms, and the carry-for-convexity trade-off.
Interview question 3.3 ★★ trader, researcher, bank
A ten-year zero-coupon bond and a ten-year 5% coupon bond: which has the larger duration? The larger DV01 per 100 of face?
Solution
Solution of Interview question 3.3.
The zero: its duration is ten years, the coupon bond’s is shorter (about eight years at a 5% yield), since earlier coupons pull the average time in. Per 100 of face the comparison of DV01 needs the prices too: the zero trades far below par (about 61 at 5%), so its DV01 per 100 face () is smaller than the coupon bond’s (). Duration is per unit of value, DV01 per unit of face.
What the interviewer is looking for: separating duration (relative) from DV01 (absolute).
Interview question 3.4 ★★ trader
You are long the five-year and want to hedge with the ten-year. How much do you sell, and what risks remain?
Solution
Solution of Interview question 3.4.
Sell the ten-year in face , roughly 0.55 to 0.6 of the five-year face at current yields. Remaining: curve risk (you are now a steepener), convexity (short), DV01 drift over time and with yields, repo financing and specialness of each leg, and bid–ask on rebalancing.
What the interviewer is looking for: DV01 ratio, and naming the curve position that the hedge creates.
Interview question 3.5 ★★ developer
You must implement accrued interest for government bonds in three markets. What will your tests cover?
Solution
Solution of Interview question 3.5.
Month-end maturities (the end-of-month rule, including February in leap years); settlement on a coupon date (zero accrued); settlement in an ex-dividend period (negative accrued, for gilts); each market’s day count (actual/actual for Treasuries and gilts, 30/360 where a bond’s terms say so); annual against semiannual coupons; short and long first coupons; the regulation’s and the exchange’s published worked examples reproduced to the printed digit; round trips between price and yield.
What the interviewer is looking for: published worked examples as oracles, and the calendar edge cases.
Interview question 3.6 ★★★ researcher, trader
What is the modified duration of a perpetual bond paying a fixed coupon once a year, at a yield of 4%? And its Macaulay duration?
Solution
Solution of Interview question 3.6.
A perpetuity paying a year prices at . Then and the modified duration is years at 4%. Its Macaulay duration is years: the present-value weighted time of the payments, .
What the interviewer is looking for: the closed form and the difference between the two durations.