-
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
Expose an IBOR coupon's decision about whether it has fixed or not #1781
Expose an IBOR coupon's decision about whether it has fixed or not #1781
Conversation
} else { | ||
// fixingDate_ == refDate | ||
if (QuantLib::Settings::instance().enforcesTodaysHistoricFixings()) { | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer holds once you add the refDate
argument to the method call. enforcesTodaysHistoricFixings
only comes into play when refDate
is the evaluation date.
6046e73
to
404d876
Compare
Have changed things around, so the test for enforcesTodaysHistoricFixings is only applied if the refDate is the evaluation date. |
ql/cashflows/iborcoupon.cpp
Outdated
} | ||
} | ||
} else { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here fixingDate == refDate
but refDate != evaluationDate
. We should still check if there is a past fixing loaded.
I think we need a series of tests for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure of what we should do in this particular case, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the tests go in QuantLib/test-suite/cashflows.cpp? Or a new QuantLib/test-suite/iborcoupon.cpp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cashflows.cpp is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Tom, it seems we stalled on this. Do you have time to have another look? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would definitely like too. My current QuantLib priority is solving the mystery of the performance regression i see, which blocks any further upgrade. Once that's done i would like to get back to this, so we can stop carrying this patch. But of course, there will be other work to do at some point.
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. |
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. |
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. |
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. |
404d876
to
33fcd31
Compare
…t has fixed or not
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. |
Apparently one build hasn't finished yet:
Which by now presumably means it's dead or stalled. |
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.