5 ms·
Regarding recurrence rules specifically, I worked in the financial services industry and bonds and derivatives obviously recur (usually monthly) for decades. N
by smallnamespace 10y ago
Regarding recurrence rules specifically, I worked in the financial services industry and bonds and derivatives obviously recur (usually monthly) for decades.
Not only do you need to specify the precise dates of recurrences, but you also need to map time intervals to fractions of a year (e.g. if I owe you $1mm a year, is 'one month' equal to 1/12 of a year, or do I count the actual numer of days in between? What about leap days, etc.). Getting it wrong even slightly means you get all the cashflows wrong.
Welcome to the joy of 'day count conventions' [1] and 'date rolling' [2].
[1] https://en.wikipedia.org/wiki/Day_count_convention https://en.wikipedia.org/wiki/Day_count_convention
[2] https://en.wikipedia.org/wiki/Date_rolling https://en.wikipedia.org/wiki/Date_rolling
Funny thing is these have all probably be reimplemented from scratch at every single bank.
- vegabook 10y agoI've personally re-implemented bond daycount for multiple markets several times at different shops. Maybe quantlib has this? Have never been allowed to use it.
- smallnamespace 10y agoQuantlib has a relatively small set implemented: https://github.com/lballabio/QuantLib/tree/master/ql/time/daycounters https://github.com/lballabio/QuantLib/tree/master/ql/time/da...