Hello ...?
Note: forwarded message attached.
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hsThere are a couple of bugs in baroneadesiwhaley.cpp:
The Option::Call case, before the while loop there's
the line:
bi = dividendDiscount * cumNormalDist(d1) * (1 -
1/Q) +
(1 - dividendDiscount *
cumNormalDist(d1) / QL_SQRT(variance)) / Q;
I believe this should read:
bi = dividendDiscount * cumNormalDist(d1) * (1 -
1/Q) +
(1 - dividendDiscount *
cumNormalDist.derivative(d1) / QL_SQRT(variance)) /
Q;
And on the put side, the same bug is inside the while
loop:
bi = -dividendDiscount * cumNormalDist(-d1) *
(1 - 1 / Q)
- (1 + dividendDiscount * cumNormalDist(-d1)
/ QL_SQRT(variance)) / Q;
I believe it should be:
bi = -dividendDiscount * cumNormalDist(-d1) *
(1 - 1 / Q)
- (1 + dividendDiscount *
cumNormalDist.derivative(-d1)
/ QL_SQRT(variance)) / Q;
Incidentally the same bug exists in the Haug book VBA
code...
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs