Re: new quantlib calendars
Posted by Luigi Ballabio-2 on Apr 26, 2004; 1:38am
URL: http://quantlib.414.s1.nabble.com/Re-Quantlib-users-Re-new-quantlib-calendars-tp10575p10580.html
On 2004.04.23 14:01, Jeff Yu wrote:
> I am the owner of the code so it is ok to have them covered under the
> QuantLib license.
Ok.
> "... You can't pass a CalendarLoader where the library expects a
> Calendar."? Well, you need to instantiate a Calendar first, let's
> say you want to use NewYork's holiday schedule, so you will have a
> NewYork ny created before passing it to
>
> CalendarLoader loader(ny, "the_external_holiday_schedule","=");
>
> It should work right away.
Yes, this works in the sense that after the above, you can write:
loader.isBusineddDay(date);
However, the added holiday information is stored into the
CalendarLoader instance, not into the NewYork calendar.
If you want to use it to instantiate, say, a Scheduler (whose signature
is
Schedule(const Calendar& calendar,
const Date& startDate, const Date& endDate,
int frequency, RollingConvention rollingConvention,
bool isAdjusted, const Date& stubDate = Date(),
bool startFromEnd = false, bool longFinal = false);
you're out of luck as the compiler won't accept a CalendarLoader as the
first argument.
I'm integrating your code into Calendar so that the above issue is
solved.
Later,
Luigi