Bond Pricing

I have coded the mathematics in C. Call the code in Python.

Get the code on GitHub →


For the curious reader...

What Is a Bond?

A bond is a loan made by an investor to a borrower. The borrower is usually a business or a government.

When you buy a bond, you're just lending money in exchange for interest payments and the return of the amount you paid for the bond at an agreed future date.

Key Components:

  • Face Value (FF): The amount repaid at the agreed future date. This agreed future date is when the bond matures.
  • Coupon Rate (cc): The interest rate which the bond pays you.
  • Coupon Payment (CC): C=c×FC = c \times F This is just the face value of the bond multiplied by the interest rate offered. These are typically made semi-annually. If so, then we tweak our formula ever so slightly:
C=c2×FC = \frac{c}{2} \times F
  • Maturity (TT): Number of years until repayment.
  • Yield to Maturity (YTM) (rr): Effective annual return if held to maturity. This is used to calculate something financial geeks know as the discount rate.

Bond Pricing Formula

The value of a bond is the present value of all future coupon payments and the face value:

P=t=1TC(1+r)t+F(1+r)TP = \sum_{t=1}^{T} \frac{C}{(1 + r)^t} + \frac{F}{(1 + r)^T}

Where:

  • PP = price of the bond
  • CC = coupon payment
  • FF = face value
  • rr = discount rate / yield
  • TT = time to maturity

Prices of bonds and their yields move inversely:

  • If interest rates rise, bond prices fall.
  • If interest rates fall, bond prices rise.

Think about it.

Take a bond which is priced at £1000.

Let’s say interest rates in the economy rise to 7%, but before they were 5%.

You purchased a bond at 5% interest.

But since interest rates are now 7%...

Newly issued bonds now offer £70 per year instead of your £50.

So ask yourself:

Why would someone buy your bond paying £50 when they can get £70 from a new one?

They won’t.

Unless your bond is cheaper.


Why are Bonds such a big deal?

Bonds are famous for being a nice diversification of risk in a portfolio.

Bonds guarantee returns.

Stocks and other high-risk investments, such as options, do not.


What Bonds exist?

  • Government Bonds (e.g. U.S. Treasuries, UK Gilts, German Bunds)
  • Corporate Bonds

These two are the most common. Others that are not so common, but exist, are:

  • Municipal Bonds (issued by local governments)
  • Zero-Coupon Bonds (sold at a discount, no coupons)

Bonds are very important. They are useful for governments to fund infrastructure, for companies to grow, and for investors to earn steady, guaranteed returns.

Go get yourself a Bond. Not James Bond.