Pricing zero coupon bonds

You have seen that the price of a zero coupon bond is simply the PV of a single cash-flow in the future. How much that single cash-flow is worth today will depend on how far it is into the future and what interest rate (yield) you discount it at. We will investigate this now.

To do this, you are going to price a zero coupon bond with a three year maturity and yield of 5% per year. Then you will change the maturity and yield and see how these factors affect the price.

In this exercise, you are going to work directly with the compound interest formula instead of using the npf.pv() function.

Recall that our PV formula is \(PV = \frac{FV}{(1 + r)^n}\)

This exercise is part of the course

Bond Valuation and Analysis in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate price of a 3 year 5% yield zero coupon bond
price_1 = ____

# Print the result
print("3 year 5% yield ZCB: ", ____)