Re: how is QL tested

Posted by Ferdinando M. Ametrano-2 on
URL: http://quantlib.414.s1.nabble.com/how-is-QL-tested-tp1999p2002.html

Hi Vadim

sorry for the late reply, but I got stretched pretty thin in the last weeks

>I am wondering what serves as a benchmark for testing algorithms for option
>pricing, implied vols., etc
Usually numerical examples provided by books ("Implementing Derivatives
Models", Haug, etc) and articles. Greeks are recalculated outside QuantLib
with a finite difference approach and checked with the results provided by
QuantLib. Parities and general relationship (as in Straddle = Call+Put) are
also checked.
These tests are implemented in QuantLib-Python test suite.
There is still much work that need to be done anyway

>Specifically I am interested in American options with continuous /
>descrete dividends.
Ouch! I checked what kind of test we have for american options, and I found
only something about greeks. We badly need something here. I wrote to Marco
(the original author of american options) and we will try to work on that.
I looked around for numerical examples but I couldn't find none. There must
be some numerical results for american option with discrete dividends
somewhere; suggestions anyone?

>To make sure, I am not reporting a problem. I am just trying to get
>confidence in QL.
I completely understand your concern. Of course anyone who wants to use
QuantLib for a serious task should test the library before, and I would
suggest to produce a test that could be run frequently to check that
further development doesn't broke the features you're interested in. Such a
test could be added to the Python test suite, or to the C++ examples

>I have been searching for ways of representing and fitting volatility smiles
>of options in QL. The closest things that I found are all sorts of
>*VolatilityStructure classes. They seem to be coming from the area of fixed
>income
>[...]
>  Interestingly the *VolatilityStructure classes
>appear in .hpp but not in any of .cpp files.
you're right. Luigi is working on that.

>Is there any support for volatility smiles of options?
Not yet

>  This by itself is a two-level question: a) whether there is a class that
> represents a smile
>and b) whether there are methods that fit the smile to the current set of
>option prices.
The first level shouldn't be that hard ... is there anyone who wants to
propose an interface for equity's vol, taking into account time and stike
dependencies?

>2. Are there means to incorporate time-dependent (but not stochastic)
>volatility in pricing of FdDividendAmericanOption. Here the answer is
>probably "yes, in principal you can" given what I have read in "The finite
>difference framework" of the user manual, but I am wondering is there an
>already canned solution.
Not yet, and while in principal you can, my opinion is that we need to
define the volatility interface before

ciao -- Nando