Bond Math in Python