Hi, in the Schedule class, if you have endOfMonth=true, and you start from an end-of-month, then the convention is set (silently) to Preceding internally. This happens with both Forward and Backward date generation (around lines 156 and 200), via: if (endOfMonth && calendar.isEndOfMonth(seed)) convention=Preceding; This seems like an error - what if you want the convention you specified? What is the reason for this? Best regards, Chris Kenyon ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Hi Chris
On Fri, Sep 12, 2008 at 6:10 PM, Chris Kenyon <[hidden email]> wrote: > in the Schedule class, if you have endOfMonth=true, and you start from an > end-of-month, then the convention is set (silently) to Preceding > internally. > [...] > This seems like an error - what if you want the convention you specified? > What is the reason for this? it's not an error. If you want your dates to be on the end-of-month, i.e. on the last working day of the given months, specifying Following of Preceding doesn't make sense anymore. Just as implementation detail we use Preceding to move from the last calendar day in the month to the last working day in that same month. Is there any schedule you would like to obtain and you cannot using the existing class? If this is the case please let me know and I'll look into it ciao -- Nando ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
In reply to this post by Chris Kenyon-2
Hi Nando, suppose you have payments defined as "last-day-of-month", with Following convention (so payments can roll to the next month if the last day is not a business day). How can I generate these? This gets tricky if you start on a month with a small number of days, e.g. 28. I don't see how to get them directly - all suggestions welcome. BTW ... what's wrong with having last-day-of-month + a convention? Ciao, Chris ----- Original Message ---- From: Ferdinando Ametrano <[hidden email]> To: Chris Kenyon <[hidden email]> Cc: [hidden email] Sent: Friday, September 12, 2008 5:33:54 PM Subject: Re: [Quantlib-dev] error in Schedule? Hi Chris On Fri, Sep 12, 2008 at 6:10 PM, Chris Kenyon <[hidden email]> wrote: > in the Schedule class, if you have endOfMonth=true, and you start from an > end-of-month, then the convention is set (silently) to Preceding > internally. > [...] > This seems like an error - what if you want the convention you specified? > What is the reason for this? it's not an error. If you want your dates to be on the end-of-month, i.e. on the last working day of the given months, specifying Following of Preceding doesn't make sense anymore. Just as implementation detail we use Preceding to move from the last calendar day in the month to the last working day in that same month. Is there any schedule you would like to obtain and you cannot using the existing class? If this is the case please let me know and I'll look into it ciao -- Nando ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |