walkforward: 2019→2026 OOS exam, 4 TFs @ $0.65 — books + manifest

26 rolling folds per TF (train 12mo / test 3mo / step 3mo) over
2019-01-01→2026-08-07 on fresh Oanda history (5 parquets, sha256s in
manifest). Aggregated OOS: M5 +126.5R PF 1.35 (11/26 folds flagged),
M15 +139.2R PF 1.18 (9/26), H1 +33.3R PF 1.15 (13/26), H4 +33.3R
PF 1.52 (9/26). Flagged folds cluster 2020H2–2023; 2023-10+ nearly
uniformly positive — corroborates the "earns mainly 2024+" re-pin
finding. Robustness read only: NOT a new baseline, nothing tuned.

Runs captured at 1c264d5 + the walk-forward diff (recorded as
dirty + diff sha256 in manifest.json); compare_baseline passed 32/32
immediately before the runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017FBjfomAipxvPWwRJEDDyJ
This commit is contained in:
Harwinder Sekhon
2026-08-07 18:21:47 -04:00
parent b357ab1e87
commit 68dc76a5f1
18 changed files with 14074 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
# Walk-forward exam — commit 1c264d5 (+ uncommitted walk-forward feature)
Rolling-fold out-of-sample evaluation of `backtest/gpu_backtest.py
--walk-forward` for XAU/USD, window 2019-01-01 → 2026-08-07, all 4
primary TFs at $0.65 round-trip spread, train 12mo / test 3mo / step 3mo
(26 folds per TF). One continuous replay per TF with the fixed HEAD
config — folds are slices of the book by entry time, no per-fold
re-optimization. News off (backtester default).
Captured 2026-08-07. The working tree at capture was commit `1c264d5`
plus the then-uncommitted walk-forward implementation (gpu_backtest.py,
test_all.py Module 23, CLAUDE.md); `manifest.json` records `dirty: true`
and the sha256 of `git diff` at capture. `scripts/compare_baseline.py`
passed 32/32 against `baseline/da61cff` with this exact tree immediately
before these runs — the feature leaves default (non-walk-forward) books
byte-identical, and the 2019→2026 data fetch touched no pinned parquet.
Per run dir: `trades.csv` (full book incl. train-period trades),
`summary.txt` (backtester stdout — full report + the walk-forward fold
table and aggregated OOS stats), `equity.csv` + `metrics.json` (derived
from the book via scripts/baseline_common.py; these cover the WHOLE
window, not just OOS). `run.log` is stderr, provenance only.
`manifest.json` records the exact argv/command per run, sha256 of every
input parquet (the five 2019→present files, also in
`backtest/cache/data_manifest.json`) and every output file, backend, and
the walk-forward parameters.
Headline aggregated OOS (union of test folds, each trade once,
2020-01-01 → 2026-07-01):
| TF | OOS trades | Total R | exp/trade | PF | Max DD (R) | folds PF<1 |
|-----|-----------:|--------:|----------:|-----:|-----------:|-----------:|
| M5 | 991 | +126.54 | +0.128 | 1.35 | 19.16 | 11 / 26 |
| M15 | 2001 | +139.15 | +0.070 | 1.18 | 55.06 | 9 / 26 |
| H1 | 638 | +33.28 | +0.052 | 1.15 | 23.84 | 13 / 26 |
| H4 | 188 | +33.31 | +0.177 | 1.52 | 5.66 | 9 / 26 |
Flagged folds cluster in 2020H2–2023 on every TF; from fold ~16
(test 2023-10) onward the test folds are almost uniformly positive.
Consistent with the 2026-08-04 Oanda re-pin finding that all TFs earn
mainly 2024+. These runs are an OOS robustness read on the shipped
config over deep history — NOT a new baseline and NOT a rule-1
validation event (window, cost and provider differ from the pinned
books; nothing was tuned here).