← The library

quants.md

Pairs Ratio Z Score

Fragile

“Market-neutral KO/PEP on a log-ratio z-score”

As tested: KO against PEP: the z-score of the log price ratio over 60 days. Above +2, short KO / long PEP; below −2, the reverse; out when it's back inside ±0.5. Dollar-neutral, half the account a side.

Edge per month-0.20 pts/mopts per month vs T-bills
t-stat-1.6295% range -0.45 to +0.04
Months124Sep 1, 2016 – Dec 3, 2026
CAGR-0.1%SPY 14.5%
Max drawdown-20.3%SPY -33.8%
Last 12 months-11.80 pts12 months, summed

Their backtest vs the rerun

WindowCAGRSharpeMax DDWin rateProfit factor
quants.md2000–2026+1.5%-0.05-23.6%49%1.14
Rerun2016–2026-0.1%-0.43-20.3%——

Their dashboard · Source code · QuantJourney, Apache-2.0. Sharpe is after T-bills in the rerun, after a flat 2% in theirs.

Why fragile

Growth of $1

Pairs Ratio Z ScoreT-bills
20172019202120232025

Log scale. Traded at the next open after each signal, daily rebalance, slippage on every trade.

Year by year

2016
+0.25 pts/mo4
2017
-0.21 pts/mo12
2018
+0.26 pts/mo12
2019
-0.23 pts/mo12
2020
+0.16 pts/mo12
2021
+0.21 pts/mo12
2022
-0.50 pts/mo12
2023
-0.00 pts/mo12
2024
+0.26 pts/mo12
2025
-1.13 pts/mo12
2026
-0.98 pts/mo12