This project provides a Python-based framework for analyzing equity options using the Black-Scholes-Merton model. It leverages live market data from Yahoo Finance to calculate theoretical option prices, visualize implied volatility surfaces, and simulate the profit/loss evolution of holding an option over time.
Real-Time Valuation: Fetches live stock and option chain data to calculate theoretical BSM prices.
Market Comparison: Scans entire option chains to classify options as "undervalued" or "overvalued" compared to current market asks/bids.
Stochastic Simulation: Simulates the life of an option contract using t-distribution price shocks to visualize price paths and P/L evolution.
3D Visualization: Generates Implied Volatility (IV) surfaces by interpolating unstructured strike/expiration data.
Risk-Free Rate Integration: Automatically fetches the current 10-Year U.S. Treasury Yield (^TNX) to use as the risk-free interest rate (
- Stock prices follow a lognormal distribution:
This implies a constant mean and variance. However, we can only estimate these parameters using historical data and these estimates change with time and thus change each time we measure them. We cannot capture their true values. This fact is visualised when we observe Implied Volatility surfaces. Under the Black Scholes Model, these surfaces should be flat since volatility is assumed to be constant. The IV surfaces tell a different story about what the market actually thinks of volatility into the future.
-
The derivative is a European option which cannot be exercised before the expiration date. Other mathematical frameworks are needed to price American options such as Binomial Trees.
-
The short selling of securities with full use of proceeds is permitted.
-
There are no transaction costs or taxes. All securities are perfectly divisible.
-
There are no dividends during the life of the derivative.
-
There are no riskless arbitrage opportunities.
-
Security trading is continuous.
-
The risk-free rate of interest,
$r$ , is constant and the same for all maturities.
Hull, J. C. (2021). Options, Futures, and Other Derivatives (11th ed.). Pearson Educational Limited. Copyright.