Skip to main content

Crate flexpool_forecast

Crate flexpool_forecast 

Source
Expand description

Probabilistic day-ahead price forecasts.

A Forecast gives, for every market time unit of a delivery day, the 10, 25, 50, 75 and 90 % quantiles of the price. Built-in Models are the seasonal baselines of electricity price forecasting — yesterday, last week, and their blend — each with intervals from the empirical quantiles of its own errors over the previous 28 days per local hour (split conformal).

Models read history only through a flexpool_sim::View fixed at the issue time, so a forecast can never use what was not yet known. score and Ladder measure forecasts with the pinball loss, interval coverage and skill against the weekly naive; the ladder backtests each day as of its own day-ahead gate (rolling origin).

f64 is allowed here (forecasting); nothing becomes a market quantity.

Structs§

DayScore
One model on one day.
Forecast
A probabilistic forecast for one delivery day.
Interval
One market time unit’s quantiles.
Ladder
Models ranked by quantile score over the last delivery days with known prices.
LadderRow
One model over the ladder’s window.

Enums§

Model
A built-in model.
NoForecast
Why no forecast can be made.

Constants§

LEVELS
The quantile levels every forecast carries.
REFERENCE
The reference model for skill.
WINDOW_DAYS
Days of errors the intervals are calibrated on.

Functions§

builtin
The built-in model’s forecast for day with market time unit minutes, from prices known in view (its instant is the issue time).
error_lag1
The lag-1 autocorrelation of model’s errors over its calibration window before day, as known in view, converted to a step of minutes (for an AR(1) process ρ per step scales as ρ^(step ÷ observed step), so hourly history serves quarter-hour days). Clipped to [0, 0.99]; None without enough history.
pinball
The pinball (quantile) loss of quantile q at level tau for the outcome y.
same_local_time
The instant days days before t at the same Berlin wall-clock time. Across a DST switch the elapsed offset is corrected; a local time that does not exist (the skipped spring hour) falls back one hour.
score
Scores forecast against the prices actual gives per interval start.