Re: Some noobie questions

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Some-noobie-questions-tp9472p9473.html

On Sat, 2007-05-19 at 06:55 +0000, Takashi Yamamoto wrote:
> I recently came accross Quantlib and have a few questions (I couldnt find
> the answers in the "documentation):

Hi Takashi,
        apologies for the delay, and thanks for the interest.


> 1). Is there a "roll your own" cookbook that shows how to derive other
> instruments (from an existing base instrument class say?)

It's not complete, but I uploaded a draft recently. You can find it at
<http://www.compplusplus.com/2007/04/luigi_ballabio__2.html>.  It's
written for QuantLib 0.4.0, but I think you can find your way around
0.8.0 as well.


> 2). Equity derivatives, Futures and Commodities appear to be missing from
> the library - was this an oversight?

We do have some equity derivatives in the library (European, Asian and
American vanilla options, barrier options, a few others.) The others are
missing because in their real work, most developers are working more in
interest-rate derivative, so that's what they were interested in coding.

> (i)- if yes, when are these instruments likely to be included ?

When someone has an interest in such instruments and is willing to help,
which leads me to your next question:

> (ii). No plan is in place for these instruments, could someone then kindly
> suggest to me how I may go about using the existing library to build these
> instruments - i.e attempt to add these instruments to the library (similar
> to question 1).

The draft at the above link contains a couple of working examples and
can get you started. However, it's likely that you'll need more
information. You're welcome to ask questions on this list.


> 3).  Concrete classes for calendars (one for each country) seems a bit
> unusual, why was this approach taking rather than having a generic calendar
> class with properties/methods that would determine which country the
> calendar was representing?

Because holidays are not represented as data in the calendar class, but
as actual code describing the holiday rules. Therefore, we need derived
classes to dispatch the correct virtual method.


> 4). There are existing, complete libraries for Date/Time (e.g. wxWidget),
> why did you not build on these existing classes (i.e. why did  you decide to
> start from scratch)?

When we started, we tried to keep dependencies at a minimum---for
instance, we didn't want to require wxWidget as a prerequisite for
building the library. Nowadays, we might switch (for instance, to
boost:date) but since the date class is used everywhere in the library,
that would require quite a bit of study to see that we wouldn't lose
functionality. So far, nobody had the time to do it.

Later,
        Luigi


----------------------------------------

Barker's Proof:
Proofreading is more effective after publication.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev