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

_fprime is not correct when computing implied volatility #29

Open
xuewei4d opened this issue Aug 22, 2020 · 3 comments
Open

_fprime is not correct when computing implied volatility #29

xuewei4d opened this issue Aug 22, 2020 · 3 comments

Comments

@xuewei4d
Copy link

return self.S*sqrt(self.T)*norm.pdf(d1)*exp(-self.r*self.T)

fprime is not correct, it should be

return self.S*sqrt(self.T)*norm.pdf(d1)*exp(-self.q*self.T)

@mcdallas
Copy link
Owner

mcdallas commented Sep 1, 2020

hey @xuewei4d could you provide a source for this formula? From a quick search online looks like the current implementation is correct source

@xuewei4d
Copy link
Author

xuewei4d commented Sep 1, 2020

imo, to compute iv using newton method, fprime is just vega. So according to the wikipedia, it should have exp(-q * t)

@foobash
Copy link

foobash commented Mar 21, 2021

Which one is right?

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

No branches or pull requests

3 participants