Skip to content

slight formula issue #2

@SubTer

Description

@SubTer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions