Strategies
PEP/KO Heteroskedastic Filtered-Spread Re-entry
Outcome: Abandoned
PepKoHeteroskedasticSpreadReentry
Outcome Summary
This strategy turned Zhang's Model II filtered-spread Strategy C into a hedged PEP/KO daily pairs trade on split-adjusted (not dividend-adjusted) USEQ prices. It took three iterations, the last of which replaced frozen 1972-75 coefficients with a yearly causal refit. On the full 1992-2024 history it lost 2.74% over 107 baskets, with Sharpe -0.17, profit factor 0.81 and a signal IC of 0.002, and it lost in both the calm and stressed regimes. The backtest-review gate abandoned it before optimization for negative expectancy not explained by costs. That rejects only this platform version, not Zhang's dividend-adjusted results with simulation-selected boundaries.
Hypothesis
The source's distinctive mechanism is re-entry from an extreme filtered spread under heteroskedasticity, rather than immediate fading of an extreme raw return. Preserve the original equity pair instead of substituting a crypto pair. PEP and KO are included in the configured equity universe. The proposal reduces the portfolio's single-instrument and long-only concentration, although it does not fill its options or cross-venue deficits. Corpus concentration was not supplied, so no instrument-specific share is assumed. Historical paper coefficients and returns are not adopted as evidence or current parameters.
no_edge: negative_expectancy (fee-floor check: -0.186% vs the USEQ floor of +0.05%; commission is zero and impact plus borrow total about $370 of a $2,738 loss, so fees are not the cause). With the yearly causal refit fixed, the Research Lead's PEP/KO daily operationalization of Zhang's Strategy C loses on 107 hedged baskets from 1992 to 2024: PF 0.81, Sharpe -0.17, 29% of baskets win, executed-signal IC 0.002 (t=0.05), and it loses in the calm and stressed regimes. QA's concern is borne out on the full history: the thin positive sandbox result does not hold up. Optimization would only tune lower_mult and upper_mult. The baseline signal carries no information and the gross price edge is negative, so a boundary search would mostly fit noise. Scope: this rejects only the platform's daily, split-adjusted (not dividend-adjusted), next-open-fill version with a 756-session yearly refit. It does not test Zhang's paper results on dividend-adjusted prices with simulation-selected boundaries.
Implementation
Zhang Model II (linear mean-reverting drift, state-dependent Gaussian innovation variance) on PEP = gamma*KO + x, filtered by a Gaussian moment filter. Strategy C: long the spread basket (long PEP / short gamma KO) when the normalised filtered deviation crosses back inside +lower_mult from above, short when it crosses back inside -upper_mult from below; exit at equilibrium, renewed divergence, 60-session time stop, 1% basket equity stop or 5% leg stops. Coefficients are re-estimated on the trailing 756 aligned sessions once per calendar year (only while flat) and frozen until the next refit.
Verification Results
State the annual-refit policy explicitly in the description so the analyst knows coefficients roll yearly inside long evaluation segments. If the Research Lead wants a strict single fit per segment, gate the refit on segment start instead.
Coefficients are re-estimated on the trailing 756 sessions on the first flat paired bar of each calendar year. The hypothesis says 'fit on the pre-evaluation training window, then freeze throughout each evaluation segment' (model_fit_policy training_only_then_frozen). The refit is strictly causal: the window ends at the current completed close, and it is calendar-anchored, deferred while a basket is open, and the filter is re-run from the new equilibrium. So there is no look-ahead and no check-20 issue. But a walk-forward evaluation segment that spans 1 January will contain one in-segment refit. The hypothesis also names a 'causal 756-session estimation window' and calls this iteration's change a fix, so I read it as a faithful reading of a causal rolling estimation window, not a different strategy.
Leave it, or ask the Research Lead to add it to the fixed set for contract completeness.
min_leg_price ($10) is a Research-Lead-unlisted fixed guard on entries and refits, and it is not in research_contract.optimization_plan.fixed. Split-adjusted PEP (~$60+) and KO (~$25+) stay above $10 over the USEQ daily history, so in practice it never binds and does not change trades.
No code change needed. The description could state next-open fills explicitly.
Execution timing: the hypothesis text says 'market orders ... at the modeled session close'. On USEQ the platform fills a bar-close decision at the next session's open (next_open_fill is supported, same_close_fill is unsupported). The code submits plain market orders at the decision bar and its rationale expects a next-open fill, which is correct engine behaviour. Both legs go in on the same decision bar and fill together at the next open. This is not a defect, only a note that the hypothesis wording describes an unsupported fill.
None required.
Recovery paths for partially filled or mismatched baskets (the next-bar cancel-and-flatten check and the on_order_canceled/rejected/denied/expired handlers) cover simulated-venue paths that cannot occur for full-fill market orders. They are harmless: _submit_exit_position is guarded by _close_pending, so repeated _close_basket calls do not create duplicate or flipping closes.
The sandbox is a smoke test: 12 baskets (24 legs) over about 141 post-warmup sessions. Average per-leg return was 0.054% of notional, barely above the ~0.05% USEQ spread/impact floor. Impact was 36% of gross PnL, and nearly all profit came from the stressed-vol third (calm and normal regimes were negative). Half-lives are logged at each refit; check those first. If the PEP/KO filtered spread half-life is long relative to the 60-session time stop, Strategy C re-entries will mostly exit on time or on renewed divergence rather than at equilibrium. Prices are split-adjusted but not dividend-adjusted, so the PEP/KO dividend-yield gap adds a slow drift to the price spread that the annual refit only partly absorbs.
Backtest Review
- Sharpe
- -0.17
- Total return
- -2.74%
- Max drawdown
- 3.54%
- Trades
- 214
- Win rate
- 40.7%
- Profit factor
- 0.81
The iteration-2 defect is fixed. The model now refits causally each calendar year on the trailing 756 sessions instead of freezing 1972-75 coefficients.
Accounting is valid, both legs are hedged and fill together (107 long and 107 short legs), and drawdown is small (3.5% vs the 12% contract).
Trading starts in 1992. Before that the min_leg_price $10 guard blocks entries, because split-adjusted 1970s-80s prices are below $10. That leaves about 32 years and 107 baskets of usable sample.
Expectancy is negative: avg_trade_return_pct is -0.186% against the USEQ floor of +0.05%, PF is 0.81, Sharpe -0.17 (95% CI -0.46 to +0.12), and total return is -2.74%.
Costs do not explain the loss. Commission is zero, impact is about $292 and borrow about $77, against a summed price PnL of -$2,738. At basket level, 31 of 107 baskets win (29%): +$6,059 gross wins vs -$8,796 gross losses.
Executed-signal IC is 0.002 (t=0.05, n=612): no information.
Losses are spread across regimes: calm Sharpe -0.43, normal +0.02, stressed -0.20. Most active years are negative (1993, 1996-2001, 2003-04, 2011-14, 2019, 2023); 2020 is the one large positive month.
Median basket hold is 5 days and no basket reaches the 60-session time stop. Re-entries are mostly closed early by renewed divergence or stops, not by convergence to equilibrium.
Analysis
Iteration History
Reconcile protective stop quantity against the current position after every fill. Modify or replace the stop when quantity changes, and reconcile its trigger with the completed position's average entry price.
_ensure_leg_stops() accepts any existing reduce-only STOP_MARKET without checking its quantity. on_order_filled() invokes it after every entry fill, so a partial fill creates a stop covering only the initial position quantity. Subsequent fills increase the position but leave that stop unchanged. This applies to both PEP and KO and leaves the additional shares without the specified intrabar protective stop.
Track cumulative executed shares and reconcile KO exposure to gamma times actual PEP exposure. Handle incomplete, canceled and rejected entries by canceling outstanding entry quantities and correcting or flattening unmatched exposure.
The first PEP fill submits the entire planned KO hedge and permanently sets hedge_requested. OrderFilled can represent a partial execution, but this branch neither checks completion nor sizes the hedge from actual filled PEP shares. A partially filled or subsequently canceled PEP entry therefore carries the full KO hedge. The later presence-only check accepts this incorrectly hedged basket because both positions exist.
Outcome Summary
Fixing the model-fit defect (the yearly causal refit) showed the gross price-convergence edge itself was negative and unrelated to costs. A thin positive sandbox result should not be read as evidence until the full-history signal IC is confirmed.
After iteration 3 the backtest-review gate returned 'abandon' for no_edge: negative expectancy of -0.186% against the USEQ floor of +0.05%. Costs did not cause the loss: commission was zero and impact plus borrow came to about $370 of a $2,738 loss. The signal showed no information, so optimizing the two boundary multipliers would only have fit noise.
A hedged PEP/KO daily pairs trade on USEQ based on Zhang's Strategy C. A heteroskedastic Model II filtered spread, refit each year on a causal 756-session window, opens a basket when the spread re-enters its volatility-dependent boundaries. The basket closes at equilibrium, on renewed divergence, or at a protective stop.
From 1992 to 2024 it traded 107 hedged baskets (214 trades) and returned -2.74% in total. Sharpe was -0.17 (95% CI -0.46 to +0.12), profit factor 0.81, avg_trade_return_pct -0.186%, and only 29% of baskets won. Max drawdown was 3.54%, and the executed-signal IC was 0.002 (t=0.05).
Analysis
Pairs Trading with Nonlinear and Non-Gaussian State Space Models
Backtest and paper results are hypothetical. Trading involves risk of loss.