0
$\begingroup$

How to calculate the modified duration of T-bill (discount instrument) and europeans bills (zero coupon instrument). I couldn't find how Bloomberg is calculating those values on YA

$\endgroup$
0

1 Answer 1

2
$\begingroup$

{LPHP YA:7:1 805703 } is the direct link to the help page (just copy paste into IB).

Duration itself (for zero coupon bonds) is just the maturity itself, scaled by price. enter image description here

Modified duration is the same, but divided by (1+y). DV01 is the dollar value change in market value given a one basis point change in interest rates. It is calculated as price * Mod duration/100. Looking at a specific example, say B 0 08/29/24 Govt, YAS looks like this:

enter image description here

Replicating this in Python code:

from datetime import datetime
import pandas as pd
today = datetime(2024,5,29)
maturity = datetime(2024,8,29)
daycount = 360
price = 98.6722847
discount = 5.2525
days = maturity - today
maturity_yrs =  days.days/daycount 
duration = round(maturity_yrs/price*100,3)
modified_d = round(duration / (1+discount/100),3)
DV01 = round(modified_d*price,2)
pd.DataFrame({"Duration": [duration], "Modified Duration" : [modified_d], "DV01": DV01})

enter image description here

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.