AlgoXpert IS–WFA–OOS: plateaus, purged walk-forward, deploy gates
A strategy that looks great in a single backtest often fails live because of overfitting, selection bias, or fragile execution assumptions. The AlgoXpert Alpha Research Framework turns research into an auditable Deploy / Reject / Refactor decision: plateau selection in-sample, purged rolling walk-forward with majority-pass and catastrophic-veto gates, then a strict OOS holdout under parameter lock.
Why a protocol, not a peak Sharpe
Peak in-sample performance is cheap to manufacture when the search space is large. Harvey–Liu–Zhu style multiple-testing risk, Bailey et al. on backtest overfitting, and López de Prado’s purging/embargo ideas all point the same direction: deployment is a process decision, not a single equity-curve screenshot.
AlgoXpert (Nguyen, Nguyen, Pham; arXiv:2603.09219) packages that into chronology with pre-committed gates. This guide is pedagogy for that loop. Pair it with walk-forward in pure Python, Nested CV, and the Deflated Sharpe calculator / oos-lab helpers — different layers, same honesty goal.
Three stages at a glance
IS (map plateaus, cliff veto, shortlist) → G1 Purged rolling WFA (restricted DoF, majority-pass + catastrophic veto, lock θ★) → G2 Strict OOS holdout (no further tuning) → G3 Verdict: DEPLOY | REJECT | REFACTOR
Defense-in-depth (structural cliff veto, execution/microstructure guards, equity protection / kill switch) is meant to run throughout, not as an afterthought. Stress envelopes for cost inflation are part of the framework template; the paper’s case study explicitly defers some stress/ablation results.
Stage I — In-Sample plateau selection
Do not lock the single best Sharpe on the IS map. Extreme peaks are usually thin. The stability region in the paper is:
Ω_stable = { θ | SR(θ) ≥ α · SR_opt } with default α = 0.9.
- Viability: require
SR_opt ≥ SR_min > 0; otherwise stop with Refactor (Policy A) before plateau work. - Trade-count filter: drop configs with
N_trades(θ) < N_minso thin lucky samples do not enter the shortlist. - Cliff veto: reject configs whose neighborhood (one grid step) shows Sharpe collapse or MaxDD spike beyond pre-set
τ_SR/τ_DD. - Rank inside the plateau by tail-risk / recovery criteria (e.g. Calmar, recovery, worst-window), not by chasing the absolute SR peak again.
- Parameter lock: after shortlist, freeze cliff-prone / high-leverage dimensions; WFA may only re-select inside the shortlist — not reopen full Θ.
B, shortlist size, α, N_min, and cliff thresholds. Without that, readers cannot judge selection bias.Stage II — Purged rolling walk-forward
Each fold is W_train → purge gap g → W_test. Purge reduces lookback overlap and, for stateful/path-dependent strategies (grid, trailing, inventory), state bleed. At the start of each test window, normalize state (flat / no inventory / reset internals) so forward metrics are not gifts from prior path.
Per fold, choose θ_i only from Ω_stable (restricted degrees of freedom). Forward metrics on W_test are the gate anchors; train metrics are diagnostic-only — not a second tuning loop.
Majority-pass + catastrophic veto
Pre-commit a forward benchmark vector b and a majority threshold q. A fold passes if its forward metric vector meets b. Overall WFA passes if the share of evaluable passing folds is ≥ q. If any fold trips a catastrophic veto (drawdown integrity breach, kill-switch / leverage-cap violation, …), the entire WFA fails immediately.
If WFA fails, OOS is not opened. If it passes, lock θ★ by a rule written before OOS (e.g. best median forward SR, or risk criteria across test windows).
Resilience ratio η_i = SR_test / SR_train and ΔSR are reported as diagnostics only — never as gate inputs after the fact.
Stage III — Strict OOS under parameter lock
Open the holdout once. No retuning, no “just one more grid.” Compare against the same pre-committed b under declared execution assumptions. OOS is the strictest chronological check in the protocol; it is also where selection bias shows up if you cheated earlier.
Deploy / Reject / Refactor (Policy A)
- G1 (IS) fail → Refactor — structural / design-level failure, not a parameter nudge.
- G2 (WFA) fail → Reject — insufficient sequential adaptability.
- G3 (OOS) fail → Reject — failed strict holdout.
- All pass → Deploy — only under the stated execution assumptions; stress envelope still required for full deployment readiness per the paper.
Attributed case study (paper figures only)
USDJPY M5 · Exness · MT5 Every Tick
Timeline (chronological, no peeking): IS 2022-01-01–2023-12-31 · WFA 2024 · OOS 2025. Initial deposit 100,000, leverage 1:100. WFA: 3 rolling folds, purge g = 5 trading days. Pre-committed benchmarks in the study: Sharpe ≥ 2.0, Calmar ≥ 1.5, equity MaxDD < 7%, trades/day ≥ 5; majority q = 2/3.
| Stage | Sharpe | Calmar | MaxDD | Trades |
|---|---|---|---|---|
| IS | 2.12 | ≈1.69 | 6.46% | 2,625 |
| WFA mean (fwd) | 3.79 | 7.54 | 2.93% | ≈286 / fold |
| OOS | 2.34 | 3.01 | 4.21% | 1,374 |
Fold-level forward Sharpe: Fold1 3.81 PASS · Fold2 1.36 FAIL · Fold3 6.20 PASS → majority PASS, no catastrophic veto (all MaxDD < 7%).
Post-validation (not a gate): four variants v1–v4 that cleared the pipeline show rank reversal when switching objective from maximize Sharpe (v3 leads OOS SR 2.61) to minimize MaxDD (v4 lowest OOS MaxDD 4.21%). Mandate decides ranking.
LessonMajority-pass is “minimum threshold for advancement,” not perfect stability. OOS SR below WFA mean is normal normalization — not an invitation to reopen Θ.
Execution caveat the authors state plainly: ideal MT5 tick model (no explicit latency / adverse slippage beyond defaults). Time-robustness under that baseline ≠ execution-robustness under cost inflation. Treat their numbers as the paper’s illustrations, not Quant for Free backtests.
Limitations the paper owns
- Simplified execution assumptions; stress/ablation incomplete in the reported version.
- Single asset/broker case (USDJPY M5 / Exness).
- Comparing multiple post-validation variants increases research-level degrees of freedom — small OOS gaps need DSR / SPA / HAC-style care.
- Trades/day density was flagged as a reporting gap in places where logs could not confirm it.
A pre-deploy checklist
Before calling a strategy deployable under this protocol style:
- Chronology held: θ★ locked after WFA; no OOS tuning.
- Restricted DoF: WFA re-selects only inside Ω_stable / shortlist; Θ not reopened.
- Gates pre-committed: benchmark
b, majorityq, catastrophic veto written before results. - Purge + state normalization applied for stateful strategies.
- Search budget, shortlist, α, cliff thresholds logged for audit.
- Execution assumptions declared; stress envelope planned or completed — baseline ≠ live friction.
- Verdict branch mapped: Refactor vs Reject vs Deploy (Policy A or your pre-registered alternative).