energy-trader

AI energy trading platform — Spain day-ahead, phase 0/1 + battery optimization live

Spain day-ahead price forecast

Real OMIE marginal-price data, calendar + autoregressive-lag model, walk-forward validated.
Loading forecast…

Battery arbitrage schedule

Optimal charge/discharge schedule (linear program, PuLP/CBC) against the price forecast above.
Optimizing…

Walk-forward backtest

70 real days, 2026-07-01 to 2026-09-08, weekly retrain — the honest test, not a single lucky split.
21.74
Mean daily MAE, €/MWh
19.58
Median daily MAE
7.79
Best day (07-12)
46.94
Worst day (07-13)
A single random train/test split reported 20.32 €/MWh MAE — walk-forward is the harder, more honest test. backtesting/price_backtest.py

What we tried and rejected

Two honest negative results, kept in the repo, not hidden.
×
REE demand as a feature: same-day forecast looked great (MAE 20.32→18.78) until we checked it would actually be available at prediction time — it isn't, REData's forecast series never reaches tomorrow. The honest lagged-demand alternative made the model worse (→23.09).
×
Wind/solar generation lagged the same way, tested the same way: also worse (→21.32). Two independent exogenous features losing to the price series' own lags is a real finding, not noise.

Reference battery

No real battery asset exists yet — this is an illustrative spec the optimizer runs against, not a real installation.