Quantitative risk analysis for an options butterfly spread. Simulates joint SPX–VIX market shocks and reports 1-day 95% Value at Risk (VaR) via Monte Carlo + Black-Scholes repricing.
A reproducible Python risk engine that simulates joint SPX–VIX scenarios via a Gaussian copula with Student-t marginals, re-prices an options butterfly spread using Black-Scholes, and estimates 1-day 95% Value at Risk (VaR) from the simulated PnL distribution.
- Scenario generation: Gaussian copula + Student-t marginals (SPX, VIX)
- Repricing: Black-Scholes calls for a butterfly spread
- Risk metric: 1-day 95% VaR from simulated PnL
notebooks/— analysis notebook(s)src/— reusable Python modules (if extracted later)results/— figures/tables (PnL distribution, VaR summary)assets/cover/— project imagesdocs/— report/notes/slides
- 1-day 95% VaR (PnL): TBD
- 1-day 95% VaR (Return): TBD
- PnL distribution: see results/
-
Data & returns
- Download SPX and VIX daily levels
- Compute log returns for both series
-
Dependence + scenario generation
- Transform marginals to allow heavy tails (Student-t style)
- Couple SPX and VIX with a dependence structure (copula / correlation)
- Generate Monte Carlo scenarios of 1-day shocks
-
Repricing + VaR
- Reprice each option leg under simulated spot & vol shocks
- Aggregate to portfolio value → PnL distribution
- Report VaR as the 5th percentile loss (95% confidence)
- Pricing model: Black-Scholes (European call approximation)
- Risk factors: SPX level and VIX-derived volatility shock (as a proxy)
- Horizon: 1 trading day
- Metric: VaR at 95% confidence (historical calibration + Monte Carlo simulation)
- VIX is a proxy for implied volatility; mapping to option IV is simplified.
- Black-Scholes assumes lognormal dynamics and constant volatility within each scenario.
- Single-day horizon only; extensions could include multi-day simulation and stress testing.
Started as a team project for a Quantitative Risk Management course. I later continued it independently by packaging the work into a reproducible risk engine: cleaning and organizing the codebase, standardizing inputs/parameters for reruns, and adding documentation + repo structure so the full workflow (scenario simulation → repricing → PnL/VaR reporting) is easy to reproduce for portfolio use.
Python · NumPy · pandas · SciPy · statsmodels · yfinance · matplotlib · seaborn
pip install -r requirements.txt- Open the notebook in notebooks/ (recommended), or
- Run the script in src/ (if/when extracted later)
Data is pulled from public sources (via yfinance) unless otherwise noted.
MIT — see LICENSE.