Dear QuantLib, I've added new calendars in my quantlib and I'm wondering if it could be included in the next release of QuantLib. These data are coming from an official source. Regards Xavier Abulker (See attached file: hongkong.hpp)(See attached file: hongkong.cpp)(See attached file: seoul.cpp)(See attached file: seoul.hpp)(See attached file: taiwan.cpp)(See attached file: taiwan.hpp) ************************************************************************* Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La FIMAT et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither FIMATnor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. hongkong.hpp (1K) Download Attachment hongkong.cpp (3K) Download Attachment seoul.cpp (3K) Download Attachment seoul.hpp (1K) Download Attachment taiwan.cpp (2K) Download Attachment taiwan.hpp (1K) Download Attachment |
Xavier
thank you for the contribution. In addition to Luigi's questions: >1) is the copyright owned by you or FIMAT? >2) in either case, can you get from FIMAT a statement that it's ok for >them if you contribute code under the QuantLib license? >3) is there any particular reason you don't name the official source >for the calendar info? Otherwise, it'd be nice to put it in the docs. a) not all holidays have been documented in the hpp file. This can be easily fixed. b) Lunar New Year, Tomb Sweeping, Dragon Boat, Mid-Autumn Festival, Buddha's birthday, Harvest Moon, Tuen NG Festival, Chung Yeung fest, ecc are provided for 2004, 2005, 2006. Is there an algorithm for calculating them? If the algo is not easy shouldn't we tabulate them as we do for Easter Monday? c) Honk Kong calendar: you list "Day after Good Friday", but since this is a Saturday it shouldn't be listed as a separate holiday. Am I wrong? ciao -- Nando |
In reply to this post by Xavier.Abulker
Ferdinando, a) not all holidays have been documented in the hpp file. This can be easily fixed. I understood from the hpp files that you only listed the days for which an algorithm is available or the day is fixed. I will try to list the other ones. b) Lunar New Year, Tomb Sweeping, Dragon Boat, Mid-Autumn Festival, Buddha's birthday, Harvest Moon, Tuen NG Festival, Chung Yeung fest, ecc are provided for 2004, 2005, 2006. Is there an algorithm for calculating them? If the algo is not easy shouldn't we tabulate them as we do for Easter Monday? Yes, there is one algorithm for the Lunar New Year but it looks very complex. Furthermore, the bank holidays for the Lunar new year are not the same for HongKong, Seoul and Taiwan for example. Buddha's birthday is not the same day for HongKong and Seoul in 2005 unless there is an error on the derivatives exchange website. Tomb Sweeping day should be celebrated two weeks after the vernal equinox, for this one the algorithm is certainly available but we need to check the dates with the algorithm and I don't have enough time to do that. This is a good idea to tabulate them as easter monday. For the other ones I don't know and the informations I got from the derivatives exchange don't go farther than 2006 because it is linked to the settlement days of Futures products c) Honk Kong calendar: you list "Day after Good Friday", but since this is a Saturday it shouldn't be listed as a separate holiday. Am I wrong? You're rigth, day after Godd Friday is redundant, this is listed by the HongKong exchange for 2004 (not in 2005) this is why I inserted it. Xavier Ferdinando Ametrano <[hidden email]> To: [hidden email], [hidden email] Sent by: cc: [hidden email], QuantLib-users [hidden email] <[hidden email]> eforge.net Subject: [Quantlib-users] Re: [Quantlib-dev] new quantlib calendars 21/04/2004 18:56 Xavier thank you for the contribution. In addition to Luigi's questions: >1) is the copyright owned by you or FIMAT? >2) in either case, can you get from FIMAT a statement that it's ok for >them if you contribute code under the QuantLib license? >3) is there any particular reason you don't name the official source >for the calendar info? Otherwise, it'd be nice to put it in the docs. a) not all holidays have been documented in the hpp file. This can be easily fixed. b) Lunar New Year, Tomb Sweeping, Dragon Boat, Mid-Autumn Festival, Buddha's birthday, Harvest Moon, Tuen NG Festival, Chung Yeung fest, ecc are provided for 2004, 2005, 2006. Is there an algorithm for calculating them? If the algo is not easy shouldn't we tabulate them as we do for Easter Monday? c) Honk Kong calendar: you list "Day after Good Friday", but since this is a Saturday it shouldn't be listed as a separate holiday. Am I wrong? ciao -- Nando ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ************************************************************************* Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La FIMAT et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither FIMATnor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. |
Ferdinando & Company:
Attached are the codes I use to load the holiday schedule from an external file. Here is a brief description: 1. The name of the object to load the external file is called "CalendarLoader", it takes at least two input variables in order to instantiate itself: a Calendar object, and the name of the external file that contains the holiday schedule (fully quanlified path is expected). The optional input is the delimiter used in the holiday schedule. 2. The format of the holiday schedule is City=YYYYMMDD, user can replace the equal sign with other characters, the default is the equal sign; The name of the city should match Calendar.name(). 3. I have modified all the codes so they are default to namespace QuantLib. 4. I initially intend to put them under ql/FileLoader location, you can change them whenever you see fit. 5. "test.cpp" is the sample program shows how to use it. With this loader, the holiday schedule can be updated dynamically provided the "city" class is already created. I hope QuantLib community would find this a useful add-on, of course any feedback would be greatly appreciated it. Cheers, Jeff -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, April 22, 2004 3:34 AM To: Ferdinando Ametrano Cc: [hidden email]; [hidden email]; QuantLib-users; [hidden email] Subject: Re: [Quantlib-users] Re: [Quantlib-dev] new quantlib calendars Ferdinando, a) not all holidays have been documented in the hpp file. This can be easily fixed. I understood from the hpp files that you only listed the days for which an algorithm is available or the day is fixed. I will try to list the other ones. b) Lunar New Year, Tomb Sweeping, Dragon Boat, Mid-Autumn Festival, Buddha's birthday, Harvest Moon, Tuen NG Festival, Chung Yeung fest, ecc are provided for 2004, 2005, 2006. Is there an algorithm for calculating them? If the algo is not easy shouldn't we tabulate them as we do for Easter Monday? Yes, there is one algorithm for the Lunar New Year but it looks very complex. Furthermore, the bank holidays for the Lunar new year are not the same for HongKong, Seoul and Taiwan for example. Buddha's birthday is not the same day for HongKong and Seoul in 2005 unless there is an error on the derivatives exchange website. Tomb Sweeping day should be celebrated two weeks after the vernal equinox, for this one the algorithm is certainly available but we need to check the dates with the algorithm and I don't have enough time to do that. This is a good idea to tabulate them as easter monday. For the other ones I don't know and the informations I got from the derivatives exchange don't go farther than 2006 because it is linked to the settlement days of Futures products c) Honk Kong calendar: you list "Day after Good Friday", but since this is a Saturday it shouldn't be listed as a separate holiday. Am I wrong? You're rigth, day after Godd Friday is redundant, this is listed by the HongKong exchange for 2004 (not in 2005) this is why I inserted it. Xavier Ferdinando Ametrano <[hidden email]> To: [hidden email], [hidden email] Sent by: cc: [hidden email], QuantLib-users [hidden email] <[hidden email]> eforge.net Subject: [Quantlib-users] Re: [Quantlib-dev] new quantlib calendars 21/04/2004 18:56 Xavier thank you for the contribution. In addition to Luigi's questions: >1) is the copyright owned by you or FIMAT? >2) in either case, can you get from FIMAT a statement that it's ok for >them if you contribute code under the QuantLib license? >3) is there any particular reason you don't name the official source >for the calendar info? Otherwise, it'd be nice to put it in the docs. a) not all holidays have been documented in the hpp file. This can be easily fixed. b) Lunar New Year, Tomb Sweeping, Dragon Boat, Mid-Autumn Festival, Buddha's birthday, Harvest Moon, Tuen NG Festival, Chung Yeung fest, ecc are provided for 2004, 2005, 2006. Is there an algorithm for calculating them? If the algo is not easy shouldn't we tabulate them as we do for Easter Monday? c) Honk Kong calendar: you list "Day after Good Friday", but since this is a Saturday it shouldn't be listed as a separate holiday. Am I wrong? ciao -- Nando ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ************************************************************************ * Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La FIMAT et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither FIMATnor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users abc.txt (104 bytes) Download Attachment strfileloader.hpp (971 bytes) Download Attachment strfileloader.cpp (1K) Download Attachment parser.hpp (793 bytes) Download Attachment parser.cpp (1K) Download Attachment calendarloader.hpp (833 bytes) Download Attachment calendarloader.cpp (1K) Download Attachment test.cpp (773 bytes) Download Attachment |
Free forum by Nabble | Edit this page |