How quanttqueensu/ls_gamma works
QUANTT is a research and paper-trading system for regime-dependent SPY options gamma scalping. The paper workflow builds a market snapshot, forecasts realized volatility, derives a VRP signal, selects and manages option positions, and sends orders through an IBKR paper-trading guard. A separate historical workflow builds replay snapshots and runs backtests that produce metrics and reports. The README documents the major strategies and research capabilities; several implementation details are unsampled, so those links are omitted or shown as unverified.
Main entry points: runner.py Daily runner · build.py Snapshot builder · run.py Backtest runner · store.py Snapshot store
Components 22
Market data
- Snapshot builder
src/lsgamma/pipeline/build.py - Option chain
src/lsgamma/pipeline/chain.py - Market features
src/lsgamma/pipeline/features.py - Snapshot store
src/lsgamma/pipeline/store.py - History builder
src/lsgamma/history/build.py
Forecasts and signals
- RV forecasters
src/lsgamma/forecasting - VRP signal
src/lsgamma/signals/vrp_band.py
Paper trading
- Daily runner
src/lsgamma/trading/runner.py - Trade selection
src/lsgamma/trading/selection.py - Exit rules
src/lsgamma/trading/exits.py - P&L calculation
src/lsgamma/trading/pnl.py - Trade ledger
src/lsgamma/trading/ledger.py
Backtests and research
- Backtest engine
src/lsgamma/backtest/engine.py - Backtest config
src/lsgamma/backtest/config.py - Backtest runner
src/lsgamma/backtest/run.py - Metrics and reports
src/lsgamma/backtest/report.py - Experiment log
src/lsgamma/experiments.py
Option strategies
- Delta hedging
src/lsgamma/core/Algos/Hedging - Option strategies
src/lsgamma/core/Algos - IBKR paper broker
src/lsgamma/core/Algos/broker.py
Other components
- Market sources
- Historical data
Connections 27
- Market sources → Snapshot builder: supplies data
- Snapshot builder → Option chain: builds chain
- Snapshot builder → Market features: builds features
- Snapshot builder → Snapshot store: stores snapshot
- Historical data → History builder: replays trades
src/lsgamma/history/build.py - History builder → Market features: uses features
src/lsgamma/history/build.py - History builder → Snapshot store: writes snapshots
src/lsgamma/history/build.py - Daily runner → Snapshot builder: runs pipeline
src/lsgamma/trading/runner.py - Daily runner → Snapshot store: reads snapshot
src/lsgamma/trading/runner.py - Daily runner → RV forecasters: forecasts volatility
src/lsgamma/trading/runner.py - Daily runner → VRP signal: computes signal
src/lsgamma/trading/runner.py - Daily runner → Trade selection: selects contracts
src/lsgamma/trading/runner.py - Daily runner → Exit rules: checks exits
src/lsgamma/trading/runner.py - Exit rules → P&L calculation: uses P&L
src/lsgamma/trading/exits.py - Daily runner → P&L calculation: calculates P&L
src/lsgamma/trading/runner.py - Daily runner → Trade ledger: records trades
src/lsgamma/trading/runner.py - Daily runner → Delta hedging: requests hedges
src/lsgamma/trading/runner.py - Daily runner → Option strategies: executes positions
src/lsgamma/trading/runner.py - Option strategies → IBKR paper broker: submits orders
src/lsgamma/core/Algos/Hedging/portfolio.py - Delta hedging → IBKR paper broker: submits stock orders
src/lsgamma/core/Algos/broker.py - Backtest config → Experiment log: loads experiment config
src/lsgamma/backtest/config.py - Backtest runner → Backtest engine: runs simulation
src/lsgamma/backtest/run.py - Backtest runner → Backtest config: loads settings
src/lsgamma/backtest/run.py - Backtest engine → Snapshot store: reads snapshots
src/lsgamma/backtest/engine.py - Backtest runner → Metrics and reports: summarizes results
src/lsgamma/backtest/run.py - Metrics and reports → Backtest engine: reports runs
src/lsgamma/backtest/report.py - Backtest runner → Experiment log: saves trials
src/lsgamma/backtest/run.py