Book Image

Mastering Python for Finance

Book Image

Mastering Python for Finance

Overview of this book

Table of Contents (17 chapters)
Mastering Python for Finance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Bond duration


Duration is a sensitivity measure of bond prices to yield changes. Some duration measures are: effective duration, Macaulay duration, and modified duration. The type of duration that we will discuss is modified duration, which measures the percentage change in bond price with respect to a percentage change in yield (typically 1 percent or 100 basis points (bps)).

The higher the duration of a bond, the more sensitive it is to yield changes. Conversely, the lower the duration of a bond, the less sensitive it is to yield changes.

The modified duration of a bond can be thought of as the first derivative of the relationship between price and yield:

Here, dy is the given change in yield, is the price of the bond from a decrease in yield by dy, is the price of the bond from an increase in yield by dy, and is the initial price of the bond.

It should be noted that the duration describes the linear price-yield relationship for a small change in Y. Because the yield curve is not linear...