Posted by
Chak Jack Wong on
URL: http://quantlib.414.s1.nabble.com/joint-calendar-tp2345p2347.html
Hi, Luigi and Jens,
The behavior in Jens' e-mail is exactly what we need. This is mainly used
for cross-ccy swap. for USD and Yen swap on Libor , the holiday is typically
NewYork, London and Tokyo (i.e. union of holiday.), and for quite a lot of
swiss product, we use Zurich/London. This is rather important (yet pretty
simple)
Is it possible to add this simple class to the 0.3.1 release?
Best regards,
Jack
Luigi Ballabio wrote:
> At 1:56 PM +0000 1/24/03, Chak Jack Wong wrote:
> >Something very simple, how can I specify NewYork and London as calendar?
>
> Jack,
> it's not entirely clear to me whether you want a calendar
> whose set of business days is the union or the intersection of the
> set of business days of New York and London. However, the principle
> is the same: you use the Composite pattern. You should derive a new
> calendar and a corresponding calendar implementation. The constructor
> of the new Calendar class takes two Calendars c1 and c2 and just
> passes them to its implementation, which stores them. The
> implementation defines its isBusinessDay(date) method either as:
>
> return c1.isBusinessDay(date) || c2.isBusinessDay(date);
>
> or:
>
> return c1.isBusinessDay(date) && c2.isBusinessDay(date);
>
> depending on the desired behavior. You'll also have to implement its
> name() method by composing c1.name() and c2.name() somehow.
>
> You're welcome to come back with some tentative code if you get into
> any problem---I'll try and give you a hand.
>
> Later,
> Luigi
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>
http://www.vasoftware.com> _______________________________________________
> Quantlib-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users--
This is not an offer (or solicitation of an offer) to buy/sell the
securities/instruments mentioned or an official confirmation. Morgan Stanley
may deal as principal in or own or act as market maker for
securities/instruments mentioned or may advise the issuers. This may refer
to a research analyst/research report. Unless indicated, these views are the
author's and may differ from those of Morgan Stanley research or others in
the Firm. We do not represent this is accurate or complete and we may not
update this. Past performance is not indicative of future returns. For
additional information, research reports and important disclosures, contact
me or see
https://secure.ms.com. You should not use email to request,
authorize or effect the purchase or sale of any security or instrument, to
send transfer instructions, or to effect any other transactions. We cannot
guarantee that any such requests received via email will be processed in a
timely manner. This communication is solely for the addressee(s) and may
contain confidential information. We do not waive confidentiality by
mistransmission. Contact me if you do not wish to receive these
communications. In the UK, this communication is directed in the UK to those
persons who are market counterparties or intermediate customers (as defined
in the UK Financial Services Authority's rules).