A sophisticated quantitative finance tool built with Python to model and visualize two critical aspects of options trading: strategy payoffs and market-implied volatility.
-
Options Strategy Payoff Visualizer:
- Dynamically build multi-leg options strategies (e.g., Straddles, Iron Condors, Spreads).
- Generates an interactive 2D Profit/Loss diagram.
- Automatically calculates and displays key metrics: Maximum Profit, Maximum Loss, and Break-Even Point(s).
-
Implied Volatility (IV) Surface Visualizer:
- Fetches the complete options chain for any user-specified stock ticker from live market data.
- Calculates the implied volatility for every contract using the Black-Scholes-Merton model and a numerical root-finding algorithm.
- Renders an interactive 3D surface plot, visualizing the volatility smile/skew across all strikes and expirations.
This project showcases a deep understanding of concepts central to quantitative finance and data science:
- Quantitative Finance: Derivatives pricing (Black-Scholes-Merton), multi-leg P/L calculation, options greeks (implied volatility/vega).
- Numerical Methods: Implementation of a numerical solver (
scipy.optimize.brentq) to find the root of a complex, non-linear equation. - Data Engineering: Fetching, parsing, cleaning, and structuring complex, nested financial data (options chains) into a usable format.
- Advanced Data Visualization: Conveying complex, multi-dimensional financial data in an intuitive and interactive format using Plotly.
- Language: Python
- Data Analysis & Computation: Pandas, NumPy, SciPy
- Data Acquisition: yfinance
- Visualization & UI: Plotly, Streamlit
-
Clone the repository:
git clone https://github.com/dsarkar10/YOUR-REPO-NAME.git cd YOUR-REPO-NAME -
Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
From the project's root directory, run the following command in your terminal:
streamlit run app.py

