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

[Bug] Vomma is not correct. Copied from Vanna #3749

Closed
CarloLepelaars opened this issue Dec 10, 2022 · 1 comment · Fixed by #3809
Closed

[Bug] Vomma is not correct. Copied from Vanna #3749

CarloLepelaars opened this issue Dec 10, 2022 · 1 comment · Fixed by #3809
Labels
bug Fix bug tests Test-related work

Comments

@CarloLepelaars
Copy link

CarloLepelaars commented Dec 10, 2022

Describe the bug
The formula for Vomma is exactly the same as that for Vanna.
The output for Vanna is correct, but wrong for Vomma.

This function for Vomma was probably copied over from Vanna and then not implemented. Are there any tests for Option Greeks available in OpenBB?

Reference: https://github.com/OpenBB-finance/OpenBBTerminal/blob/fb667ce867d07a39076b158a2aeef8504543920d/openbb_terminal/stocks/options/op_helpers.py#L376

To Reproduce

from openbb_terminal.stock.options import Option
test_S = 55.0 
test_K = 50.0
test_T = 365 
test_r = 0.0025 
test_sigma = 0.15
opt = Option(s=test_S,
                 k=test_K,
                 rf=test_r,
                 div_cont=0.,
                 expiry=test_T,
                 vol=test_sigma, opt_type=1)
print(opt.Vanna(change=1.)) ## -1.1782993        
print(opt.Vomma(change=1.)) ## Should be 47.1186994, but getting -1.1782993
  • Python version [e.g. 3.10]
@github-actions github-actions bot added bug Fix bug tests Test-related work labels Dec 10, 2022
@jmaslek
Copy link
Collaborator

jmaslek commented Dec 21, 2022

Nice catch! Yes this appears to just have been copies directly over. We do not have any tests yet for this part, but we are aiming to increase our coverage throughout, so this will eventually get some needed attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug tests Test-related work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants