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

Error generated by the eu.price() method #2

Open
yogeshriyat opened this issue Dec 9, 2021 · 0 comments
Open

Error generated by the eu.price() method #2

yogeshriyat opened this issue Dec 9, 2021 · 0 comments

Comments

@yogeshriyat
Copy link

Hi there - When I try the example in your READ.ME file, I get this error below. It looks like the error is coming from the option_eu.price() method. I tried // but that did not fix it. Any ideas?

[100%**] 1 of 1 completed

ZeroDivisionError Traceback (most recent call last)
in ()
9 )
10
---> 11 print(option_eu.price())

1 frames
in int_prms(self)
12 self.u = math.exp(self.sigma*math.sqrt(self.dt))
13 self.d = 1./self.u
---> 14 self.qu = (math.exp((self.r-self.div)*self.dt)-self.d)/(self.u-self.d)
15 self.qd = 1-self.qu
16

ZeroDivisionError: float division by zero

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

1 participant