01 / PROBLEM STATEMENT
Why this work exists
Closed-form option prices become more useful when their assumptions, sensitivities, implied volatility, and payoff behavior can be inspected interactively.
Data and source material
- User-supplied spot, strike, maturity, rate, volatility, and observed option price
- Optional Yahoo Finance spot and ^TNX rate-proxy lookups
- Generated spot/volatility grids for sensitivity analysis
02 / SOLUTION OVERVIEW
From input to usable output
A numerical engine isolated from an interactive dashboard, with reference validation and bounded implied-volatility solving.
- 01
Validate numerical inputs
- 02
Calculate d1 and d2
- 03
Price European calls and puts
- 04
Compute Delta, Gamma, Theta, Vega, and Rho
- 05
Solve implied volatility with Brent root finding and render sensitivity surfaces
03 / TECHNICAL ARCHITECTURE
Implemented components
engine.py owns numerical methods; app.py owns inputs, helpers and Plotly views
04 / METHODOLOGY & IMPLEMENTATION
Decisions that shape the system
- The numerical engine is isolated from the Streamlit interface for independent testing.
- Implied volatility is the bounded root where model price matches the observed price.
- Heatmaps and three-dimensional surfaces expose nonlinear sensitivity rather than presenting a single price as sufficient evidence.
Implemented capabilities
- Call and put valuation
- Five Greeks
- Brent implied-volatility solver
- 2D price and 3D Greek surfaces
- Payoff views
04B / MODEL
Mathematical specification
d₁ = [ln(S/K) + (r + σ²/2)T] / (σ√T)d₂ = d₁ − σ√TCall = S·N(d₁) − K·e^(−rT)·N(d₂)Put = K·e^(−rT)·N(−d₂) − S·N(−d₁)05 / RESULTS & EVIDENCE
What the source supports
- For S=100, K=100, T=1, r=5%, and σ=20%, the documented call value is 10.4506 and put value is 5.5735.
- The dashboard implements five Greeks, payoff views, value grids, and implied-volatility solving.
Results preserve the repository’s units, evaluation framing, and stated limitations. Missing evidence is not converted into a claim.
06 / CHALLENGES & LIMITATIONS
Where the evidence stops
- The model assumes European exercise, no dividends, constant volatility and rate, lognormal dynamics, continuous trading, and frictionless markets.
- It does not model smiles, early exercise, discrete hedging, transaction costs, or microstructure.
- ^TNX is a convenience proxy rather than a maturity-matched curve.
07 / WHAT THIS DEMONSTRATES
Engineering signal
Translating mathematical finance into a testable numerical engine and an interface that makes assumptions and sensitivities visible.
08 / SOURCE & RELATED WORK
Trace the evidence
23e6e9cf94c586a9b7db63e6ea3d43030e6f3787 ↗README.md · engine.py · app.py