[{"data":1,"prerenderedAt":40},["ShallowReactive",2],{"strategy-w13":3},{"id":4,"name":5,"family":6,"tags":7,"universe":10,"bars":11,"rules":12,"sizing":13,"cadence":11,"original":14,"testable":22,"not_testable_reason":23,"prompt":24,"deviation":25,"source_file":26,"prompt_note":27,"collection":28,"collection_name":29,"bars_label":30,"universe_short":31,"rule_short":12,"links":32,"verdict":39,"result":25,"chart":25},"W13","Pairs Ratio Z Score","Pairs trading",[8,9],"Mean reversion","Market neutral","KO and PEP","daily","Z-score of log(KO) minus log(PEP) over 60 days: above +2 short KO and buy PEP, below -2 the reverse; close when the z-score is back inside 0.5.","50% long / 50% short",{"total_return":15,"cagr":16,"sharpe":17,"max_dd":18,"win_rate":19,"profit_factor":20,"span":21},48.83,1.54,-0.05,-23.57,49.1,1.14,"2000-2025",false,"A pairs trade needs both prices in one decision. An Orbital strategy decides each symbol on its own bars.","Trade KO and PEP on daily bars, each stock on its own. Each day, measure its 60-day z-score: how many standard deviations the close is above or below its 60-day average. Short a stock with 50% of equity when its z-score is above +2, and buy it with 50% of equity when its z-score is below -2. Cover a short when the z-score falls back below +0.5, and sell a long when it rises back above -0.5. Long and short; use a margin account for the shorts. Backtest the last 10 years with $100,000.",null,"example_weights_13_pairs_ratio_zscore.py","Closest Orbital version: a pairs trade needs both prices in one decision, so each stock trades its own 60-day z-score instead of the spread between them. That makes it single-stock mean reversion, long and short, and no longer market neutral.","retest","The viral 50, re-tested","Daily","KO / PEP",[33,36],[34,35],"Source code","https://github.com/QuantJourneyOrg/quantjourney-bt/blob/main/strategies/example_weights_13_pairs_ratio_zscore.py",[37,38],"Original results","https://backtester.quantjourney.cloud/strategies/example-weights-13-pairs-ratio-zscore","skip",1794261303665]