Day-ahead price forecasting × constrained optimization

Energy-Storage Revenue Optimization: From Price Forecast to Daily Schedule

Forecast accuracy and decision value must be evaluated separately.

Period
—
Scale
~35,000 fifteen-minute observations
Role
Three-person team lead
Core stack
Python · scikit-learn · XGBoost · pandas

TL;DR

Problem
Each day offers at most one complete arbitrage cycle: charge continuously for two hours, then discharge continuously for two hours. The challenge is not to find one lowest and one highest point, but to choose a legal and robust pair of windows from the full price curve.
Core approach
Configuration-driven offline training and inference from raw market and weather inputs to daily forecasts.
Result / limit
The final plan uses an explicit three-column contract—time, predicted price and power—with separate diagnostics for forecast and decision quality.

Story opening

A daily forecast only matters when it picks a legal operating window

Each day offers at most one complete arbitrage cycle: charge continuously for two hours, then discharge continuously for two hours. The challenge is not to find one lowest and one highest point, but to choose a legal and robust pair of windows from the full price curve.

Every day is divided into 96 fifteen-minute intervals. Forecast load, wind, solar, intertie, hydropower and non-market generation are combined with numerical weather predictions to estimate the next day's real-time price curve. The output pairs time and predicted price with the battery power plan.

Illustrative 96-point price curve with an earlier eight-point charging window and a later eight-point discharging window.① charge window② discharge window
Illustrative, non-project data generated from a fixed seed: the legal action is an earlier eight-point charging window followed by a later eight-point discharging window.

System path

Keep price prediction and scheduling connected, but inspectable

Illustrative system path connecting aligned inputs, a forecast curve, dual evaluation and legal schedule windows.① Align② Forecast③ Evaluate④ Schedule
The path preserves the distinction between predicting a 96-point curve and selecting two legal windows from it.
  1. ① Align

    Join complete market days with weather forecasts, keeping time zones and feature availability explicit.

  2. ② Forecast

    Compare chronological price-curve candidates without allowing future-derived state into a validation fold.

  3. ③ Evaluate

    Read price error alongside the value and stability of the resulting charge/discharge choice.

  4. ④ Schedule

    Enumerate legal charge-before-discharge windows and validate the time, predicted-price and power output.

What was implemented

A checkable output contract

The final plan keeps time, predicted price and power in an explicit three-column contract so forecasting diagnostics and operating decisions can be inspected separately.

Lower RMSE

Illustrative comparison: a lower-RMSE price forecast selects the wrong windows, while a higher-RMSE forecast selects the intended windows.① wrong windows

Higher RMSE

Illustrative comparison: a lower-RMSE price forecast selects the wrong windows, while a higher-RMSE forecast selects the intended windows.② right windows
Illustrative, non-project data generated from a fixed seed: forecast accuracy and decision value must be evaluated separately.

The price curve reflects a system, not a single generator

Wind turbines across a northern grassland with high-voltage transmission lines under changing cloud cover.A utility-scale solar farm, substation and transmission network beneath broken cloud cover.Thermal generation context

Wind, solar and conventional generation are contextual inputs to the price curve; the images are source-attributed context, not project evidence.

Sources & scope

Scope

Project scope: an offline study for a simplified intraday storage task. The policy selects at most one fixed two-hour charging window and one two-hour discharging window per day. Battery efficiency, degradation cost, trading fees, cross-day state of charge and live market execution are outside this case study.