Skip to content

Make walk-forward eval honest vs random walk (#387) - #391

Open
tsj2003 wants to merge 1 commit into
shiyu-coder:masterfrom
tsj2003:fix/issue-387-walk-forward-eval
Open

Make walk-forward eval honest vs random walk (#387)#391
tsj2003 wants to merge 1 commit into
shiyu-coder:masterfrom
tsj2003:fix/issue-387-walk-forward-eval

Conversation

@tsj2003

@tsj2003 tsj2003 commented Aug 15, 2026

Copy link
Copy Markdown

Looked at #387. The backtests there (5m / 15m / 1h, T=1.0 and 1.5) showing no directional edge vs a random walk are pretty easy to reproduce, but I don't think that's quite the same thing the paper is measuring.

Two concrete problems on our side:

  1. predict() averages all sample paths, then people plot high/low of that one mean path and call it a cone. That's why the cones look tiny. The spread has to come from the samples, not from the averaged bar.
  2. Dropout was still on during inference unless the caller remembered eval(). That's a silent footgun.

What I changed:

  • predict() is unchanged for callers (still returns the mean DataFrame).
  • New forecast() keeps the sample paths and 10/50/90% quantiles.
  • Predictor now puts the model in eval mode.
  • examples/walk_forward_eval.py walks forward on a CSV and prints MAE / hit rate / coverage against a last-price random walk, plus a short interpretation. If there's no edge, it says so.

I ran tests/test_walk_forward_eval.py and the existing tests/test_kronos_regression.py — both green. Didn't include anything unrelated.

If zero-shot Kronos-small still has no edge on a given futures contract after this, that's probably a finetune / cross-sectional ranking problem, not something you fix by turning T up to 1.5.

…yu-coder#387.

Zero-shot Kronos-small was being judged as a single-name directional signal, while predict() averaged sample paths and hid the real forecast cone. Keep the mean path for compatibility, return quantiles from forecast(), and compare MAE/hit-rate/coverage against a last-price random walk.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tsj2003 tsj2003 changed the title Fix walk-forward evaluation and sample-path cones (#387) Make walk-forward eval honest vs random walk (#387) Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant