Battery Dispatch

From February to December 2025, a 1 MW battery run by my model earned €68,084 on the German day-ahead market: €3,800 more than a simple rule, and 91% of what perfect hindsight would have earned.

Illustration At portfolio scale that adds up: on 100 MW of batteries (an example size, not a real asset), the same edge would be worth about €380,000 over the same 11 months.

A machine-learning model forecasts tomorrow's power prices from three years of history, and an optimiser plans when the battery charges and sells. I backtested it day by day on real 2025 prices, using only data available before each day's auction. It is still a basic model: the forecast sees past prices and the calendar, not the weather or fuel costs.

One day: 1 June 2025

Actual price Forecast Charge Sell

Solar pushed prices below zero at midday, as in 573 hours across 2025, when wind and solar covered 95% of demand. The battery charged then and sold into the evening peak, earning €206 that day against a ceiling of €221. The forecast overshot the dip, but it got the shape of the day right, which is what the plan needs.

Results

Earnings per MW of battery from day-ahead trading. My first version learned from 2025 alone and lost to the simple rule early in the year. Training on 2023 and 2024 as well fixed that: the model now beats the simple rule over the whole test.

StrategyFeb–DecApr–Dec
Perfect hindsight€75,126€62,726
With wind & solar forecasts*€71,040€59,570
My model€68,084€57,174
Simple rule€64,284€54,110
First version (2025 data only)€62,848€55,472

1 MW / 2 MWh battery, day-ahead market only, before grid fees and taxes. Bars show February–December. *The grid operators publish these wind and solar forecasts around 18:00, after the noon auction, so this row shows what good forecasts are worth, not what was possible with public data. A trader would buy commercial forecasts to get there. The 100 MW illustration assumes the same edge per MW, a single day-ahead market and no market impact from a larger fleet. Larger fleets can move prices, so the real gain could be lower.

How it works

  1. Forecast

    A machine-learning model (gradient boosting) predicts tomorrow's 24 hourly prices from recent prices and the calendar. It learns from 2023 onward and is retrained every month on past data only.

  2. Plan

    An optimiser (a MILP, which finds the best schedule within hard limits) decides when to charge and sell, respecting the battery's power, storage, energy losses and wear.

  3. Compare

    The plan is paid at the real prices and compared with a simple rule (assume tomorrow repeats today) and perfect hindsight (knowing the real prices in advance, the ceiling no forecast can beat).

A basic model, and what it is missing

The gap to the ceiling is the value of a better forecast. I tested which inputs close it:

What I tested

  • Two more years of price history: the biggest clean gain, from 84% to 91% of the ceiling
  • The grid operators' wind and solar forecasts: up to 95%, but they are published after the auction
  • Public weather forecasts, the demand forecast, holidays and neighbouring prices: a smaller forecast error, but no extra profit yet

Would help, but I have no access

  • Commercial wind and solar forecasts available before the auction
  • Gas and CO₂ prices, which set the cost of the plants that fill the evening peak (licensed market data)
  • Intraday and balancing market data, where batteries earn much of their money (licensed)
  • A real battery's operating data, limits and contracts

I'm Kai Scott Thomas, studying Business, Economics and Data Science at NHH in Bergen. This is an independent project that I designed, built and tested on my own.

Contact me on LinkedIn