Help with fdAmericanOption

Posted by Wry Boy on
URL: http://quantlib.414.s1.nabble.com/Help-with-fdAmericanOption-tp2452.html

I just installed QL 0.3.1 and am just getting started
with it.  My background is programming and trading,
not ph.d.-level mathematics.  I would like to use the
lib to price american options primarily.   Looks like
the only direct support for american options is by
using finite difference techniques (no binomial for
american?)

So, regarding fdAmericanOption, can someone please
explain the timeSteps and gridPoints variables?  

FdAmericanOption(
    Option::Type type,
    double underlying,
    double strike,
    Spread dividendYield,
    Rate riskFreeRate,
    Time residualTime,
    double volatility,
    int timeSteps,        // <-- how to use this??
    int gridPoints        // <-- how to use this??
);

I am interested in a pragmatic explanation, not a
highly mathematical or theorectical one.   The docs
present the partial differential equations which does
not help me because I don't understand them.

The other question I have is about optimizing the use
of the lib to price many options.  If I want to price
thousands of options, for example, holding everything
constant and varying the underlying price in small
increments, would I do this by instantiating a new
option object with each new underlying price?  For
example:

for (double under=x; under<y; under+=0.25) {
 
   fdAmericanOption option(...,under,...);
   ... = option.value()
}

Is that the _best_ way to rip many values out of the
lib?


tia


wryboy

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com