Yield calculates incorrectly on bonds with short/long last coupon

There is an issue about this bug : Yield calculates incorrectly on bonds with short/long last coupon · Issue #2592 · OpenGamma/Strata · GitHub

I suggested a PullRequest but I had to close it as it doesn’t give the same yield as the actual code (for example if one uses ACT_ACT_ISDA).

The problem is the pow variable is incremented by one every time. This is correct if the coupon is whole but it’s not correct if the last coupon is shorter/longer.

So how do we know the last coupon is shorter/longer ? I’ll be happy to improve my Pull Request to solve this important issue.

I have a new Pull Request for this problem.

Hello Strata team,

Can somebody have a look at this issue ?