QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

Expose an IBOR coupon's decision about whether it has fixed or not

Open tomwhoiscontrary opened this issue 2 years ago • 4 comments

It is sometimes useful to look at an IBOR coupon and know whether it is based on a historical fixing or a forecast. This change exposes that decision, and also - IMHO! - cleans up the code to get a fixing a little.

This change does mean that for fixings today, we now call Index::pastFixing twice. Personally i don't think that's a big deal (especially since #1731). Otherwise, i think the functional and non-functional behaviour is the same.

I think this method would probably make sense in FloatingRateCoupon, using the same logic. I could pull it up if you think that would be useful. However, in that case, we should think about what OvernightIndexedCoupon.

tomwhoiscontrary avatar Sep 01 '23 14:09 tomwhoiscontrary

Have changed things around, so the test for enforcesTodaysHistoricFixings is only applied if the refDate is the evaluation date.

tomwhoiscontrary avatar Sep 08 '23 17:09 tomwhoiscontrary

This PR 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.

github-actions[bot] avatar Nov 22 '23 01:11 github-actions[bot]

This PR 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.

github-actions[bot] avatar Jan 22 '24 01:01 github-actions[bot]

This PR 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.

github-actions[bot] avatar Mar 23 '24 01:03 github-actions[bot]

This PR 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.

github-actions[bot] avatar May 29 '24 01:05 github-actions[bot]

Coverage Status

coverage: 72.559% (+0.009%) from 72.55% when pulling f9c5f08340b2fb9011cde925cb4e7e140cd8cf3c on tomwhoiscontrary:pr-expose-ibor-coupon-has-fixed into 87707701a59f3be1054b69cb9cac523ecc3610c5 on lballabio:master.

coveralls avatar Jun 14 '24 14:06 coveralls

Coverage Status

coverage: 72.558% (+0.008%) from 72.55% when pulling f9c5f08340b2fb9011cde925cb4e7e140cd8cf3c on tomwhoiscontrary:pr-expose-ibor-coupon-has-fixed into 87707701a59f3be1054b69cb9cac523ecc3610c5 on lballabio:master.

coveralls avatar Jun 14 '24 15:06 coveralls

I started again from scratch, with tests this time. The implementation is similar but not identical.

This version does not take a reference date (yet). I'm still thinking about that.

tomwhoiscontrary avatar Jun 14 '24 15:06 tomwhoiscontrary

Apparently one build hasn't finished yet:

build (Clang 16, clang16, mantic, clang, clang++, true) Expected — Waiting for status to be reported

Which by now presumably means it's dead or stalled.

tomwhoiscontrary avatar Jun 17 '24 15:06 tomwhoiscontrary

Coverage Status

coverage: 72.578% (+0.03%) from 72.55% when pulling 3eac73c93092666747377b0af4042dfcdd5e39fe on tomwhoiscontrary:pr-expose-ibor-coupon-has-fixed into 87707701a59f3be1054b69cb9cac523ecc3610c5 on lballabio:master.

coveralls avatar Jun 24 '24 16:06 coveralls