QuantLib day counter Thirty360 has various "conventions", all giving slightly different computations of Thirty360 day count, see https://rkapl123.github.io/QLAnnotatedSource/d5/d63/class_quant_lib_1_1_thirty360.html.
In RQuantLib src/utils.cpp, we already have many if else statements for the various conventions of ActualActual. It would be good to also allow RQuantLib users to choose the various conventions of Thirty360.
From a code structure point of view, probably not great extending the number of if else statements, because QuantLib appears to often add conventions. For example, current RQuantLib cases 8 to 13 are various ActualActual conventions. If we use let's say cases 14 to 19 for Thirty360 conventions, it would be rather ugly if in the future QuantLib adds another ActualActual convention. Would we make case 20 be the new ActualActual convention, so far away from the other ActualActual conventions? It would be hard to shuffle the numbers around without causing RQuantLib user pain. Maybe instead of using a number to denote day counters in RQuantLib, we need to move to using string codes...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4