Consider this T-Bill (912796TE9) that was purchased on 2019-10-30 and matures on 2020-02-06:
I'm trying to work through some of the basics of the yield calculation.
The days until maturity is 99. (
2020-02-06 minus 2019-10-30). That's easy enough.
The price is 99.563575. That's equal to
100 - ((discount) * (99/360)). Again, pretty straightforward.
Where I'm running into trouble is the yield. According to this page we should compute:
yield = ((100-price)/price) * (365/daysLeft)
By my calculations, that generates a yield of around 1.616095%. But as you can see from the screenshot, the actual yield is 1.620522%. So I'm off.
Now it turns out, if I plug 366 into the equation instead of 365, I get the correct result. Why is that? Presumably it has something to do with 2020 being a leap year. But a good fraction of the holding period takes place in 2019 which is not a leap year. What's the rule on this? If any fraction of the holding period until maturity touches a leap year then 366 shall be used?