Repository navigation
Day-ahead price forecasting + walk-forward backtest - #3
Merged
Merged
Conversation
- forecasting/: AEMO NEMWeb SA1 history (2019-2026, 30-min AEST) cached to
data/sa1_prices.parquet; naive, LightGBM and PyTorch LSTM day-ahead models;
validation-then-frozen walk-forward test (365 days, retrain every 30 days)
scored by feeding forecasts into the unchanged LP and settling at actual prices
- results/: backtest.json, REPORT.md, typical-day chart, per-day JSON
(LSTM 61.8%, LightGBM 49.5%, naive 27.2% of perfect-foresight revenue)
- tests: leakage tests (features and fit+predict) and realised-profit tests
- API: GET /api/v1/backtest/days and /api/v1/backtest/day/{date}
- React: Backtest page (#/backtest) with synced price/SoC/profit charts,
capture-rate bars and best/worst/spike day pickers; live page unchanged
apart from a link
- forecasting deps in an optional "forecast" extra (CPU torch); CI installs it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Live/Backtest tab switch on both pages; capture-rate chart moved to top so it no longer jumps off-screen - Prev/next day buttons, icon jump buttons, zoom toggle button, red losses, #/backtest/<date> deep links - README: backtest results table and worst-day (2026-05-18) walkthrough with screenshot
Resolve backend-tests.yml conflict: keep main's comment cleanup, keep --extra forecast so CI can run the forecasting tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reproduce
uv sync --extra forecast && uv run python -m forecasting.backtest