shouldn't you using historical volatility, not implied volatility?
looking further at the source code. if
looking further at the source code. if
volatility == 0
, the if volatility:
will be False and the rest of the block will not be executed and the greeks will be None. However if you look at internal methods like _delta()
, _delta2()
etc., some of them have if self.volatility == 0 or self.daysToExpiration == 0
. So there is problem - there is special handling of case when volatility == 0, yet, it never get executed.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs