We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
``[self.callPrice, self.putPrice] = self._price() 277 else: --> 278 [self.callPrice, self.putPrice] = self._price() 279 [self.callDelta, self.putDelta] = self._delta() 280 [self.callDelta2, self.putDelta2] = self._delta2()
File c:\program files\python39\lib\site-packages\mibian_init_.py:307, in BS._price(self) 305 raise ZeroDivisionError('The strike price cannot be zero') 306 else: --> 307 call = self.underlyingPrice * norm.cdf(self.d1) - 308 self.strikePrice * e**(-self.interestRate * 309 self.daysToExpiration) * norm.cdf(self.d2) 310 put = self.strikePrice * e**(-self.interestRate * 311 self.daysToExpiration) * norm.cdf(-self.d2) - 312 self.underlyingPrice * norm.cdf(-self.d1) 313 return [call, put]
NameError: name 'norm' is not defined
The text was updated successfully, but these errors were encountered:
i am getting the same error. what is the solution?
Sorry, something went wrong.
pip install scipy, then using from scipy.stats import norm in my code solved it for me.
pip install scipy
from scipy.stats import norm
The above did not solve the issue.
No branches or pull requests
``[self.callPrice, self.putPrice] = self._price()
277 else:
--> 278 [self.callPrice, self.putPrice] = self._price()
279 [self.callDelta, self.putDelta] = self._delta()
280 [self.callDelta2, self.putDelta2] = self._delta2()
File c:\program files\python39\lib\site-packages\mibian_init_.py:307, in BS._price(self)
305 raise ZeroDivisionError('The strike price cannot be zero')
306 else:
--> 307 call = self.underlyingPrice * norm.cdf(self.d1) -
308 self.strikePrice * e**(-self.interestRate *
309 self.daysToExpiration) * norm.cdf(self.d2)
310 put = self.strikePrice * e**(-self.interestRate *
311 self.daysToExpiration) * norm.cdf(-self.d2) -
312 self.underlyingPrice * norm.cdf(-self.d1)
313 return [call, put]
NameError: name 'norm' is not defined
The text was updated successfully, but these errors were encountered: