Skip to content

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

Open
@yogeshriyat

Description

@yogeshriyat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions