Skip to content

Yield calculates incorrectly on bonds with short/long last coupon #2592

@ShaunParkYieldX

Description

@ShaunParkYieldX

Here is an example bond.
Cusip: 52107QAG0
ISIN: US52107QAG01
Dated Date: 02/13/2015
First Coupon Date: 09/01/2015
Maturity Date: 02/13/2015
Coupon: 3.75
Coupon Frequency: Semi-Annual
Day Count Convention: 30/360

This bond has long first coupon (02/13/2015 to 09/01/2015) and short last coupon (09/01/2024 to 02/13/2025)
In DiscountingFixedCouponBondProductPricer, inside method dirtyPriceFromYieldStandard, the last coupon and principal are discounted back to the first coupon date. It uses variable called pvAtFirstCoupon.
The problem appears to be with Math.pow(factorOnPeriod, (double)pow), where pow is assumed to be an integer. When a bond has short/long last coupon, that last period will not be 1. For a short last coupon, the last period is less than one. For a long last coupon, the last period is greater than one.

This incorrect discounting of the last coupon and principal results in the yield calculation being incorrect for bonds with short/long last coupon.›

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions