Back to Home

Theory & Documentation

Option Pricing Theory & Methods

This application implements three fundamental approaches to option pricing: the Black-Scholes analytical model for European options and two numerical lattice methods (Binomial and Trinomial trees) that can handle both European and American-style options.

All models assume a frictionless market with no dividends (q=0q = 0), constant volatility σ\sigma, and constant risk-free rate rr.

1. Black-Scholes-Merton Model

The Black-Scholes-Merton model (1973) provides closed-form analytical solutions for European options. Under the assumption of geometric Brownian motion for the underlying asset, the option prices are given by:

European Call Option Price:

C(S0,t)=S0N(d1)KerTN(d2)C(S_0, t) = S_0 \mathcal{N}(d_1) - K e^{-rT} \mathcal{N}(d_2)

European Put Option Price:

P(S0,t)=KerTN(d2)S0N(d1)P(S_0, t) = K e^{-rT} \mathcal{N}(-d_2) - S_0 \mathcal{N}(-d_1)

Where the auxiliary variables are:

d1=ln(S0/K)+(r+σ2/2)TσTd_1 = \frac{\ln(S_0/K) + (r + \sigma^2/2)T}{\sigma\sqrt{T}}
d2=d1σT=ln(S0/K)+(rσ2/2)TσTd_2 = d_1 - \sigma\sqrt{T} = \frac{\ln(S_0/K) + (r - \sigma^2/2)T}{\sigma\sqrt{T}}

Parameters:

S0S_0 :Current stock price
KK :Strike price
TT :Time to maturity (years)
rr :Risk-free interest rate
σ\sigma :Volatility (annualized)
N()\mathcal{N}(\cdot) :Cumulative standard normal distribution function

Note: The Black-Scholes model assumes continuous trading, no transaction costs, constant volatility, and log-normal distribution of stock prices. It is exact only for European options.

2. The Greeks - Risk Sensitivities

The Greeks quantify how option prices change with respect to various market parameters. These are partial derivatives of the option price and are essential for risk management and hedging strategies.

Delta (Δ) - Rate of Change w.r.t. Underlying Price

Δ=VS=N(d1)(for calls)\Delta = \frac{\partial V}{\partial S} = \mathcal{N}(d_1) \quad \text{(for calls)}

Delta represents the sensitivity of the option price to changes in the underlying asset price. It ranges from 0 to 1 for calls and -1 to 0 for puts. Delta is also the hedge ratio.

Gamma (Γ) - Rate of Change of Delta

Γ=2VS2=n(d1)S0σT\Gamma = \frac{\partial^2 V}{\partial S^2} = \frac{n(d_1)}{S_0 \sigma \sqrt{T}}

Where n()n(\cdot) is the standard normal probability density function:

n(x)=12πex2/2n(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2}

Gamma measures the convexity of the option's value. High gamma means delta changes rapidly, requiring frequent rehedging.

Theta (Θ) - Time Decay

Θ=Vt=S0n(d1)σ2TrKerTN(d2)\Theta = \frac{\partial V}{\partial t} = -\frac{S_0 n(d_1) \sigma}{2\sqrt{T}} - rKe^{-rT}\mathcal{N}(d_2)

Theta measures the rate of decline in option value as time passes (time decay). Expressed per day by dividing by 365. Most options experience negative theta, especially near expiration.

Vega (ν) - Volatility Sensitivity

ν=Vσ=S0n(d1)T\nu = \frac{\partial V}{\partial \sigma} = S_0 n(d_1) \sqrt{T}

Vega measures sensitivity to changes in implied volatility. Expressed per 1% change in volatility (divided by 100). Options are most sensitive to volatility when at-the-money.

Rho (ρ) - Interest Rate Sensitivity

ρ=Vr=KTerTN(d2)\rho = \frac{\partial V}{\partial r} = KT e^{-rT} \mathcal{N}(d_2)

Rho measures sensitivity to changes in the risk-free interest rate. Expressed per 1% change in rates (divided by 100). Less significant for short-dated options.

3. Binomial Tree Model (Cox-Ross-Rubinstein)

The Cox-Ross-Rubinstein (CRR) binomial tree model (1979) is a discrete-time method that models stock price evolution as a recombining tree. It can price both European and American options and converges to the Black-Scholes price as the number of steps increases.

Model Parameters:

Time step:

Δt=TN\Delta t = \frac{T}{N}

Up factor:

u=eσΔtu = e^{\sigma\sqrt{\Delta t}}

Down factor:

d=1u=eσΔtd = \frac{1}{u} = e^{-\sigma\sqrt{\Delta t}}

Risk-neutral probability:

p=erΔtdudp = \frac{e^{r\Delta t} - d}{u - d}

Discount factor:

disc=erΔt\text{disc} = e^{-r\Delta t}

Algorithm: Backward Induction

  1. Initialize: Set Δt=T/N\Delta t = T/N, compute uu, dd, and pp
  2. Build Terminal Nodes: At maturity (step NN), calculate stock prices for all N+1N+1 nodes:
    SN,j=S0ujdNj,j=0,1,,NS_{N,j} = S_0 \cdot u^j \cdot d^{N-j}, \quad j = 0, 1, \ldots, N
  3. Terminal Payoffs: Compute option values at maturity:
    VN,j=max(SN,jK,0)(Call)V_{N,j} = \max(S_{N,j} - K, 0) \quad \text{(Call)}
    VN,j=max(KSN,j,0)(Put)V_{N,j} = \max(K - S_{N,j}, 0) \quad \text{(Put)}
  4. Backward Recursion: For each step i=N1,N2,,0i = N-1, N-2, \ldots, 0 and node jj:
    Vi,j=erΔt[pVi+1,j+1+(1p)Vi+1,j]V_{i,j} = e^{-r\Delta t} \left[ p \cdot V_{i+1,j+1} + (1-p) \cdot V_{i+1,j} \right]
  5. American Exercise (Optional): For American options, at each node check early exercise:
    Si,j=S0ujdijS_{i,j} = S_0 \cdot u^j \cdot d^{i-j}
    Vi,jAmerican=max(Vi,jEuropean,  Intrinsic Value)V_{i,j}^{\text{American}} = \max\left(V_{i,j}^{\text{European}}, \; \text{Intrinsic Value}\right)
  6. Result: Option price is V0,0V_{0,0} at the root node

Key Properties: The binomial tree is recombining (up-then-down = down-then-up), has N+1N+1 nodes at each time step, and converges to Black-Scholes at rate O(1/N)O(1/\sqrt{N}) for European options.

4. Trinomial Tree Model (Boyle)

The Boyle (1988) trinomial tree extends the binomial model by adding a middle branch where the stock price remains unchanged. This provides better convergence properties and more flexibility in modeling.

Model Parameters (Boyle Parameterization):

Time step:

Δt=TN\Delta t = \frac{T}{N}

Up factor:

u=eσ2Δtu = e^{\sigma\sqrt{2\Delta t}}

Down factor:

d=1u=eσ2Δtd = \frac{1}{u} = e^{-\sigma\sqrt{2\Delta t}}

Middle factor:

m=1(no change)m = 1 \quad \text{(no change)}

Risk-Neutral Probabilities:

Auxiliary variables:

a=erΔt/2,b=eσΔt/2a = e^{r\Delta t / 2}, \quad b = e^{\sigma\sqrt{\Delta t/2}}

Probability of up move:

pu=[ab1bb1]2p_u = \left[\frac{a - b^{-1}}{b - b^{-1}}\right]^2

Probability of down move:

pd=[babb1]2p_d = \left[\frac{b - a}{b - b^{-1}}\right]^2

Probability of middle move:

pm=1pupdp_m = 1 - p_u - p_d

Algorithm: Trinomial Backward Induction

  1. Initialize: Set Δt=T/N\Delta t = T/N, compute uu, dd, pup_u, pdp_d, and pmp_m
  2. Build Terminal Nodes: At maturity, trinomial tree has 2N+12N+1 nodes representing j{N,,N}j \in \{-N, \ldots, N\} net up moves:
    SN,j=S0umax(j,0)dmax(j,0)S_{N,j} = S_0 \cdot u^{\max(j,0)} \cdot d^{\max(-j,0)}
  3. Terminal Payoffs:
    VN,j=max(SN,jK,0)(Call)V_{N,j} = \max(S_{N,j} - K, 0) \quad \text{(Call)}
    VN,j=max(KSN,j,0)(Put)V_{N,j} = \max(K - S_{N,j}, 0) \quad \text{(Put)}
  4. Backward Recursion: For each step i=N1,,0i = N-1, \ldots, 0 with 2i+12i+1 nodes:
    Vi,j=erΔt[puVi+1,j+1+pmVi+1,j+pdVi+1,j1]V_{i,j} = e^{-r\Delta t} \left[ p_u \cdot V_{i+1,j+1} + p_m \cdot V_{i+1,j} + p_d \cdot V_{i+1,j-1} \right]
  5. American Exercise (Optional): At each node, compare with intrinsic value:
    Vi,jAmerican=max(Vi,jEuropean,  Intrinsic Value)V_{i,j}^{\text{American}} = \max\left(V_{i,j}^{\text{European}}, \; \text{Intrinsic Value}\right)
  6. Result: Option price is V0,0V_{0,0} at the root

Advantages: Trinomial trees typically exhibit smoother convergence than binomial trees and can better model path-dependent options. The additional middle branch provides more accurate probability matching.

5. Convergence Analysis

As the number of time steps NN increases, both tree models converge to the continuous-time Black-Scholes price for European options. Understanding convergence behavior is crucial for selecting appropriate NN values.

Convergence Algorithm:

  1. Define step range: Select NminN_{\min} and NmaxN_{\max} (e.g., 1 to 100)
  2. Compute Black-Scholes benchmark: Calculate exact European option price VBSV_{\text{BS}}
  3. Iterate over steps: For each N[Nmin,Nmax]N \in [N_{\min}, N_{\max}]:

    a) Run binomial tree with NN steps → Vbinom(N)V_{\text{binom}}(N)

    b) Run trinomial tree with NN steps → Vtrinom(N)V_{\text{trinom}}(N)

  4. Compute errors: Calculate absolute errors:
    ϵbinom(N)=Vbinom(N)VBS\epsilon_{\text{binom}}(N) = |V_{\text{binom}}(N) - V_{\text{BS}}|
    ϵtrinom(N)=Vtrinom(N)VBS\epsilon_{\text{trinom}}(N) = |V_{\text{trinom}}(N) - V_{\text{BS}}|
  5. Visualize: Plot V(N)V(N) vs NN with Black-Scholes reference line

Convergence Properties:

  • Rate of Convergence:

    • Binomial tree: O(1/N)O(1/\sqrt{N}) for European options

    • Trinomial tree: Generally O(1/N)O(1/N), faster convergence

  • Oscillatory Behavior: Tree prices oscillate around the Black-Scholes value due to discrete time approximation. Oscillations dampen as NN \to \infty.
  • Even/Odd Effect: Some tree models exhibit different convergence patterns for even vs. odd NN when S0=KS_0 = K (at-the-money).
  • Practical Considerations:

    N=50100N = 50-100: Good balance of accuracy and speed

    N>500N > 500: Diminishing returns, increased computation

    • For American options: Higher NN often needed near exercise boundary

Richardson Extrapolation: To improve convergence, advanced techniques like Richardson extrapolation can be applied: Combine results from NN and 2N2N steps to achieve O(1/N2)O(1/N^2) convergence.

6. Model Validation Tests

The application performs comprehensive validation tests to ensure numerical accuracy and theoretical consistency of the implemented models.

1. Put-Call Parity (European Options):

CP=S0KerTC - P = S_0 - K e^{-rT}

Verifies the fundamental no-arbitrage relationship between European call and put prices with the same strike and maturity. Any deviation indicates pricing errors.

2. American Early Exercise Premium:

VAmericanVEuropeanV_{\text{American}} \geq V_{\text{European}}

American options must be worth at least as much as their European counterparts due to the early exercise feature. Violations suggest algorithmic errors.

3. Tree-BS Convergence:

limNVtree(N)=VBS\lim_{N \to \infty} V_{\text{tree}}(N) = V_{\text{BS}}

For European options, tree model prices should converge to the Black-Scholes analytical solution as the number of steps increases. Typical tolerance: <0.01< 0.01 for N100N \geq 100.

4. Boundary Conditions:

C(S0,T)max(S0KerT,0)C(S_0, T) \geq \max(S_0 - Ke^{-rT}, 0)
P(S0,T)max(KerTS0,0)P(S_0, T) \geq \max(Ke^{-rT} - S_0, 0)

Option prices must satisfy lower bounds to prevent arbitrage. Calls and puts must be worth at least their intrinsic values.

5. Probability Validity:

0p,pu,pm,pd1andpu+pm+pd=10 \leq p, p_u, p_m, p_d \leq 1 \quad \text{and} \quad p_u + p_m + p_d = 1

Risk-neutral probabilities must be valid (non-negative and sum to 1). Violations may occur for extreme parameter combinations.

7. Implementation & Technology Stack

Backend

  • • Python 3.10+
  • • FastAPI for REST API
  • • NumPy for vectorized computations
  • • SciPy for statistical functions

Frontend

  • • Next.js 14 with TypeScript
  • • Tailwind CSS for styling
  • • Plotly.js for charts
  • • KaTeX for LaTeX rendering

Key Assumptions:

  • • No dividends (q=0q = 0)
  • • Constant volatility σ\sigma
  • • Constant risk-free rate rr
  • • Frictionless markets (no transaction costs)
  • • Continuous trading (for Black-Scholes)
  • • Log-normal distribution of stock prices

Performance Optimizations:

  • • NumPy vectorization for terminal payoffs
  • • Efficient backward induction (no redundant calculations)
  • • Sparse convergence sampling for large N
  • • Client-side caching of results

Ready to Apply the Theory?

Use our interactive calculator to price options with your own parameters and visualize convergence behavior

Launch Pricing Calculator →