You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: If rate is negative (I used -0.012 - 0.12%), the BAW option pricing crashed with this error message: forward + displacement (-3.875e+14 + 0) must be positive
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
The text was updated successfully, but these errors were encountered:
If the model can’t handle negative rates then at the very least we should add a QL_REQUIRE to check the value, similar to how there is already a non-negative check on the spot value in the calculate method.
Problem: If rate is negative (I used -0.012 - 0.12%), the BAW option pricing crashed with this error message: forward + displacement (-3.875e+14 + 0) must be positive
Code: https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/vanilla/baroneadesiwhaleyengine.cpp#L115
To reproduce this problem, use the sample code EquityOption.cpp and changed the riskfree to -0.012 and you'll get:
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
The text was updated successfully, but these errors were encountered: