As mentioned in the intro post, if you have a zero-coupon bond with face value F maturing in N years and trading today at price P, to determine the yield you have to solve this equation for y:

F = P*(1+y)^N

But remember that bond traders **always** think in terms of yield, not price. They would never say, “I bought a $1000 30-year zero-coupon bond for $308”. They would say, “I bought a $1000 30-year zero-coupon bond at 4%.”

That is, yield is not the output of a calculation based on price; it is the input of a calculation that determines price. We actually start with the face value F, maturity N, and yield y, and we invert the formula above to get P:

P = F/(1+y)^N

This formula is arguably the most important in all of finance, because it captures the concept “time value of money”. It tells you how much future money is worth today. The name for this is *Present Value*, or just *PV*. Finance professionals know this formula like you and I know how to add, so we need to stare at it a bit.

(Aside: When I was in elementary school, during one of my lessons (I forget which), I asked my teacher, “Do we need to memorize this?” He replied, “No, do not memorize it. *Learn* it.” At the time, I did not understand the difference.)

Remember, for any particular bond, the face value F and maturity N are constant; what varies is y (and therefore P) as the bond trades in the market. Obviously, when y goes up, P goes down. So if I were to say, “Hugh Hendry bought 30-year bonds at 4% and now they yield 4.25%”, you would immediately know that he had lost money on his investment. But how much?

If y is small, (1+y)^N is approximately 1+N*y. So we can estimate that when the yield changes by 0.25%, the price on a 30-year bond changes by 30 times that amount, or 7.5%. This is a rough approximation; can we do better?

Yes, with just a tiny bit of calculus. Take the derivative of price with respect to yield:

dP/dy = -N*F/(1+y)^(N+1)

Notice that the right-hand-side is awfully similar to the formula for P itself. So substitute P into there:

dP/dy = -N*P/(1+y)

We are interested in the percentage change of the price; that is, how big dP is relative to P. So divide through by P and multiply through by dy:

dP/P = -N*/(1+y)*dy

And that is it. To a first approximation, if the yield increases by dy, the price decreases, in percentage terms, by N/(1+y) times as much. So for our example of a 30-year bond whose yield increases from 4% to 4.25%, its price decreases by approximately 0.25% * 30 / (1.04) = 7.21%. The exact amount is 6.95%, so our approximation is not too bad, and it gets better the smaller the change in yield. (To get the next approximation, we need to use the “second-order term of the Taylor expansion”. Maybe later, when we talk about convexity…)

For a zero-coupon bond, the quantity N/(1+y) is called the *modified duration*. It is defined by the derivative we just took; i.e., by how the bond’s price changes for small changes in yield. But isn’t that (1+y) factor aesthetically displeasing? And besides, what about bonds with non-zero coupons?

Glad you asked. We can, and do, define modified duration for arbitrary bonds by the derivative above. That is:

*modified duration* = -(1/P)*(dP/dy)

Here P is the Present Value (i.e., price) of the bond, which might or might not be zero-coupon. So we need to back up a moment, and ask: How do we compute the PV of a bond that pays interest? Answer: We think of it as a bunch of little zero-coupon bonds. For example, if a bond pays $200 every six months and then $10000 after ten years, we think of it as one $200 zero-coupon bond with six-month maturity, plus one $200 zero-coupon bond with one-year maturity, plus one $200 zero-coupon bond with 1.5-year maturity, and so forth, plus one big $10000 zero-coupon bond with 10-year maturity. We use the PV formula to find the present value of each little bond, and then we add them all up to get the PV of the whole thing. (I told you it was an important formula.)

That is, if P_{1} is the present value of the first payment, P_{2} is the present value of the second payment, and so on, then the present value of the whole bond is just:

P = P_{1} + P_{2} + …

Put another way, we can break down any bond’s price into pieces contributed by the PVs of a bunch of zero-coupon bonds corresponding to its payments.

We can also ask, “what fraction of the total price is contributed by each payment?” If we use those fractions to compute a weighted sum of the maturities of the little hypothetical zero-coupon bonds, we get a number called the *Macaulay duration*, or simply the *duration*, of the actual bond. In symbols, if N_{1} is the number of years until the first payment, N_{2} is the number of years until the second payment, and so forth, then:

*Macaulay duration* = *duration* = (P_{1}/P)*N_{1} + (P_{2}/P)*N_{2} + …

I am sorry this is so long, but bear with me.

As it turns out, Macaulay duration is related to modified duration by exactly a factor of (1+y). To get the modified duration, you just calculate Macaulay duration and divide it by (1+y).

Now, I sort of lied when I said bond traders always think in terms of yield. *Human* bond traders think in terms of yield. But most trading these days is done by computers, and they do not think in terms of yield; they instead think in terms of something called the *force of interest*, denoted by r.

You see, if I mention to you a “yield of 7% for 10 years”, you might be tempted to multiply 7% by 10 and get 70%. And if I mention “this bond’s yield is 10% and that bond’s yield is 15%”, you might be tempted to take the difference and get 5%. But if you use those numbers for anything, you do not get the right answer, except to a rough approximation… An approximation that gets worse as the numbers get bigger. This is because the relevant formulas all involve (1+y), not y; and they multiply or divide by it, not add or subtract.

The “force of interest” r is defined as ln (1+y), and it is a number that you really can multiply by a time, or add or subtract from another, and get something both meaningful and exact. That is why computers use r instead of y. And if you define “duration” as how the price of a bond changes for a small change in r:

“duration” = -(1/P)*(dP/dr)

…then two very nice things happen: (1) this “duration” turns out to be the Macaulay duration; and (2) for a zero-coupon bond, it equals the maturity.

Now, when y is small, ln (1+y) is very close to y. And the yields we typically discuss are pretty small; only a few percent. Since we are not computers and do not like to think in terms of natural logarithms, we generally just pretend that r = y and do things like subtract yields. So although maybe we should be thinking in terms of force of interest, we actually think in terms of yield, and the results are close enough not to matter for qualitative discussion. (I apologize for wandering so far afield. To be honest, this is as close as I ever want to get to Dancing with the Quants.)

To sum up: The *duration* of a bond is how much its price changes with small changes in its “force of interest” (which is pretty much its yield). The more the interest payments are front-loaded, the shorter the duration, which is one reason it is called “duration”. For bonds with coupons, the duration is always less than the maturity. For zero-coupon bonds, the duration is always equal to the maturity. And if you are a human thinking in yields looking for a better approximation, use the “modified duration”, which is the duration divided by 1+y.

If you want more complete formulas and derivations, go read the Wikipedia article. What I call “P” (price) they call “V” (value), and what I call “y” (yield) they call “j” (???), but other than that you should find the descriptions are identical.

**Update**

Just a couple more comments.

Suppose you compute the (Macaulay) duration for some bond and get, say, 57 months. If the yield remains constant, and you wait a month and compute the duration again, what will you get? 56 months. This is another reason for naming this thing “duration”.

An astute reader might wonder, why are we bothering? Why do all this math just to get an approximation of how much money we are losing, when we could do about the same amount of math and get an exact result? The answer is **hedging**. Suppose you have two completely different bonds — different face values, different coupons, different maturities, different issuers — but *the same duration*. Then if you take a long position in one and a short position in the other with equal capital, the combination will not change value even if the yield goes up or down slightly. Extend this idea to multiple instruments, and you can construct a portfolio that is “perfectly hedged against interest rate risk”. (See also “Duration gap”.) Of course, this makes several assumptions, including that the yields on the various instruments will change together. Why anybody would assume that…

…will be our topic for next time.

Last sentence in second-to-last paragraph: modified duration is *maturity* divided by 1+y, right?

Actually, the ratio is 1+y for arbitrary bonds. I edited the post to try to make this more clear.

Modified duration is -(dP/dy)*(1/P). Macaulay duration — also called just “duration” — is -(dP/dr)*(1/P). If you take the ratio, everything cancels to leave you with dr/dy, and since r=ln (1+y), that ratio is 1/(1+y).

I was going to ask about sloping yield curves when summing to derive Macaulay durations but I assume you will discuss Macaulay-Weil durations next time. With the yield curve becoming steep it may be useful to provide an example contrasting yield curves at different slopes, and a potential reason why long bond yields are starting to increase. Also I’d devote a post to interest rate risk and why longer instruments could trade at a premium/discount.

Thanks for the interesting post, Nemo.

Well, I am not sure how much further I want to go down this particular rabbit hole. Not to mention that I am really learning most of this as I go. (I feel like I never really understand anything until I can explain it to somebody else. I am trying to write down what I wish I could have read when I started.)

I do need to talk about the yield curve, but I haven’t even talked about spreads yet. That was my plan for the next topic.

for those who like physics analogies, duration of a bond is akin to the moment of inertia of a plank with equally distributed co-linear vectors (which represent the coupons and principal repayment) along its length- ofcourse if this is gobbledegook, then i apologize

Great blog. Very interesting stuff. On your last sentence…

“Suppose you compute the (Macaulay) duration for some bond and get, say, 57 months. If the yield remains constant, and you wait a month and compute the duration again, what will you get? 56 months. This is another reason for naming this thing â€œdurationâ€.”

This is actually only true for a zero coupon bond. For a coupon bond, duration will decrease at a rate less than maturity. For example a 30yr 8% bond with a yield of 8% has a duration of about 12. A 29 year bond of the same coupon doesn’t have a duration of 11.

Anyhow, great stuff, I’ve posted a link on my finance blog – http://financeclippings.blogspot.com.

gatorbit —

For a coupon bond, duration will decrease at a rate less than maturity.Only because the shorter maturity has fewer coupon payments left. For my example (57 vs. 56 months), assuming no interest payment happened during the month, the duration decreases by exactly one month.

At least, that is what I get when I do the derivation. It is interesting enough that I think I will do a post on it. (Also, if my derivation is wrong, someone can tell me why.)

Thank you very much for the kind words, and for the link.

– Nemo

You might be right about that. I’d have to do the math to check it! I’ll let you know.

Yup, you’re right. Only when the number of cash flows change does the duration change. But your example is really a special case.

No idea if anyone actually does this, but it occurred to me that you could also look at the (1+y)^N expansion combinatorially and add in those terms successively (starting with smallest powers of y), rather than Taylor-ly.

[…] the change in the price of a bond from the change in yield can be given by the formula (see here for more details on […]