use of MakeSchedule class

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

use of MakeSchedule class

Fabio Ramponi
Hi all,

I'm trying to use the class MakeSchedule to create a Schedule.

My aim is to create a schedule with MakeSchedule, then use the method MakeSchedule::withNextToLastDate() to set the private member nextToLastDate_ and recalculate the Schedule with the MakeSchedule::Schedule() operator.

Now, the problem is that the operator Schedule() updates the nextToLastDate and firstDate fields in the new Schedule if and only if
stubDate_ != Date()

But stubDate_ is initialized to Date() in the MakeSchedule constructor and then no other methods allow to change it, so I can call the method withNextToLastDate(), but the new schedule cannot use the updated field.

My question is: what is stubDate_ intended for? could it be a bug to be fixed?

Thanks in advance for your answers.

Fabio

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: use of MakeSchedule class

Luigi Ballabio
On Wed, 2008-04-23 at 13:16 +0200, Fabio Ramponi wrote:
> My aim is to create a schedule with MakeSchedule, then use the method
> MakeSchedule::withNextToLastDate() to set the private member
> nextToLastDate_ and recalculate the Schedule with the
> MakeSchedule::Schedule() operator.
>
> Now, the problem is that the operator Schedule() updates the
> nextToLastDate and firstDate fields in the new Schedule if and only
> if
> stubDate_ != Date()

Yes, that's a bug---sorry about this. It's been fixed for next release.
In the meantime, you can patch operator Schedule() to use firstDate_ and
nextToLastDate_ if stubDate_ == Date().

Luigi


--

There is no such thing as public opinion. There is only published
opinion.
-- Winston Churchill



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users