-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BondYield: Difference from expected yield for bonds with clean_price equal to face_value near maturity #1958
Comments
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it. |
Hi, I implemented your code in C++ and performed some debugging. I found that by default, QuantLib uses the bondYield() method to calculate YTM with the dirty price (full price). Therefore, the final calculation result is affected by the settlement date. When you use a date that does not include the accrued amount for the calculation, you can get a YTM equal to the coupon rate. Perhaps this design is to reflect the actual market value of the bond? I'm not sure why QuantLib is designed this way. |
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks. |
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks. |
Matching the dirty price to the NPV of the coupons is the same as matching the clean price to the NPV minus the accrual; the accrual is constant, doesn't depend on the yield. It seems to be the same problem as #1168. I'm closing this one and adding a reference on that ticket. |
On second thought, it's a different issue. I think your expectation is off. In your example, we're during the last semiannual coupon of the bond; let's say we're at time At maturity, we'll receive Reordering and solving for the yield and finally If you plot the function above, here is what you get: |
I am testing bondYield method for a FixedRateBond passing clean price. I am using clean price equal to face value (100), so I expect that yield to maturity would be equal to the coupon rate independently of the valuation_date. However, I see that as the valuation date approach maturity. I see that yield to maturity is smaller than expected.
For example, the following code, computes the yield to maturity for a bond with semiannual coupons. Coupon rate is 9.25%. So if clean price is equal to face value. I would expect that bondYield method, returns ytm equal to 9.25% independent of the valudation_date. But I see that values differ from expected values, and they differ more as valuation date approach maturity.
valuation_date = ql.Date(5, 1, 2015) -> ytm = 9.24%
valuation_date = ql.Date(5, 1, 2018) -> ytm = 9.16%
The text was updated successfully, but these errors were encountered: