Basic Question on Quantlib, Date and Calendar Classes

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

Basic Question on Quantlib, Date and Calendar Classes

ambarish vaidya
Hi All,
 
I am starting to work with Quantlib. I compiled the libraries with Boost and am trying to play with Calendar/Date class. My first query is, is there any other documentation apart from the one provided with the library. I am trying to use Calendar/Date class as mentioned. Do I have to implement the isHoliday() method? I am not implementing any interface at all? How do I access this method.
 
Thanks for your time.
 
Regards
avv2quantlib
 

Yahoo! India Matrimony: Find your life partner online.

Reply | Threaded
Open this post in threaded view
|

Re: Basic Question on Quantlib, Date and Calendar Classes

Luigi Ballabio-2
On 2004.12.03 13:13, ambarish vaidya wrote:
> Hi All,

Welcome on the list,

> I am starting to work with Quantlib. I compiled the libraries with Boost
> and am trying to play with Calendar/Date class. My first query is, is
> there any other documentation apart from the one provided with the
> library.

Not at this time. However, you might want to look at the sources for the  
test-suite to see examples of class usage. The Examples directory might be  
another place to look into.


> I am trying to use Calendar/Date class as mentioned. Do I have
> to implement the isHoliday() method? I am not implementing any interface  
> at all? How do I access this method.

There are a number of calendars in the library which implement the  
interface (see the ql/Calendars folder.) You can use instances of those  
directly (see e.g., test-suite/calendars.cpp.)

You'd be concerned with implementing the interface only if you were to add  
a new calendar to the library (and in fact there's no Indian calendar  
included, so you might be a handy fellow to have around.) In that case, you  
can define a new class by cloning the source for some existing calendar and  
tweaking it until it returns the desired holidays.

Hope this helps,
        Luigi