the formula for d1 should be: `def d1(S,K,T,r,sigma): return((log(S/K)+(r+0.5*sigma**2)*T))/(sigma*sqrt(T))`