Re: schedule / full interface

Posted by igitur on
URL: http://quantlib.414.s1.nabble.com/schedule-full-interface-tp16512p16513.html

I remember I had a similar problem: http://quantlib.10058.n7.nabble.com/End-of-month-bond-coupons-for-leap-years-td15311.html

It's been on my todo list to see if I can create a constructor for the Schedule to accept an array of dates.

Francois Botha

On 24 April 2015 at 20:31, Peter Caspers <[hidden email]> wrote:
Hello,

I need to set up a swap with a nearly regular schedule. The only
exception is the first date which is on a holiday. The clean way to
generate this would be (?)

- generate a preliminary schedule using the schedule's class date
generation machinery
- extract the dates, overwrite the first one with the correct value
and then set up the final schedule based on this date vector

However when feeding the second schedule into a VanillaSwap
instrument, it complains that the schedule need to support the full
interface, as far as I can see to extract the calendar and businessday
convention which are used to get payment dates from the schedule
dates.

What can I do now ? As a workaround I just added a method

        std::vector<Date>& datesModifyable() { return dates_; }

to the schedule class which allows to modify the generated dates, but
retaining the full interface. But this is not meant like this, is it ?

Can we somehow make the schedule class more flexible without breaking
something ?

Thanks
Peter

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users