Electricity Forecasting

A deployed app that forecasts Turkish hourly electricity demand with zero-shot TimesFM and benchmarks it against the official day-ahead plan published by EPİAŞ over 1,824 hours: ahead on ordinary hours, behind overall because of holidays.

Can a pretrained time-series foundation model, with no task-specific training, compete with the official hourly load estimation plan that TEİAŞ, the grid operator, publishes a day ahead on EPİAŞ’s Transparency Platform (the EPİAŞ plan below)? I built this forecasting app and explorer end to end for Universal Software’s energy team, from the EPİAŞ API pipeline to the app. It runs on Universal’s on-premises machines.

Result: at 24 hours the plan is ahead (TimesFM 3.47% vs plan 3.13% MAPE over 1,824 hours, April 1–June 16, 2026). TimesFM leads on ordinary hours (2.39% vs 2.92%), fails on holidays (12.67% vs 4.89%) and beats all three naive baselines; at 168 hours it falls well behind, though there the plan is day-ahead, so it is not a matched comparison.

Streamlit backtest page with April 2026 metrics and overlaid actual, TimesFM, and EPİAŞ demand curves
The backtest view for April 2026 at a 24-hour horizon, TimesFM’s best month (TimesFM 1.89% vs plan 2.89% MAPE over 720 scored hours), loaded from cached forecasts. Over the full evaluation window the plan is ahead.

The interactive electricity forecasting walkthrough needs JavaScript.

What it does

  • Pulls hourly real-time consumption and the EPİAŞ plan, plus profiling multipliers for all 21 distribution companies, through my own EPİAŞ Transparency Platform API client, which turns the JSON responses into Parquet tables and keeps the app current.
  • Runs TimesFM 2.5 (200M) zero-shot with a 1,024-hour context window.
  • Runs forward TimesFM forecasts from the latest consumption data on a Forecast page, next to the EPİAŞ plan, and scores observed hours against actual consumption where the plan is available.
  • Backtests 24-hour and 168-hour horizons from rolling forecast origins in a retrospective comparison. Each block starts at 00:00, and TimesFM sees demand history up to the hour before; results are cached so repeat analysis is instant.
  • Includes a separate explorer for EPİAŞ profiling multipliers across distribution companies, profile groups, and meter-reading types; it is not used in the forecast.

Results and limits

Retrospective backtests from April 1 to June 16, 2026 (Istanbul time), scored against EPİAŞ real-time consumption. May 12 is excluded: the plan is missing for that day in the EPİAŞ data I pulled. At 24 hours the plan is more accurate overall; TimesFM is ahead on ordinary hours and far behind on holidays:

24-hour MAPEHoursTimesFM 2.5EPİAŞ planTimesFM − plan (pp)
All hours1,8243.47%3.13%+0.34
Ordinary hours1,6322.39%2.92%−0.53
Holiday hours19212.67%4.89%+7.78

Holidays: National Sovereignty and Children’s Day (Apr 23), Labour and Solidarity Day (May 1), Commemoration of Atatürk, Youth and Sports Day (May 19), and the Eid al-Adha break as full days, May 25–29. That break includes the May 25 government leave day and leaves out May 30, the last day of Eid. With the statutory holidays instead (May 26 from 13:00 and May 27–30; 179 hours), ordinary hours are TimesFM 2.57% vs plan 3.05% and holidays 11.79% vs 3.91%.

Timing favours TimesFM at 24 hours. The plan for a day is made the day before, while each TimesFM block starts at 00:00 with demand up to 23:00 the previous day, so TimesFM forecasts 1–24 hours ahead and the plan further. Part of the ordinary-hour lead may come from that fresher data.

Against all three naive history-only baselines on the same 1,824 hours, TimesFM is more accurate by MAPE; against the plan it is not:

24-hour horizon, 1,824 hoursMAPE
Persistence (last observed hour)11.00%
Same hour last week7.72%
Same hour yesterday5.72%
TimesFM 2.5 (zero-shot)3.47%
EPİAŞ plan (day-ahead)3.13%

Overall MAE is TimesFM 1,244 vs plan 1,144 MWh, and the plan’s edge widens in the five hours starting 17:00 to 21:00 (380 hours; TimesFM 1,442 vs plan 1,085 MWh).

Is the 24-hour gap significant?

A paired test on the 76 daily MAE differences, with Newey–West standard errors (6 lags) for day-to-day autocorrelation, puts TimesFM 100 MWh behind the plan (95% CI −267 to +467 MWh, p = 0.59). At 24 hours this test cannot separate their mean absolute errors; it does not test the MAPE gap or show the forecasts are equal.

Daily mean absolute error of TimesFM and the EPİAŞ plan from April to mid-June 2026, with Eid al-Adha shaded
Daily MAE across the 24-hour backtest. TimesFM’s worst days are around Eid al-Adha, with large errors also on Apr 23, May 1, May 4, May 19, and June 1.

The ordinary-hour lead is not consistent: in June alone the plan also leads on ordinary hours (TimesFM 2.70% vs plan 2.41%). TimesFM sees only demand history, without holiday calendars or weather, so it cannot anticipate a national holiday.

At 168 hours the plan is a reference, not a matched competitor: its figures are successive day-ahead plans, most of which would not exist yet at a week-ahead origin. From May, TimesFM falls well behind:

168-hour MAPEHoursTimesFM 2.5EPİAŞ plan
Apr 1–286722.59%2.96%
May 1–28, less May 126488.40%3.40%
Jun 1–143368.37%2.38%
All1,6566.04%3.01%

After Eid the low days sit in TimesFM’s context window; the June 1 block underforecasts throughout (12.18% MAPE, mean bias −4,815 MWh), consistent with that explanation, though the mechanism is untested. The errors around Eid fit missing calendar information; calendar features are the next experiment, not a result.

How the backtest was run

New blocks start daily (24 h) or weekly (168 h) without overlap, and each metric pools every lead in the block. This is a retrospective comparison, not a matched operational trial. Nothing was tuned on the evaluation period: TimesFM runs zero-shot, and the evaluation window and context length were set before scoring. The holiday split diagnoses that run; it is not a tuned rule.

Distributor dashboard comparing hourly profiling multipliers for two distribution companies across profile groups and meter-reading types
The distributor dashboard for June 2026: hourly profiling multipliers for two distribution companies, summed per company, with averages by profile group and meter-reading type.

What I took from it

  • A winning slice isn’t a forecasting policy. TimesFM led on ordinary hours, but not in June and not overall; the full window is the result.
  • A zero-shot model is a cheap baseline, not a replacement. It beat all three naive baselines without training, but not a plan that handles holidays.
  • Test the gap before ranking. The plan leads on both MAE and MAPE, but over 76 days the MAE gap is not significant (p = 0.59); one window does not settle the ranking.