@@ -406,20 +406,20 @@ def get_binomial_model(
406
406
407
407
- up movement (u) = e^(σ * sqrt(t))
408
408
- down movement (d) = 1 / u
409
- - risk neutral probability (p) = (e^((r - q) * t) - d) / (u - d)
410
- - stock price at each node = S * u^j * d^(n - j)
411
- - call option price at expiration date = max(S - K, 0)
412
- - put option price at expiration date = max(K - S, 0)
409
+ - risk neutral probability (p) = (e^((r — q) * t) — d) / (u — d)
410
+ - stock price at each node = S * u^j * d^(n — j)
411
+ - call option price at expiration date = max(S — K, 0)
412
+ - put option price at expiration date = max(K — S, 0)
413
413
414
414
For European Style options:
415
415
416
- - call option price at each node = (p * C_u + (1 - p) * C_d) * e^(—r * t)
417
- - put option price at each node = (p * P_u + (1 - p) * P_d) * e^(—r * t)
416
+ - call option price at each node = (p * C_u + (1 — p) * C_d) * e^(—r * t)
417
+ - put option price at each node = (p * P_u + (1 — p) * P_d) * e^(—r * t)
418
418
419
419
For American Style options:
420
420
421
- - call option price at each node = max(S - K, (p * C_u + (1 - p) * C_d) * e^(—r * t))
422
- - put option price at each node = max(K - S, (p * P_u + (1 - p) * P_d) * e^(—r * t))
421
+ - call option price at each node = max(S — K, (p * C_u + (1 — p) * C_d) * e^(—r * t))
422
+ - put option price at each node = max(K — S, (p * P_u + (1 — p) * P_d) * e^(—r * t))
423
423
424
424
Where S is the stock price, K is the strike price, r is the risk free rate, σ is the volatility, t is the time to
425
425
expiration, j is the number of up movements, n is the number of time steps, C_u is the call option price at the up
@@ -615,7 +615,7 @@ def get_stock_price_simulation(
615
615
616
616
- up movement (u) = e^(σ * sqrt(t))
617
617
- down movement (d) = 1 / u
618
- - stock price at each node = S * u^j * d^(n - j)
618
+ - stock price at each node = S * u^j * d^(n — j)
619
619
620
620
Where S is the stock price, r is the risk free rate, σ is the volatility, t is the time to
621
621
expiration, j is the number of up movements, n is the number of time steps.
0 commit comments