User Tools

Site Tools


tbill_yield_methodology

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tbill_yield_methodology [2024/02/27 22:48] rajutbill_yield_methodology [2024/02/27 23:03] (current) – [Example 4] raju
Line 82: Line 82:
  
 Conclusion: Price should have 6 significant digits after the decimal. Conclusion: Price should have 6 significant digits after the decimal.
 +
 +==== Example 4 ====
 +https://www.treasurydirect.gov/auctions/upcoming/ -> Auction Results shows
 +
 +^ Bills ^ CMB ^ CUSIP ^ Issue Date ^ High Rate ^ Investment Rate ^ Price per $100 ^
 +| 42-Day | Yes | 912797HF7 | 02/29/2024 | 5.290% | 5.397% | $99.382833 |
 +| 42-Day | Yes | 912797GZ4 | 02/22/2024 | 5.280% | 5.401% | $99.384000 |
 +
 +https://www.treasurydirect.gov/auctions/announcements-data-results/ -> CMBs tab shows
 +
 +^ Security Term ^ CUSIP ^ Issue Date ^ Maturity Date ^ High Rate ^ Investment Rate ^
 +| 42-Day | 912797HF7 | 02/29/2024 | 04/11/2024 | 5.290% | 5.397% |
 +| 42-Day | 912797GZ4 | 02/22/2024 | 04/04/2024 | 5.280% | 5.401% |
 +
 +Combining both, we get
 +^ Security Term ^ CMB ^ CUSIP ^ Issue Date ^ Maturity Date ^ High Rate ^ Investment Rate ^ Price per $100 ^
 +| 42-Day | Yes | 912797HF7 | 02/29/2024 | 04/11/2024 | 5.290% | 5.397% | $99.382833 |
 +| 42-Day | Yes | 912797GZ4 | 02/22/2024 | 04/04/2024 | 5.280% | 5.401% | $99.384000 |
 +
 +Notice how yield (Investment Rate) went down (from 5.401% to 5.397%) even though price went down (from \$99.384000 to \$99.382833) for the first entry? This is because the 'days in year' changes from 366 to 365.
 +
 +<code>
 +$ ipython
 +
 +In [1]:
 +from tbill_yield import tbill_yield_short_maturity
 +tbill_yield_short_maturity(99.384000, 42, 366)
 +Out[1]:
 +5.401
 +
 +In [2]:
 +tbill_yield_short_maturity(99.382833, 42, 365)
 +Out[2]:
 +5.397
 +</code>
 +
 +Ref: https://github.com/KamarajuKusumanchi/market_data_processor/blob/master/src/tbills/tbill_yield.py -> tbill_yield_short_maturity()
  
tbill_yield_methodology.1709074082.txt.gz · Last modified: 2024/02/27 22:48 by raju