-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Think you need to tweak d1 part of your formula:
currently it reads as,
define two functions, d1 and d2 in Black-Scholes model
def d1(S,K,T,r,sigma):
return(log(S/K)+(r+sigma**2/2.)T)/sigmasqrt(T)
which will produce incorrect outcome for it, you need extra bracket, should read as:
def d1(S,K,T,r,sigma):
return(log(S/K)+(r+((sigma**2)/2))T)/(sigmasqrt(T))
otherwise great write up on blacksholes python model.
voyager0003
Metadata
Metadata
Assignees
Labels
No labels