# Black-Scholes for Binary Option

Something is wrong with this python code designed to apply Black Scholes to the price of a binary option (all or nothing, 0 or 100 payout).

The results I get here is 0.4512780109614. Which I know is wrong, can anyone point me to the error in the formula?

S = 110 #current_price
K = 100 #ATM strike
v = 1.20 #annualized volatility
r = 0.00 #interest rate
T =  0.44 #days remaining (annualized)

from scipy.stats import norm
from math import exp, log, sqrt

d2 = (log(S/K) + (r - 0.5 * v**2) * T) / v*sqrt(T)
print exp(-r * T) * norm.cdf(d2)
> 0.451278010961


You are missing brackets around v*sqrt(T). That is, d2 should be
 d2 = (log(S/K) + (r - 0.5 * v**2) * T) / (v*sqrt(T))

Then you should get 0.390..., which is the correct answer.