live experiment
The price of electricity,
predicted every day
Can you know today what electricity will cost tomorrow? The question matters because that price sets the bill: running the washing machine in the right hour or the wrong one shows up at the end of the month. And electricity is just the example we have closest to hand: the same bind hits anyone who depends on a number that moves every day, tomorrow's demand, the cost of a raw material, the calls that will land on the support desk.
Our way of answering: every morning at 11:00 (Spanish time) this system seals its predictions of tomorrow's electricity price (the PVPC, the regulated tariff that millions of Spanish households pay). Sealing means storing them with a timestamp, so they cannot be changed afterwards: they are on record two hours before the power auction publishes the real price. At night, when the official figure comes out, the two are compared and the scoreboard updates every day.
We compete against the naive method ("tomorrow will cost the same as today"). If a model doesn't beat that consistently, it is worth nothing, and here you will see it. In the prior simulation over 861 days, the best model cut the error from the naive method's 17.0% down to 7.9%; the detail, and its caveats, further down.
scoreboard
model error4.8%
naive error10%
days won9/16
As of August 2026, the model's mean error is 4.8% versus 10% for repeating the previous day's price, over 16 days sealed and scored against the real price.
The scoreboard updates every night with the official figure.
How to read the scoreboard: the needle marks our mean error and the grey tick the naive method's. The mean error says, out of every 100 euros of real price, by how many we were off. The further the needle sits below the grey tick, the better. "Days won" counts on how many days our prediction landed closer to the real price than repeating today's.
what we predict, exactly
- One price: tomorrow's average, a single number in €/MWh. It is what the scoreboard grades and what the 2,047 combinations compete on.
- A curve of 24 prices: what each hour of tomorrow will cost. From it come the 3 cheapest hours, the practical bit.
Both are sealed at 11:00, timestamped, before the official figure exists. We don't give price ranges with uncertainty, yet; when we do, they will have their own scoreboard.
pvpc · daily average €/MWh
Real vs predicted, day by day
Each dot is a full day: the average of its 24 hours. The sawtooth isn't day and night, it is the week (the dips are usually weekends). The prediction is one number per day, and it is compared against that day's real average: averages against averages. The vertical axis is the price in €/MWh (euros per megawatt hour, the wholesale market's unit); the horizontal one, the days. The blue line is the real price; the copper dots, our prediction; the grey rings, the naive method.
The bet, since the first live sealing: 16 days scored against the real price, with a mean error of 4.8% for our recipe versus 10% for the naive method (tomorrow will cost what today did) on those same days. Figures as of August 2026: the script refreshes them on load.
You can zoom in with the mouse wheel (pinching, on mobile) and move through time by dragging the band below.
tomorrow's curve
Hour by hour
Besides the daily average, every morning at 11:00 the full curve of 24 hourly prices is sealed, and from it come the three cheapest predicted hours.
How to read it: the horizontal axis is tomorrow's 24 hours and the vertical one the predicted price of each hour, in €/MWh. The copper line is our curve, sealed at 11:00; the grey one, the naive curve (each hour will cost what it cost today at that same hour); the blue one appears at night, when the real price is published. The green rings mark the three cheapest predicted hours, the practical bit for plugging in whatever burns the most.
Its backtest (the same recipe rehearsed over the past: 428 days, 2025-04 → today, always with the previous day's weather forecast): this exam is different from the header's: that one measures the day's average over 861 days; this one measures the hour-by-hour curve, which is harder. Here the model's curve misses by 14.4% per hour against the naive curve's 21.8%, and gets 63% of the cheap-hours top 3 right. The caveat: at nailing the exact cheapest hour, the naive curve beats us (32% vs 28%), the hour of the minimum repeats a lot from one day to the next (the solar midday), and our regression smooths. It is on the list of improvements.
How it works
Eleven sources of information, each with its letter. The eight founding ones:
- P · Persistence: today's price (which is already public: it was set yesterday at the auction). The simplest hypothesis: tomorrow will look like today.
- C · Calendar: which day of the week tomorrow is, measured as the price of the last four same weekdays. On Sundays electricity is systematically cheaper.
- T · Temperature: the forecast for tomorrow in the five largest cities (Madrid, Barcelona, Seville, Valencia, Bilbao). Heat and cold send demand through the roof.
- V · Wind: the forecast for tomorrow in five wind-farm areas (the Ebro valley, Galicia, Tarifa, Albacete, the northern plateau). More wind = more renewables = lower price.
- S · Solar: the radiation forecast for tomorrow in five high-irradiation areas. The solar midday sinks the price.
- E · Seasonality: what electricity cost around this date a year ago (±5 days). The long memory: what July usually looks like.
- F · Holiday: whether tomorrow is a national holiday (official calendar). A holiday Tuesday behaves like a Sunday.
- G · Gas: the daily index of the Iberian gas market (MIBGAS, the Spanish hub): the fuel that sets the price when the wind doesn't blow.
And since 14 July, three official sources from Red Eléctrica (their combinations compete from that date, not before; each one's scoreboard starts with its first seal):
- W · Official wind: the peninsular wind-generation forecast Red Eléctrica publishes. The professional version of our source V.
- D · Forecast demand: how much electricity the peninsula is expected to consume tomorrow.
- N · Available nuclear: how much nuclear capacity will be running tomorrow. When a reactor goes into refuelling, a gigawatt vanishes from the system, and it shows.
The method: for every combination of sources, a linear regression is trained each day, a formula that learns from the last 90 days how much each source weighs on the price. No black boxes: with eleven sources, 2,047 small, explainable models, competing against each other and against the naive method. When a new source comes in, we will tell what changed.
What we expected to find
The premise we started from: each family of information should lower the error in steps. Knowing which day of the week it is and where today closed, a first step; adding the weather (temperature, wind, sun), the holidays and the gas, another; and Red Eléctrica's official forecasts, the last one. If some step doesn't lower it, that source is dead weight and we will say so. The verdict, with its numbers, is in the backtest below; the exam that rules is the live scoreboard above.
The self-comparison: which sources pull their weight?
Each day we don't seal one prediction: we seal two thousand and forty-seven. A combination is a team of sources: the calendar alone, calendar and gas together, all eleven at once... with eleven sources there are 2,047 possible teams, and they all compete. Over time, this table will say which combination hits most, and which sources are dead weight. Below: the eleven sources alone, the ten best combinations (once there are results) and the full one. Each combination is named by the letters of its sources (the internal nomenclature you will see in the tables, with its composition next to it).
The backtest: the same recipe, simulated backwards
Before starting live, we ran the same recipe over two and a half years (2024 → today), day by day, as if we had sealed every morning: train on the previous 90 days, predict the next one. It is a simulation, played clean: for each day we use the weather forecast that existed the day before (Open-Meteo's archive), not the observed weather, the same information the seal would have had. The scoreboard above, by contrast, only counts predictions sealed live.
The verdict: the staircase premise held. What 861 days say: the naive method misses by 17.0%; knowing which day of the week it is and where today closed brings it down to 11.9%; adding temperature, wind, solar, seasonality, holidays and gas brings it down to 10.3%. And Red Eléctrica's three official forecasts (wind, demand and available nuclear) bring it down to 7.9%: in the backtest, no combination without them comes close. A mistake of our own that is still the experiment's best lesson: with only 91 days of backtest we had "discovered" that persistence added nothing and that gas and temperature were dead weight, and with hundreds of days it turned out to be false. Short backtests deceive; that is why this one runs long and, above all, keeps going live, which is the one judge that cannot be fooled.
The caveat, and it is a big one: Red Eléctrica's archive keeps the last version of each forecast, not the one that was published at eleven in the morning, when we seal. Wind and demand get refined as the day approaches, so in the backtest these three sources play with a slight advantage and their 7.9% may sit above what they achieve live. That is why the scoreboard above, the one that captures the forecast at nine and seals at eleven without looking back, is the judge that rules. A note from the duel: the official wind forecast and our homemade one tie when alone, but in combination the official one wins, removing it from the best combination costs more than four points; nuclear adds almost nothing in the backtest and its real exam will be the upcoming refuelling outages, live.
How we run it
- The prediction is sealed at 11:00 with a timestamp, before the next-day auction publishes the price (~13:30).
- The real figure is the official PVPC (Red Eléctrica's open data), the average of the day's 24 hours.
- The scoreboard doesn't start until the first prediction sealed live: the earlier history is shown as context only, with no retroactive predictions.
- Deliberately simple, explainable models (a regression over each combination's sources, retrained daily on the last 90 days). When a new source comes in, we tell it, with its date: gas came in on 12 July and Red Eléctrica's three on the 14th.
- The misses get published the same as the hits. The day the naive method beats us, it will show here.
Data and acknowledgements
This experiment exists because there are institutions that publish their data in the open. Thank you.
- Red Eléctrica de España: the official PVPC, via its open data (apidatos.ree.es).
- Open-Meteo: forecasts and archive of temperature, wind and radiation (CC BY 4.0).
- MIBGAS: the daily index of the Iberian gas market.
- e·sios (Red Eléctrica de España): wind forecast, demand forecast and available nuclear capacity. The data is served from our server, as their terms require.
- Nager.Date: the holiday calendar.
- Coming soon: AEMET (Spain's state meteorological agency).
No affiliation with any of them. The prediction errors are ours alone.
Can you use this? Yes. Our predictions, the scoreboard and this page's texts are published under a CC BY 4.0 licence: use them, share them or analyse them freely, citing the source, Team Banzai (team-banzai.com). Third-party data (PVPC, weather, gas) keeps the terms of its original sources.
Data: apidatos.ree.es (Red Eléctrica de España, open data). Predictions and scoreboard: public JSON with each seal's timestamp. No affiliation with Red Eléctrica.
And in your company?
The same thing works for predicting tomorrow's demand at a shop so you neither run short nor overstock, for anticipating how many calls will land on the support desk on Monday, or for estimating a customer's spend before the bill reaches them.
If any of these experiments reminds you of a problem of yours, consumption series filed away unread, a tariff nobody recalculates, a demand spike that always catches you off guard, get in touch and we'll talk it over. No fuss: we'll tell you whether it can be done or not.