walk-forward-runnerlisted
Install: claude install-skill barobaonguyen/ai-automation-skills
# Walk-Forward Runner
Use this skill when a time-series model or rule-based strategy needs chronological validation without leakage. It gives the user rolling train/validation windows and a simple rank-divergence verdict for parameter robustness.
## When to invoke
- User says: "walk forward validation" / "time series cross validation" / "no leakage split"
- Code in the conversation uses: timestamped rows, rolling windows, chronological model evaluation, or parameter sweeps.
## When NOT to invoke
- The dataset is too short for multiple folds.
- The task is ordinary shuffled cross-validation on independent rows.
## Concrete example
User input:
```text
I tested lookback values on 3 years of daily rows. Flag which settings are overfit.
```
Output:
```text
Param value Train rank Val rank Verdict
lookback=20 1 1 STRONG ROBUST
lookback=50 2 6 OVERFIT (good train, bad val)
lookback=10 5 3 weak both
```
Code:
```python
from datetime import timedelta
# Copy assets/walk_forward.py into your project, then:
from walk_forward import walk_forward_folds, verdict
folds = list(walk_forward_folds(rows["timestamp"], timedelta(days=365), timedelta(days=90), timedelta(days=30)))
label = verdict(train_rank=2, val_rank=6, n=6)
```
## Pattern to apply
1. Sort rows by timestamp before splitting.
2. Roll fixed train and validation windows forward by a step size.
3. Assert validation starts at or after train end.