Skip to content

Lexian-6/volatility_surface_trader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Volatility Surface Trader

Replay-based volatility surface trading simulator with real-data replay and a synthetic fallback. Built to explore OTM-only IV dislocation strategies, edge detection, and portfolio risk management.

Dashboard

Demo (GIF may take a few seconds to load)

Demo

Highlights

  • Real vs Simulation mode (real snapshots from IBKR, synthetic fallback)
  • OTM-only smile view and edge logic (no ITM edge counting)
  • Model IV fit with spline smoothing control
  • Options chain with layout learned from Akuna Options 101&201 courses and strike-level T Pos
  • MTM toggle: Mid vs Bid/Ask liquidation PnL
  • Delta hedge suggestion + one-click hedge

Project Status

This is an active research prototype. It is not production-ready and profitability is not proven. Historical IBKR option bars do not include bid/ask size, so depth is assumed unlimited in replay.

WIP / Roadmap

  • Stream live IBKR data to capture real bid/ask sizes
  • Expand backtests to multi-month windows for robustness
  • Improve surface fitting and edge calibration (SVI/Heston overlay)
  • Add risk controls and exposure limits for automated play

Quick Start

cd vol_surface_trader
./venv/Scripts/python.exe dashboard/app.py

Then open: http://127.0.0.1:8050

Real-Data Workflow (IBKR)

  1. Collect historical option bars and underlying TRADES:
../ib_chain_collector/collect_history.py --symbol SPY --expiry-mode third_friday --months 5 --strike-min 600 --strike-max 800 --strike-step 10 --days 3 --bar-size "5 mins" --port 7496
  1. Merge bars into replay snapshots:
../ib_chain_collector/merge_history.py --input ..\ib_chain_collector\output\SPY\<RUN_DIR> --output data\chains
  1. In the dashboard, choose Real and select the symbol from the dropdown.

Strategy View (OTM Dislocation)

  • Left wing (K < spot): use OTM put bid/ask IV
  • Right wing (K > spot): use OTM call bid/ask IV
  • ATM: pick tighter spread
  • Model IV fitted to the same OTM rule; edges are model IV vs OTM bid/ask

Notes

  • Greeks are computed per-option using IV inferred from the chain.
  • MTM "Bid/Ask" is a liquidation view (bid for longs, ask for shorts).
  • Heston calibration is optional future work; spline/SVI are sufficient for baseline fitting.

Repository Layout

  • vol_surface_trader/ core app and dashboard
  • ib_chain_collector/ IBKR historical data collector and merger

Disclaimer

This project is for research and learning only. It does not constitute financial advice.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages