Re: Simple Code

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Simple-Code-tp4403p4416.html

On 1/24/06, L.Isella <[hidden email]> wrote:

> If I understand correctly, the C++ code in the email prices plain vanilla European call options.
> It uses the standard Black and Scholes theory for a dividend-paying stock.
> No stochastic volatility, flat term structure and so on.
> I am testing the results against another library (http://finance.bi.no/~bernt/gcc_prog/).
> I am not totally sure whether the dividends in the example are paid continuosly or not, but if I set the yield to zero, then I am in the case of a non-dividend paying stock.
> But the output of the code in the email (I simply reset the value of the yield and print out the relevant quantities) is a bit puzzling to me:
>
> Black-Scholes value: 0
>
> whereas the other library provides a small value (about 0.08) but definitely non-zero.
> Am I misunderstanding?

No, but you might be doing something wrong. If I compile and run the
code in the email after setting the dividendYield variable to 0.0, I
get for the option a Black-Scholes price of 0.082.  You might want to
check your program or post it here to see what's the problem.

Later,
    Luigi