Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option pricing BARONE-ADESI/WHALEY and negative rate #1291

Open
humbletrader123 opened this issue Jan 19, 2022 · 3 comments
Open

Option pricing BARONE-ADESI/WHALEY and negative rate #1291

humbletrader123 opened this issue Jan 19, 2022 · 3 comments

Comments

@humbletrader123
Copy link

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

@phyBrackets
Copy link

So, what is the expected behavior when the rate is negative?

@sweemer
Copy link
Contributor

sweemer commented Feb 7, 2022

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.

@pradkrish
Copy link
Contributor

what is the fix here? is it about adding a QL_REQUIRE to check the value? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants