← Experiments

VIX Contango Pine VIX/VIX3M EMA50/252 fidelity re-audit

Rejected qm-kdnj.3 · 2026-08-18

Does the Pine-verbatim VIX/VIX3M ratio EMA50 vs EMA252 continuous regime (sell when short EMA > long EMA, buy otherwise via request.security D close and ta.ema SMA-seed) reproduce signal dates tick-for-tick and does the corrected regime predict SPX risk-off beyond B&H on maximal native span?

Pine semantics are now frozen and tick-for-tick correct (SMA-seed EMA, continuous regime, 252-bar warmup). Date-fidelity audit vs prior 4-point ensemble (qm-4bx.15 spot3m_ratio sma10 quantile0.80) shows 31.9% mismatch (1528/4785 dates, prior 12.2% active vs 43.2% active, 75 vs 88 transitions) due to ensemble vs 2-ticker regime, quantile vs EMA crossover, and pandas ewm without SMA seed. On maximal native span 2007-07-17→2026-07-22 (4785 valid of 9215 VIX rows, VIX3M 2006-07-17→2026-07-22), the corrected overlay (SPY long/cash next_close +10bps) underperforms B&H (CAGR 4.24% vs 10.58%, Sharpe 0.44 vs 0.61, vol 10.9% vs 19.8%, forward 21d active 1.28% vs inactive 0.76% diff +52bp) and is stable across subperiods/adjacent EMAs (pre 43.6% post 42.9%, EMA40/200 42.8% EMA60/300 43.5%). Same NO-SHIP as qm-4bx.15 but with correct dates; no promotable alpha.

Research narrative

Generic exit harness

VIX contango continuous regime Pine VIX/VIX3M EMA50>EMA252 (sell when short>long, SMA-seed EMA, 252 warmup) blended with generic defensive via AND (cash if either VIX sell or generic defensive) — each head-to-head generic-only vs signal+generic on same window/costs/lag via BacktestConfig.allocatesmartly() next_close 10bps; deltas SMA200 -52.97% (CAGR -4.23% Sharpe -0.22), SMA50 -42.35%, cross -56.87%, trailing -61.62%, BH -66.69% (VIX-only) — window 2007-07-17→2026-07-17 same window/costs/lag next_close +10bps L252 VIX/VIX3M 9215/5032 yahoo

Generic opposite-signal harness (Δ head-to-head)

Window: 2007-07-17→2026-07-17 same window/costs/lag next_close +10bps — same window/costs/lag via BacktestConfig.allocatesmartly() next_close 10bps

GenericGeneric-onlySignal+GenericΔ%ΔCAGRΔSharpe
sma502.22991.2856-42.35%-2.99%-0.24
sma2004.67862.2004-52.97%-4.23%-0.22
cross_50_2004.56271.9677-56.87%-4.70%-0.18
trailing_10pct3.64471.3987-61.62%-5.27%-0.38
bh6.80802.2675-66.69%-6.23%-0.16

VIX contango continuous regime (sell=EMA50>EMA252) blended with generic defensive via AND (cash if either defensive); BH blended equals VIX regime alone; deltas vs generic-only on same window/costs/lag BacktestConfig.allocatesmartly() next_close 10bps, offline yahoo VIX/VIX3M 9215/5032 rows

VIX contango continuous regime Pine VIX/VIX3M EMA50>EMA252 (sell when short>long, SMA-seed EMA, 252 warmup) blended with generic defensive via AND (cash if either VIX sell or generic defensive) — each head-to-head generic-only vs signal+generic on same window/costs/lag via BacktestConfig.allocatesmartly() next_close 10bps; deltas SMA200 -52.97% (CAGR -4.23% Sharpe -0.22), SMA50 -42.35%, cross -56.87%, trailing -61.62%, BH -66.69% (VIX-only) — window 2007-07-17→2026-07-17 same window/costs/lag next_close +10bps L252 VIX/VIX3M 9215/5032 yahoo

Equity vs S&P (aligned, rebased to 1.0)

No signal overlay for this experiment (parameter sweep / search)

Aligned window, both rebased to 1.0 at start — Aligned window, both rebased to 1.0 at start for fair comparison · S&P dashed, experiment solid. X = Date, Y = Equity (rebased to 1.0).

Signal driver & thresholds (x-aligned)

Signal timeline (sparse triggers)

Triggers when overlay takes over base strategy

Signal timeline — triggers shown as verticals on main chart above.

Stats

CAGR0.00%Sharpe0.00%
Sortino0.00%maxDD0.00%

Disposition

Rejected — fidelity fixed (pinned fixture 300-row 50/252 and 6 unit tests pass) but economics negative on full native window; do not promote to risk-off-indicators/v1. Published as qm-kdnj experiment with frozen backtest/vix_contango.py, provenance, and negative result retained.

Follow-on work

Errors & data gaps

VIX3M native starts 2006-07-17; pre-2006 insufficient_history (ratio NaN) — no synthetic invented; bound to overlap (prior OLS __VIX3M_SYNTH__ rejected for fidelity) DB ends 2026-07-17/2026-08-04 ~2-4 weeks stale as of 2026-08-18; offline replay on committed snapshot passes, live update via download_ticker+upsert_ohlcv when needed Yahoo primary, TradingView alternate depth-capped — no deeper daily history via TV WS per qm-4bx.15 probe Continuous regime sell>long strict >; warmup 252 bars treated as buy (not risk-off) per generate_weights

Follow-up

gh issue create --title "Follow-up VIX Contango Pine VIXVIX3M EMA50252 fidelity re-audit" --body "Follow-up to qm-kdnj.3: Does the Pine-verbatim VIX/VIX3M ratio EMA50 vs EMA252 continuous regime (sell w" --label "priority:p2" --label "pipeline:research" --label "agent:ready"
# deep-link