QQQ ⇄ NQ Arbitrage Backtester

Rolling-OLS spread · z-score mean reversion · deviation from equilibrium → short the rich leg, long the cheap leg ← rjllanes.com

Data

Signal

Execution & Costs

Prices ■ QQQ  ■ NQ  (normalized = 100 at window start)

Spread Z-score deviation from rolling equilibrium · ▲ long spread  ▼ short spread  ● exit

Equity Curve mark-to-market, net of costs

#SideEntryExitBars Z inZ outReasonFut P&LHedge P&LCostsNet
Net P&L ($) for every lookback × entry-Z combo, all other settings as configured. Click a cell to load those parameters.
Run a backtest first.
on tradingview.com: NQ1! ↗ NQ ÷ QQQ ratio ↗
Live TradingView chart. TradingView's free embed doesn't license CME futures or spread symbols, so NQ1! and the NQ÷QQQ ratio open on tradingview.com (the ratio is the raw equilibrium — when it stretches away from its recent range, that's the same deviation the z-score measures). US100 is a CFD that tracks NQ nearly 1:1.
Read this: this is statistical arbitrage, not riskless arbitrage — the spread mean-reverts on average, it is not pinned. The bundled NQ series is Yahoo's unadjusted front-month continuous (NQ=F), so quarterly roll gaps (Mar/Jun/Sep/Dec) appear as artificial spread jumps; check the Data Quality tab and treat trades flagged near rolls as suspect. For serious validation, export clean bars from your broker and upload them. Past performance ≠ future results. Result charts powered by TradingView Lightweight Charts™; live chart by TradingView.