[R-SIG-Finance] Bug in fOptions::GBSOption boundary condition?
Nicolas Chapados
nicolas.chapados at gmail.com
Sat Sep 19 23:03:15 CEST 2009
Hello all,
I am using the fOptions module in RMetrics to price simple
Black-Scholes options. There seems to be an oversight in boundary
conditions when the underlying falls exactly on a strike price at
maturity, yielding a NaN price for the option (both calls and puts are
affected) ::
> library(fOptions)
> GBSOption("c", 485, 485, 0, 0, 0, 0.23)@price
[1] NaN
whereas slight departures from the strike are OK ::
> GBSOption("c", 484.999, 485, 0, 0, 0, 0.23)@price
[1] 0
> GBSOption("c", 485.001, 485, 0, 0, 0, 0.23)@price
[1] 0.001
I'm using fOptions_290.75 (as returned by sessionInfo()). Has this
been corrected in the development branch?
Many thanks for any help!
+ Nicolas Chapados
More information about the R-SIG-Finance
mailing list