Bond Pricing and Interest Rate Sensitivity

Finance
Python
Author
Affiliation

Tomas Ruiz

Ludwig-Maximilians-Universität München

Published

March 20, 2026

Note

While working at Allianz 2-3 years ago, I made this plot to understand why short-term bonds offer better protection against hikes in interest rates. I decided to release it in blog format, because why not?

Explore how bond prices react to changes in interest rates. A bondholder of a $100 bond receives a fixed payment every year (coupon \(C\), e.g. $3/year) for \(T\) years (maturity, e.g. 10 years), plus the face value \(FV\) ($100) back at maturity. The price of a bond today is determined by discounting these future cash flows by the interest rate \(r\), because money today is worth more than money in the future.

  1. Discounted face value: \(\frac{FV}{(1+r)^T}\).
  2. Discounted coupon payments: \(C \cdot \frac{1 - (1+r)^{-T}}{r}\).

Notice that in the discounted face value \(\frac{FV}{(1+r)^T}\), the exponent \(T\) amplifies the effect of any change in \(r\) — the longer the maturity, the more the price drops when rates rise.

Use the sliders below to adjust the maturity, coupon rate, and interest rate. We assume annual coupon payments and a face value of $100.

Sensitivity to Interest Rate Changes: Longer maturities are more sensitive to interest rate changes. The plot below shows the bond price as a function of the interest rate for different maturities. The red dot marks your selected bond.

Key Takeaways: