From: Lawrence S. <law...@gm...> - 2022-01-18 13:47:28
|
Hi Jonathan The actual code is very complicated and quite massive. But I can reproduce the problem via the EquityOption Quantlib sample as follows: Essentially to reproduce the problem, just set riskfree rate to -0.012. And here is what I got: Option type = Put Maturity = May 17th, 1999 Underlying price = 36 Strike = 40 *Risk-free interest rate = -1.200000 %* Dividend yield = 0.000000 % Volatility = 20.000000 % Method European Bermudan American August 20th, 1998 November 20th, 1998 February 20th, 1999 May 20th, 1999 Black-Scholes 5.781564 N/A N/A Black Vasicek Model 5.274950 N/A N/A Heston semi-analytic 5.781563 N/A N/A Bates semi-analytic 5.781563 N/A N/A forward + displacement (-3.875e+14 + 0) must be positive On Tue, Jan 18, 2022 at 7:27 AM Jonathan Sweemer <sw...@gm...> wrote: > Hi Lawrence, > > Are you able to share a snippet of the source code that crashes for you? > > On Mon, Jan 17, 2022 at 11:45 PM Lawrence Sum <law...@gm...> > wrote: > >> Hi, >> >> I am still using QuantLib 1.22/Windows and testing negative >> discount rates for all option pricing methods. I noticed if the discount >> rate is negative (I used -1.2%) and Barone-Adesi/Whaley will crash (forward >> + displacement (-3.875e+14 + 0) must be positive). All other methods seemed >> to produce reasonable prices. If the rate is exactly zero there is no >> crash. Is this an issue to fix or this is expected? >> >> I cross-tested negative rate for Barone-Adesi/Whaley using matlab/fin >> toolkit and it worked there. >> >> Thanks >> Lawrence Sum >> _______________________________________________ >> QuantLib-dev mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >> > |