run_strategy_walk_forward
Run a bounded walk-forward evaluation of Pine strategies from immutable ledgers. Splits trades into train/test windows, selects candidates on train metrics only, and exposes only selected test results.
Instructions
Run a bounded Pine Strategy walk-forward evaluation from full, immutable trade ledgers. Two to eight exact saved strategy/input candidates are collected serially on the bound chart, then partitioned into two to twelve explicit train, embargo, and test windows by closed-trade entry/exit time. Selection uses train metrics only; only the selected candidate's test metrics are exposed. Candidate failure, ledger quality issues, cost-condition differences, ties, and insufficient samples are not silently ignored. Without confirm=true this only previews the plan. Never places orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| folds | Yes | ||
| confirm | No | ||
| candidates | Yes | ||
| embargo_bars | No | Closed bars between train and test. Default: 1 | |
| expected_symbol | Yes | ||
| selection_metric | No | Train-only metric to maximize. Default: expectancy | |
| expected_timeframe | Yes | ||
| falsification_audit | No | Optional #45 ledger-level falsification audit. It replays the same candidate selection and OOS rule over centered, shared-calendar-block sign-flipped trade profits after full ledgers are collected. Candidate status requires a one-sided empirical post-selection OOS net-profit p-value at nominal alpha. | |
| max_runtime_seconds | No | Do not start another candidate after this soft deadline. Default: 600 | |
| minimum_test_trades | No | Trades required for each selected OOS fold. Default: 10 | |
| minimum_train_trades | No | Trades required to select a candidate in each train fold. Default: 30 |