Back to Solved Problems

Hull, J. C. (2022). Options, Futures, and Other Derivatives (11th Ed.).

Chapter 6 - Interest Rate Futures.

question 8

Description

Suppose that the Treasury bond futures price is 101-12. Which of the
following four bonds is cheapest to deliver?

=====  =======  =======
Bond   Price    Conversion factor
=====  =======  =======
1      125-05   1.2131
2      142-15   1.3792
3      115-31   1.1149
4      144-02   1.4026
=====  =======  =======

Solution

Imports
from datetime import datetime
import math
import QuantLib
import pandas as pd
Code
def solve_question_8():
    futures_price = 101 + 12 / 32

    data = {
        "bond": [1, 2, 3, 4],
        "price": [125 + 5 / 32, 142 + 15 / 32, 115 + 31 / 32, 144 + 2 / 32],
        "conversion_factor": [1.2131, 1.3792, 1.1149, 1.4026],
    }

    data = pd.DataFrame(data)

    # The cheapest-to-deliver bond is the one having the lowest factor:
    # Quoted Price - Futures Price * Conversion Factor
    factor = data["price"] - futures_price * data["conversion_factor"]

    data = data.assign(factor=factor)

    cheapest_bond = data["bond"][data["factor"].idxmin()]

    return cheapest_bond