Login  Register

Re: Calendars

Posted by Luigi Ballabio on May 06, 2008; 4:11pm
URL: http://quantlib.414.s1.nabble.com/Calendars-tp6072p6077.html

On Tue, 2008-05-06 at 14:08 +0000, Simon Ibbotson - Straumur wrote:
> I don't think it needs to have copy semantics. Calendars are usually
> static data so I wouldn't think that several versions of a calendar
> would be necessary/desirable.
>
> In other words, if we add a holiday to a given - specific - holiday
> calendar, that should propagate into all instances of that calendar.

Yes, this is the current behavior for all specific calendars (TARGET
etc.) (except for JointCalendar)

> I can't think of a reason you might want two differing versions of the
> same calendar (except for cases which could be resolved external to
> QuantLib - measuring the impact of adding a missing holiday, for
> example).

For a specific calendar, no reason. For bespoke calendars, things are
different. If we write

BespokeCalendar c1;
BespokeCalendar c2;

we should be able to give different holidays to c1 and c2---or we'd be
limited to just one bespoke calendar.  The question is, when we write

BespokeCalendar c1;
BespokeCalendar c2 = c1;

should c1 and c2 stay linked, so that modifications in one are
propagated to the other?

> This would have the advantage of preserving the current behaviour (and
> minimal code changes!).

Yes, you have a point here.

Luigi


--

I hate quotations.
-- Ralph Waldo Emerson



-------------------------------------------------------------------------
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