Spain day-ahead price forecast
Real OMIE marginal-price data, calendar + autoregressive-lag model, walk-forward validated.
Loading forecast…
Spain wind outlook
Tomorrow's national wind capacity factor, from Open-Meteo's 100 m wind forecast at ten Spanish wind regions, ranked against every same-month day of 1980–2022 (DTU simulated fleet).
Loading wind outlook…
Battery arbitrage schedule
Optimal charge/discharge schedule (linear program, PuLP/CBC) against the price forecast above.
Optimizing…
Walk-forward backtest
240 real days, 2026-03-12 to 2026-11-06, current model (price lags + day-ahead wind forecast), 120-day window, weekly retrain — the honest test, not a single lucky split.
19.52
Mean daily MAE, €/MWh
16.59
Median daily MAE
2.66
Best day (03-29)
58.96
Worst day (11-03)
Without the wind forecast, the same 240 days score 25.12 €/MWh. Error grows with the price level: monthly MAE went from 12.5 in May to 42.9 in November, as average prices rose from €54 to €210/MWh.
backtesting/price_backtest.pyWhat we tried
Two honest negative results, kept in the repo, not hidden, and the one that worked.
✓
Day-ahead wind forecast for the delivery day (Open-Meteo forecasts issued two days ahead, mapped to Spain's fleet with DTU's 1980–2022 simulation): walk-forward MAE 25.12→19.52 €/MWh over 240 days, 20.03 vs 28.92 on the windiest days. Now in the model.
×
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.