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

Options at-expiration return nan #89

Closed
alembcke opened this issue Feb 11, 2023 · 2 comments · Fixed by #92
Closed

Options at-expiration return nan #89

alembcke opened this issue Feb 11, 2023 · 2 comments · Fixed by #92

Comments

@alembcke
Copy link
Contributor

I am using tf-quant-finance for plotting option values and greeks. When plotting at-expiration (so expiries=0) most of the models return nan for some or all prices. Is this intended behavior, in which case I should wrap my calls to tf-quant-finance with some code to counter this, or is this something that could be changed?

This issue shows up for:

  • Bjerksund-Stensland with modified_boundary=True for all prices on a call, but only out-of-the-money prices on puts
  • Adesi-Whaley for out-of-the-money prices on calls only
  • Binomial for all options (American or European, calls or puts)

Only Black-Scholes-Merton and Bjerksund-Stensland with modified_boundary=False are not affected by this.

I could submit a PR to fix this issue, but before I do the work I want to make sure that this is a bug and not a feature.

@saxena-ashish-g
Copy link
Contributor

This is definitely a bug. Please feel free to send a PR fixing whichever of the issues you would like and we will fix the rest.

@alembcke
Copy link
Contributor Author

I tried to whip up a quick fix before heading on vacation, but it was slightly more complicated than I had hoped. If you have time to fix any of these issues, then please do. If anything is left in a few weeks when I am back, then I will work on it.

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

Successfully merging a pull request may close this issue.

2 participants