This project implements a Black-Scholes option pricing engine from scratch and provides an interactive dashboard to visualize the Greeks of an option using historical stock data.
-
๐ Pulls historical stock price data using
yfinance -
๐งฎ Calculates 20-day rolling volatility as an input to the pricing model
-
๐ฐ Implements the Black-Scholes formula for European call and put options
-
โ๏ธ Computes option Greeks using finite difference methods:
- Delta
- Gamma
- Theta
- Vega
-
๐ง Includes interactive dashboard widgets to adjust parameters in real time
PythonJupyter Notebookpandas,numpy,scipyyfinanceipywidgetsfor dashboard interactivitymatplotlibfor visualization
-
Download Historical Prices:
- Stock data fetched from Yahoo Finance
- Only
Closeprices used to estimate volatility
-
Estimate Volatility:
- 20-day log return rolling standard deviation
- Annualized using โ252
-
Black-Scholes Pricer:
- Built from scratch (not using
scipy.statspricing shortcuts) - Handles both calls and puts
- Built from scratch (not using
-
Greeks Calculation:
- Approximated using finite difference bumps in inputs
- Change each variable ยฑ0.01 to compute sensitivities
-
Interactive Dashboard:
- Dropdowns and sliders to simulate different market conditions
- Live calculations shown for each Greek
- Deep understanding of how Black-Scholes works
- Hands-on calculation of option prices and Greeks
- Practice with financial data pipelines and interactivity
- Real-time pricing with minute-level data
- Add implied volatility visualization
- Integrate American option logic (e.g., binomial tree)
- Portfolio-level dashboard with multiple strikes