# Dynamic VXX Regime Strategy Stack

**Maintainer preference (2026-05):** use this as the **canonical VXX book** for research, reporting, and future portfolio wiring — not the legacy two-sleeve `vxx_bear` + `vxx_long` merge alone, and **not** the sum of standalone sleeve return percentages.

## Name

**Dynamic VXX Regime Strategy Stack** — six regime-mapped VXX option structures, combined on one account.

## Combination rule: Approach B (stack full daily PnL)

On a shared calendar, for each session `t`:

\[
\Delta E_{\text{stack}}(t) = \sum_{i=1}^{6} \Delta E_i(t)
\]

\[
E_{\text{stack}}(t) = E_0 + \sum_{\tau \le t} \Delta E_{\text{stack}}(\tau)
\]

- **\(E_0\)** = account capital (default **$100,000**).
- **\(\Delta E_i(t)\)** = `daily_pnl_mtm_usd` from sleeve *i*’s backtest, each run at **full sleeve sizing** ($3k risk budget per trade on VX3/VX1 paths; bear-call contango uses its engine sizing).
- Sleeves may be **open on the same day** (steep-contango structures overlap). Approach B **does not** divide capital by six; it **sums** dollar PnL. Treat headline return as a **research stack**, not a 1×-margin live book unless sizing is retuned.

**Do not** report \(\sum_i \text{return\_pct}_i\) as portfolio return (that double-counts notional and matches Approach B only by coincidence when all sleeves use the same \(E_0\)).

### Reference metrics (2016-01-04 → 2026-05-22, $100k, artifacts below)

| Metric | Stack (Approach B) |
|--------|---------------------|
| Total return | **+104.0%** |
| Ending equity | **~$204,000** |
| Daily Sharpe (MTM) | **~1.22** |
| MTM max drawdown | **~−9.8%** |

Per-sleeve standalone returns (same window): IC tight +34.5%, mild bear put +29.0%, short call +22.2%, sweet long put +8.0%, steep bear call +8.8%, VIX3M bear call +1.6%.

## Sleeves (regime map)

| Regime | Strategy | Backtest source |
|--------|----------|-----------------|
| R4/R5 steep VX3 | Iron condor (tight) | `backtest_vxx_vx1_vx3_strategies.py` |
| R4/R5 steep VX3 | Short OTM call | same |
| R4/R5 steep VX3 | Bear call credit | same |
| R2 mild VX3 | Bear put credit | same |
| R3 sweet spot (M1→M2 roll) | Long put OTM (−3%) | `backtest_vxx_long_put_roll_carry.py` |
| R1/R2 contango (VIX3M) | Bear call contango | `backtest_vxx_bear_call_contango.py` |

Signals and thresholds: `analyze_vxx_forward_returns.py`, regime notes in prior research.

## Tooling

| Purpose | Script |
|---------|--------|
| Run sleeves + build stack | `RenTech/strategy_stack/run_vxx_regime_mtm_report.py` |
| VX3/VX1 builder + daily MTM | `RenTech/strategy_stack/backtest_vxx_vx1_vx3_strategies.py` (`daily_mtm_records` on `run_one_spec`) |
| Forward-return / regime stats | `RenTech/strategy_stack/analyze_vxx_forward_returns.py` |

### Canonical outputs

After a full run with `--out-prefix RenTech/data/logs/vxx_regime_mtm_2016_2026`:

| File | Content |
|------|---------|
| `{prefix}_dynamic_vxx_regime_stack_daily_mtm.csv` | **Combined book** — `date`, per-sleeve `pnl_*`, `pnl_stack`, `equity_mtm_usd` |
| `{prefix}_dynamic_vxx_regime_stack_meta.json` | Headline metrics + combine_mode |
| `{prefix}_REGIME_MTM_SUMMARY.csv` | Per-sleeve table |
| `{prefix}_<sleeve>_daily_mtm.csv` | Individual sleeve daily MTM |

## Commands

```bash
cd /Users/robzingale/trading_bot
.venv/bin/python RenTech/data_pipeline/download_cboe_vix_futures.py
PYTHONUNBUFFERED=1 .venv/bin/python RenTech/strategy_stack/analyze_vxx_forward_returns.py \
  --start 2016-01-01 --end 2026-12-31 \
  --forward-days 5 10 20 40 --ma-window 60 \
  --grid-roll 0.05 0.07 0.09 0.11 \
  --grid-elev 0.0 0.02 0.05 0.08 \
  --out-csv RenTech/data/logs/vxx_fwd_return_analysis_2016-01-01_2026-12-31.csv
PYTHONUNBUFFERED=1 .venv/bin/python RenTech/strategy_stack/run_vxx_regime_mtm_report.py \
  --start 2016-01-01 --end 2026-12-31 \
  --capital 100000 --risk-budget 3000 \
  --preload-chains \
  --out-prefix RenTech/data/logs/vxx_regime_mtm_2016_2026
```

Rebuild stack only from existing sleeve CSVs (no chain preload):

```bash
cd /Users/robzingale/trading_bot && PYTHONUNBUFFERED=1 .venv/bin/python RenTech/strategy_stack/run_vxx_regime_mtm_report.py \
  --combine-only \
  --out-prefix RenTech/data/logs/vxx_regime_mtm_2016_2026
```

## Relation to `multi_sleeve_default`

- **VRP + lit4 + IV** book: `run_multi_sleeve_portfolio.py` / `multi_sleeve_default_*` (~+208% merged, ~1% capital to legacy VXX sleeves).
- **Dynamic VXX Regime Strategy Stack** is a **separate** VXX research/production target at **Approach B** sizing until explicitly merged into `portfolio_sleeves_default.json` with a defined capital rule.

When the user asks for **VXX portfolio return**, cite **Dynamic VXX Regime Strategy Stack** metrics from `*_dynamic_vxx_regime_stack_meta.json`, not the sum of sleeve return % columns.
