Skip to main content
added 3 characters in body
Source Link

Okay i found the problem, my implementation of binomial pricing was wrong.

This python implementation:

T = 10 # Number of periods
S0 = 8 # Starting price of stock
K = 9 # Strike price of option
r = 0.2 # Risk free interest rate
u = 1.5 # Up factor
d = 0.5 # Down factor

C = 0

q = ((1+r) - d) / (u - d)
risk_free = 1 / ((1 + r)**T)

for i in range(0, T+1):
    prob = math.comb(T, i) * (q**i) * (1-q)**(T-i)
    ST = (u**i) * (d**(T-i)) * S0
    max_value = max(ST - K, 0)
    C += max_value * prob

print(C * risk_free)

Outputs: 6.836045774062984

Which is a lot closer to the MC output

Okay i found the problem, my implementation of binomial pricing was wrong.

This python implementation:

T = 10 # Number of periods
S0 = 8 # Starting price of stock
K = 9 # Strike price of option
r = 0.2 # Risk free interest rate
u = 1.5 # Up factor
d = 0.5 # Down factor

C = 0

q = ((1+r) - d) / (u - d)
risk_free = 1 / ((1 + r)**T)

for i in range(0, T+1):
    prob = math.comb(T, i) * (q**i) * (1-q)**(T-i)
    ST = (u**i) * (d**(T-i)) * S0
    max_value = max(ST - K, 0)
    C += max_value * prob

print(C * risk_free)

Outputs: 6.836045774062984

Which a lot closer to the MC output

Okay i found the problem, my implementation of binomial pricing was wrong.

This python implementation:

T = 10 # Number of periods
S0 = 8 # Starting price of stock
K = 9 # Strike price of option
r = 0.2 # Risk free interest rate
u = 1.5 # Up factor
d = 0.5 # Down factor

C = 0

q = ((1+r) - d) / (u - d)
risk_free = 1 / ((1 + r)**T)

for i in range(0, T+1):
    prob = math.comb(T, i) * (q**i) * (1-q)**(T-i)
    ST = (u**i) * (d**(T-i)) * S0
    max_value = max(ST - K, 0)
    C += max_value * prob

print(C * risk_free)

Outputs: 6.836045774062984

Which is a lot closer to the MC output

Source Link

Okay i found the problem, my implementation of binomial pricing was wrong.

This python implementation:

T = 10 # Number of periods
S0 = 8 # Starting price of stock
K = 9 # Strike price of option
r = 0.2 # Risk free interest rate
u = 1.5 # Up factor
d = 0.5 # Down factor

C = 0

q = ((1+r) - d) / (u - d)
risk_free = 1 / ((1 + r)**T)

for i in range(0, T+1):
    prob = math.comb(T, i) * (q**i) * (1-q)**(T-i)
    ST = (u**i) * (d**(T-i)) * S0
    max_value = max(ST - K, 0)
    C += max_value * prob

print(C * risk_free)

Outputs: 6.836045774062984

Which a lot closer to the MC output