Skip to content
New issue

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

slight formula issue #2

Open
SubTer opened this issue Jan 8, 2020 · 0 comments
Open

slight formula issue #2

SubTer opened this issue Jan 8, 2020 · 0 comments

Comments

@SubTer
Copy link

SubTer commented Jan 8, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant