It looks like there may be a few bugs in the CapialIndexedBond pricers due to handling of non-standard period lengths, e.g.
DiscountingCapitalIndexedBondPaymentPeriodPricer#forecastValue
doesn’t scale by period.getYearFraction()
It looks like there may be a few bugs in the CapialIndexedBond pricers due to handling of non-standard period lengths, e.g.
DiscountingCapitalIndexedBondPaymentPeriodPricer#forecastValue
doesn’t scale by period.getYearFraction()
To test this you can calculate the px/yld for UKTI 0 .125 08/10/28 (GB00BZ1NTB69) for settlement 2018-06-22
For a price of 120.395 the yield should be -1.7093803
This bond has a long first coupon, the UKTI '31 which will be issued next week has a short first coupon.
It looks like DiscountingCapitalIndexedBondProductPricer#factorToNextCoupon
needs to change as well to be more like DiscountingFixedCouponBondProductPricer
& also to deal with ex-div periods correctly
Having dug into linker pricing further looking at JP bonds I think the ResolvedCapitalIndexedBond
should have a #fixedRate
property similar to ResolvedFixedCouponBond
in order to calculate the simple yield for CapitalIndexedBondYieldConvention.JP_IL_SIMPLE