Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JerBouma committed Feb 4, 2024
1 parent 90a6530 commit e68c4c8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions financetoolkit/options/options_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,20 +406,20 @@ def get_binomial_model(
- up movement (u) = e^(σ * sqrt(t))
- down movement (d) = 1 / u
- risk neutral probability (p) = (e^((r - q) * t) - d) / (u - d)
- stock price at each node = S * u^j * d^(n - j)
- call option price at expiration date = max(S - K, 0)
- put option price at expiration date = max(K - S, 0)
- risk neutral probability (p) = (e^((r q) * t) d) / (u d)
- stock price at each node = S * u^j * d^(n j)
- call option price at expiration date = max(S K, 0)
- put option price at expiration date = max(K S, 0)
For European Style options:
- call option price at each node = (p * C_u + (1 - p) * C_d) * e^(—r * t)
- put option price at each node = (p * P_u + (1 - p) * P_d) * e^(—r * t)
- call option price at each node = (p * C_u + (1 p) * C_d) * e^(—r * t)
- put option price at each node = (p * P_u + (1 p) * P_d) * e^(—r * t)
For American Style options:
- call option price at each node = max(S - K, (p * C_u + (1 - p) * C_d) * e^(—r * t))
- put option price at each node = max(K - S, (p * P_u + (1 - p) * P_d) * e^(—r * t))
- call option price at each node = max(S K, (p * C_u + (1 p) * C_d) * e^(—r * t))
- put option price at each node = max(K S, (p * P_u + (1 p) * P_d) * e^(—r * t))
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
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
Expand Down Expand Up @@ -615,7 +615,7 @@ def get_stock_price_simulation(
- up movement (u) = e^(σ * sqrt(t))
- down movement (d) = 1 / u
- stock price at each node = S * u^j * d^(n - j)
- stock price at each node = S * u^j * d^(n j)
Where S is the stock price, r is the risk free rate, σ is the volatility, t is the time to
expiration, j is the number of up movements, n is the number of time steps.
Expand Down

0 comments on commit e68c4c8

Please sign in to comment.