-
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
Fix IborCoupon and Money data races #1187
Conversation
The fails are due to coveralls.io being down for maintenance. |
Hi Philip, I am pretty sure that the approach is technical correct. It is more or less the same as I initially suggested in #665 for the However from the business perspective I think we should take a different approach for the IMHO this translate into an abstract The way to achieve this would be
I think this solves the issues we currently have with the The problem is that @lballabio, @pcaspers What do you think about this approach? |
I forgot to mention: The new constructor arguments of So the client code "only" has to change all its current constructor calls to the desired indexed or at par one. |
I agree with aiming at removing the flag in the long run. In the short term, though, we might merge this PR and do the rest of the work later. (I'll probably try to release 1.24 in October.) For the long-term solution: we already have the machinery for pricing the same coupon in different ways. I'd keep just one |
Okay, no problem. |
as for the long term solution for the Ibor coupon that Luigi mentions above, see #1189 |
Here's a fix for #1146. I added both
IborCoupon::Settings
andMoney::Settings
as nested classes per @ralfkonrad's suggestion. I deprecated the original static methods -- which still work -- they simply use the new singletons. The test suite and example code changes are simply to use the new apis. TheMoney
class unfortunately did not use static methods, but static vars instead (ouch), so I did the best that I could with that.I tested locally with
QL_USE_INDEXED_COUPON
off and then on.Phil