Hourly electricity demand forecast and battery peak-shaving schedule

Case study on a public dataset from United States · Updated

We forecast hourly electricity demand (MW) for each of 5 balancing authorities 7 days (168 hours) ahead from a public dataset. In testing on past data, the selected method (the AI forecasting model) was off by 5.7% of actual volume on average, 21% less error than repeating the same hour the day before. The grid operators' own day-ahead forecast did better, with 3% error.

Read this first

  • The costs and limits in the plan (series, power mw, energy mwh, round trip efficiency, capacity price, off peak price, peak price, peak hours, timezone, degradation cost) are example values chosen to show the method. With your business, we use your numbers.

The request

"Forecast our hourly electricity demand for the next 7 days and show how you compare to our current day-ahead forecast."

The request, written the way a business owner would ask it.

The forecast

We expect electricity demand (MW) to average 85,040 over the next 168 hours for PJM, the largest series, peaking at about 93,910 on Fri, Oct 2, 12 AM.

Line chart of hourly electricity demand (MW): the actual history, the forecast for the next 7 days (168 hours) with its 80% range, and what actually happened in those days.
The forecast for the next 7 days (168 hours), with the range it expects 8 times out of 10. The dotted line is what really happened.
Small line charts of the largest series in the data with their forecasts and 80% ranges.
The largest series, each with its own forecast.

How accurate was it?

We hid the most recent stretch of history, forecast it using only what came before, and compared with what really happened. We did that 5 times, each time 7 days (168 hours) ahead, for every method below. The typical error is the share of actual volume the forecast missed by, added up across all 5 balancing authorities.

The selected method, an AI forecasting model that was not trained on this data, was off by 5.7% on average, against 7.2% for simply repeating the same hour the day before.

Typical error in testing, lower is better
MethodKindTypical errorActual inside 80% range
AI forecasting model SelectedAI5.7%73%
Theta methodClassic6.9%100%
Repeat last seasonSimple rule7.2%86%
Exponential smoothingClassic8.7%69%
Repeat the last valueSimple rule14.1%92%
Current forecastCurrent forecast3%n/a

The existing forecast was more accurate

The grid operators' own day-ahead forecast had 3% typical error, against 5.7% for ours. It is issued about a day ahead, while our test forecasts look up to 7 days ahead, so the comparison favors it.

Line chart comparing past forecasts with actual electricity demand (MW) over 5 test runs of 7 days (168 hours) each, made using only the data available at the time.
Back-testing: 5 times we hid the next 7 days (168 hours), forecast them, and compared with what happened.
Bar chart of the typical error of each forecasting method in testing. The selected method had 5.7% error; repeating the same hour the day before had 7.2%.
Typical error of each method in testing, as a share of actual volume. Lower is better.

Reality check on data no model saw

Before running anything, we set aside the final 839 hours of the data (from 2026-09-28). Nothing in the testing above or the method choice could see them. Here is how every method did on that stretch.

The selected method was the most accurate here too, with 7% error.

Typical error on the held-back 839 hours
MethodTypical error
AI forecasting model Selected7%
Theta method9%
Repeat last season9.9%
Exponential smoothing10.6%
Repeat the last value13.2%

The plan

Recommended: charge in low-load, low-price hours and discharge into the forecast peaks. Expected peak 81,562 MW instead of 83,562 MW without the battery. Expected value this week $7.14M, against $4.12M for a fixed daily schedule (charge 01:00 to 05:00, discharge 17:00 to 21:00).

Why this schedule: the highest hour of the week sets the capacity cost ($2,000 per MW), so the battery is saved for the hours the forecast says will be the peak, and charged when load and prices are low. A fixed daily schedule discharges every evening whether or not that is where the peak falls.

Expected outcome: peak cut by 2,000 MW (fixed schedule: 360 MW); savings versus no battery $7.14M.

Reality check: this plan was made as of Sep 28, 2026 without seeing later data. Replayed on what actually happened, it cost $158.67M against $160.10M for the rule of thumb: a measured saving of $1.43M (29%).

Chart of the recommended plan compared with a fixed daily schedule (charge 01:00 to 05:00, discharge 17:00 to 21:00), drawn against forecast demand and its range and actual demand.
One-week battery schedule for peak shaving in ERCOT: the recommended plan next to a fixed daily schedule (charge 01:00 to 05:00, discharge 17:00 to 21:00). Costs and limits are example values.

Plan against the rule of thumb

The rule of thumb here is a fixed daily schedule (charge 01:00 to 05:00, discharge 17:00 to 21:00). We compare both ways: the expected cost over many possible futures from the forecast, and a replay of both plans on what actually happened.

Extra value created by the plan, compared with a fixed daily schedule (charge 01:00 to 05:00, discharge 17:00 to 21:00) (example costs)
ComparisonDifferencePercent
Expected, over forecast scenarios$3.02M73.4%
Replayed on what actually happened$1.43M29.2%

For a battery, percentages are relative to the value the rule of thumb creates, not to the total energy bill.

Bar chart of total cost for the recommended plan and the rule of thumb, both expected over the forecast scenarios and replayed on the actual data. On the actual data the plan was $1.43M cheaper.
Total cost of the plan against the rule of thumb. Lower is better. Example costs.
What the plan assumed
InputValueWhere it came from
SeriesERCO (name)Example value
Power mw2,000 (MW)Example value
Energy mwh8,000 (MWh)Example value
Round trip efficiency0.87 (fraction)Example value
Capacity price2,000 ($/MW)Example value
Off peak price35 ($/MWh)Example value
Peak price120 ($/MWh)Example value
Peak hours16, 17, 18, 19, 20, 21 (local hours)Example value
TimezoneAmerica/Chicago (name)Example value
Degradation cost10 ($/MWh)Example value

What the engine noticed in the data

  • Forecast made as of Sep 28, 2026: 11,391 later rows were hidden from the models and used afterwards to check the forecast.
  • 47,837 rows had no value for electricity demand (MW); treated as missing.
  • Removed 111 rows with negative electricity demand (MW) (they look like errors).

Technical details

Data
U.S. EIA-930 Hourly Electric Grid Monitor - Balance files, United States. 5 balancing authorities, hourly, from 2026-05-31 to 2026-09-28.
How we prepared the data
Two 2026 half-year files (Jan to early Oct 2026). Keeps the 5 balancing authorities with the highest demand and the most recent 120 days (2,880 hours) of history. Uses UTC timestamps to avoid daylight-saving gaps and doubled hours. The authorities' own day-ahead forecast ('Demand Forecast (MW)') is scored as 'your current forecast'. Note that it is issued about a day ahead, while our test forecasts look up to 7 days ahead, so the comparison favors the day-ahead forecast. The last 7 days (Sep 28 to Oct 5, 2026, UTC) are hidden with as_of and used as the reality check. The battery example uses ERCO (Texas) only; timestamps are hour-ending UTC and are converted to Central time for the peak window. The battery size, prices and schedule rule are example values, not ERCOT tariffs.
Testing
5 rolling tests, each 7 days (168 hours) ahead. Selection metric: WAPE (weighted absolute percentage error, the "typical error" above). Also reported: MASE 1.28 for the selected method.
Methods
Chronos-2 (AI foundation model), Theta, Seasonal naive, Exponential smoothing (ETS), Naive (last value), Your current forecast.
Plan
One-week battery schedule for peak shaving in ERCOT. Optimization status: ok, solver: optimal.
Reproduce
The case folder, spec and outputs are in the 4castPlannr repository under cases/eia-930-hourly-demand/.

Data source and license

Source: U.S. Energy Information Administration, Form EIA-930 Hourly Electric Grid Monitor (accessed Oct 2026).

License: Public domain (U.S. Government work). Source: original data. The forecasts and charts on this page are derived from that data and carry the same attribution.

Have a decision like this?

This case is an example of energy and batteries for sites with batteries or demand charges. Send us your own export and question, and we will run the same tests on your data.