Personal project

Swiss power demand, forecast a day ahead

Tomorrow’s demand moves tomorrow’s power price, and the day-ahead auction closes at noon. The model forecasts Switzerland’s 24 hourly loads for the next day using only what a trader would know at 12:00, and is tested over 45 months it never saw.

PythonpandasLightGBMENTSO-EOpen-Meteo
5.4%
average hourly error (MAPE), Apr 2021 – Dec 2024
−26%
error vs the naive forecast “same hour last week”
2.9%
Swissgrid’s own error, Jan – Aug 2023: still twice as good
01 / 05

Results

Every method is scored on the same clean hours. The model beats the naive forecast in every year, but the grid operator’s forecast is clearly better.

That is expected: Swissgrid has weather forecasts for the whole country, metered data, intraday updates and knowledge of large consumers.

Apr 2021 – Dec 2024Jan – Aug 2023
Naive: same hour, one week earlier7.17%7.16%
This model, with weather forecasts5.41%5.52%
Swissgrid day-ahead forecast–2.90%
02 / 05

Monthly error, out of sample

The model is retrained every month on the past only and scored on the next month: 45 months that cover every season.

Swissgrid appears only for January to August 2023, the one period where its published forecast is usable.

03 / 05

Checking the data

The first run said the model beat Swissgrid. Comparing every series month by month showed why: from September 2021 to December 2022 the published Swissgrid forecast is a copy of the actual load, and from September 2023 it is broken.

A few load hours are corrupted too: a value frozen for 10 hours, a December weekday at 40% of normal. Each hour is judged against its own normal level, and 62 of 52,608 hours (0.12%) are removed, each logged with its reason.

04 / 05

Inputs known at noon the day before

A forecast that quietly uses information from the future looks better than it is. The load used as input stops at 10:00 the day before, and the weather is the archived forecast made about 48 hours earlier, not the weather that actually happened.

Switching to weather forecasts barely moved the error: recent load already carries most of the weather signal.

Same hours, three setupsMAPE
“Same hour yesterday” as input, observed weather5.11%
Only load known at 12:00 the day before5.40%
+ weather forecasts instead of observed weather5.41%
05 / 05

One winter week

Actual load, the model and Swissgrid follow the same daily and weekly rhythm; the model misses more on unusual days.

Limits: one city’s temperature stands in for the whole country, the Swissgrid comparison covers eight months, and there is no embedded solar or price data.

A personal project on public data from the ENTSO-E Transparency Platform and Open-Meteo.