Two-leg rebased relative-value with z-scored ratio + ±σ bands.

Two legs rebased against each other with a z-scored ratio and ±σ bands. The z-score is only meaningful while the relationship holds, which is the part most pair trades get wrong.
Reach for itRelative-value work, and before assuming a spread is "stretched".
Two-leg rebased relative-value with z-scored ratio + ±σ bands.
Open itAdd Panel ▸ Charts ▸ Pair Spread (z-score, mean-reversion)
Both symbols start at 100 at the window's left edge. The chart shows their relative performance over time. Diverging lines = relative-value opportunity (if you believe in mean-reversion).
Bottom strip: log(leg_a / leg_b) z-scored over the rolling window. ±1σ bands. ±2σ = trade entry zone for mean-reverting pairs; ±3σ = extreme; either pair-trade entry or regime break.
Top-right: Engle-Granger cointegration test statistic + p-value. Cointegrated pair = stationary ratio = mean-reverting trade has statistical basis. Not cointegrated = "pair trade" is just two random walks.
Long the cheap leg + short the expensive leg, sized to dollar-neutral. Exit when the z-score returns to the mean (~0). Stop if z extends past 3.5σ — that's regime break, not mean reversion.