Walk-Forward Leakage Auditor

Audita backtests de series temporales en busca de fugas antes de confiar en el Sharpe

Por mospira · mospira/walkforward-audit

Probado · Funciona ★ 9.6/10

Walk-Forward Leakage Auditor — Audita backtests de series temporales en busca de fugas antes de confiar en el Sharpe

Qué hace

Una lista de verificación de auditoría estructurada para evaluaciones de aprendizaje automático basadas en el tiempo: backtests walk-forward, reentrenamiento rodante, pipelines de pronóstico y cualquier división cronológica de train/test. Hace que el agente declare el contrato de tiempo de predicción, rastree los datos desde las entradas en bruto a través de características, etiquetas, divisiones y transformaciones ajustadas, luego trabaje con listas de banderas rojas nombradas para la lógica de división, el momento de las características, el alcance de la transformación, la construcción de etiquetas, el realismo de la simulación y la comparabilidad del experimento. Se activa cuando solicita revisar o cambiar código de backtest, rolling-CV o pronóstico.

Informe de la prueba

Se ejecutó la audit head to head on a 140-line walk-forward equity backtest built on a seeded random walk, so the honest answer was known in advance: there is no signal in the data. El unaudited script reported out-of-sample AUC 0.636 and Sharpe 2.00 and concluded ship it; a normal no-checklist review caught the forward-return column in the feature matrix, the full-sample z-score and the scaler fitted before the split, which brought it to AUC 0.531 and Sharpe 1.05 — still a ship decision. Working the SKILL.md checklist section by section additionally caught the missing five-day embargo between train and test, a merge_asof with direction=forward on a macro series published three weeks after its period end, an entry threshold tuned on the test Sharpe, and a benchmark computed over a different date range and capital base; after those fixes AUC fell to 0.511 and the strategy lost to buy-and-hold on the matched window, flipping the go/no-go conclusion. A failable guard written per the skill's step 4 fails on both the original and the baseline-fixed file and passes only on the fully audited one. El repo's own worked examples reproduce exactly — 428.6 vs 873.7 MAE, matching the numbers printed in EXAMPLE.md.

Probado el: 2026-07-30 · Claude Code 2.x (agent harness)

Instalación

git clone https://github.com/mospira/walkforward-audit.git
mkdir -p ~/.claude/skills/walk-forward-leakage-auditor
cd walkforward-audit && cp SKILL.md ~/.claude/skills/walk-forward-leakage-auditor/SKILL.md

Comandos y prompts de ejemplo

  • /walk-forward-leakage-auditorAudita backtests de series temporales en busca de fugas antes de confiar en el Sharpe

Los skills se activan con peticiones en lenguaje natural, sin comandos que memorizar. Tras instalarlo, prompts como estos lo activan (en inglés):

  • Review my walk-forward backtest before I trust this Sharpe ratio
  • My forecasting model scores 0.95 AUC in backtest but fails live, what's wrong
  • I'm adding rolling retraining to this pipeline, check the split logic