- DateCalculator for all date calculation and handling of weekends or holidays
- PeriodCountCalculator for calculating differences between two dates in days, months or years according to some financial algorithms
- IMMDateCalculator to calculate the International Money Market dates
-
ObjectLabKit 1.0.1: Date Calculators for Business and Finance (9 messages)
- Posted by: Benoit Xhenseval
- Posted on: October 11 2006 14:33 EDT
ObjectLab has announced the release of version 1.0.1 of ObjectLab Kit for Java 1.5, available for download via SourceForge or the Maven Central Repository. The Kit provides Date Calculators and comes in two versions: one based on pure JDK (1.5) and one based on the Joda-time library (1.3+, JDK 1.5). The library is live in a UK & international Bank in the Credit Derivatives department. The DateCalculator implementation is intended for any business, while the other two interfaces are more specific to the financial industry. The most common function of a lot of banking or business applications is the handling of holidays and weekends; a set of standard rules are implemented to deal with days falling on a holiday. The library concentrates of the date manipulation and calculations. ObjectLab Kit provides the implementation of three interfaces:Threaded Messages (9)
- joda time by K S on October 11 2006 16:29 EDT
- not UK specific, provide some business functionality JDK or Joda by Benoit Xhenseval on October 11 2006 18:39 EDT
-
Re: not UK specific, provide some business functionality JDK or by K S on October 11 2006 06:53 EDT
- 1.5 or not... by Benoit Xhenseval on October 11 2006 07:06 EDT
-
Re: not UK specific, provide some business functionality JDK or by K S on October 11 2006 06:53 EDT
- not UK specific, provide some business functionality JDK or Joda by Benoit Xhenseval on October 11 2006 18:39 EDT
- Re: ObjectLabKit 1.0.1: Date Calculators for Business and Financ by rory Winston on October 13 2006 05:22 EDT
- feedback welcomed by Benoit Xhenseval on October 13 2006 09:32 EDT
-
Re: feedback welcomed by Benoit Xhenseval on October 13 2006 09:32 EDT
- PeriodCalculator - how to exclude holidays? by Alan Gross on July 06 2009 03:20 EDT
-
Re: feedback welcomed by Benoit Xhenseval on October 13 2006 09:32 EDT
- feedback welcomed by Benoit Xhenseval on October 13 2006 09:32 EDT
- good day by club stork on January 24 2013 23:17 EST
-
joda time[ Go to top ]
- Posted by: K S
- Posted on: October 11 2006 16:29 EDT
- in response to Benoit Xhenseval
http://joda-time.sourceforge.net/ I see that ObjectLabKit can interface with JodaTime but I don't quite understand what it adds... is it just UK specific formulas? JodaTime itself is great for date calculations. -
not UK specific, provide some business functionality JDK or Joda[ Go to top ]
- Posted by: Benoit Xhenseval
- Posted on: October 11 2006 18:39 EDT
- in response to K S
Hi KC, Thanks for your comments. The ObjectLab Kit provides 2 implementations of a set of functionalities that are used very commonly by businesses and financial institutions. These algorithms are generic and international. One implementation is pure JDK and has no equivalent under similar licenses, we believe. The other implementation makes uses of the excellent Joda-time library. The interface stays the same between the 2 implementations, if you learn one way, you'll know the other way. The Joda library provides a lot of functionality but not the ability to roll-over calculated dates that fall on a holiday, like we do in the financial world: forward, backward, modified following and modified preceeding. See this page for some info on those algorithms: http://objectlabkit.sourceforge.net/algo.html Furthermore, the idea is to be able to combine holiday calendars, say if you trade 2 currencies you may have to take into account the holidays in the settlement market of both. Creating all combinations of such calendars is not feasible (or advisable) up-front, the ability to combine them is useful. We also handle Tenor codes, like Overnight, Spot, 1D, 2M, 5Y, etc which has some business logic (basic but how many times re-written and re-tested). Refer to this page for more info: http://objectlabkit.sourceforge.net/tenor.html We also offer a simple IMM date calculators and a useful way to access those dates (like get next IMM date, get the list of IMM dates between d1 and d2, etc) Finally calculating the period difference between 2 days in terms of say days is obvious but in terms of months or years can lead to some interesting and more complex results according to the convention used for a particular instrument. In conclusion, the Date calculators are probably useful to any business that needs to deal with holidays. IMMDateCalculator and PeriodCountCalculators are more useful for the financial industry. It is a simple library, but it is neat and tidy and it does what it says on the tin... Kind regards Benoit -
Re: not UK specific, provide some business functionality JDK or[ Go to top ]
- Posted by: K S
- Posted on: October 11 2006 18:53 EDT
- in response to Benoit Xhenseval
thank you for the excellent explanation. it would be great to see this type of functionality rolled up into a joda 2.0. (and of course, not 1.5 dependent-- most 'enterprises' are very conservative) -
1.5 or not...[ Go to top ]
- Posted by: Benoit Xhenseval
- Posted on: October 11 2006 19:06 EDT
- in response to K S
Hi 1.5-or-not-1.5... We thought about it quite a lot... but we have seen quite a few banks switching to 1.5; we found that the use of generics would simplify our interface and allow us to create a 'generic' one (pun semi-intended) that you would then specialise for Date, Calendar, joda.LocalDate or joda.YearMonthDay. What we found quite interesting was the fact that we were able to define the units tests in terms of generics and hence ensure the same level of testing regardless of the actual implementation. Creating the same full suite of unit tests for a new implementation was a matter of 5-10 lines...for thousand of tests. We went down the route of generics instead of defining our own 'date-functionality' wrapper which was an option; we felt that as soon as we would come up with YAWFD (yet-another-wrapper-for-date) people would turn away. Generics are good for these! If one desperately need our library (look in my eyes, look in my eyes, you neeeeeed ObjectLab Kit!) but still uses 1.4 or so, I'd suggest to look at http://retrotranslator.sourceforge.net/ as mean to retrofit the byte code to run under 1.4 Finally we initially thought of simply providing an extension/contribution to Joda but the initial feedback from joda was mixed and, the bank was not too sure about using Joda at that time, so that dependency could have been an issue if it was mandatory. Now, we have the best of both worlds, but we do recommend Joda-time as it would probably help you outside the ObjectLab Kit anyway! :-) I hope this helps. Benoit. PS: we also launched another open source project on a very different subject, QALab, see: http://qalab.sourceforge.net -
Re: ObjectLabKit 1.0.1: Date Calculators for Business and Financ[ Go to top ]
- Posted by: rory Winston
- Posted on: October 13 2006 05:22 EDT
- in response to Benoit Xhenseval
Looks nice. I'll definitely take a look. -
feedback welcomed[ Go to top ]
- Posted by: Benoit Xhenseval
- Posted on: October 13 2006 09:32 EDT
- in response to rory Winston
Hi Roy, Thanks for your comment. Do not hesitate to contact us if you have a feedback. We had an interesting email exchange with Paul H. who suggested that the calculator enforces a "valid range", i.e. throws an exception if the calculated date falls outside a given holiday Set (+ min and max boundaries, e.g. Jan 1 2006 and Dec 31 2006 for 2006, even if the last holidays is Boxing Day). Do people require this? regards Benoit. -
Re: feedback welcomed[ Go to top ]
- Posted by: Benoit Xhenseval
- Posted on: October 13 2006 09:32 EDT
- in response to Benoit Xhenseval
Rory... not Roy, typo. sorry. -
PeriodCalculator - how to exclude holidays?[ Go to top ]
- Posted by: Alan Gross
- Posted on: July 06 2009 03:20 EDT
- in response to Benoit Xhenseval
Hello Benoit I have the job to calculate a period based on a calendar. The period should only take business days into account. Means I have to exclude weekends and holidays. I'm trying to use the objectlabs kit based on joda time. As far as I can see the PeriodCalculator only excludes the weekends. How can I exclude the holidays as well? Is this supported? I saw that the LocalDateCalculator is taking care of holidays but I didn't found out yet how to easily calculate a duration with it. Thank you very much for a tip. Best regards Alan -
good day[ Go to top ]
- Posted by: club stork
- Posted on: January 24 2013 23:17 EST
- in response to Benoit Xhenseval
is this version better?