Skip to main content

flexpool_forecast/
lib.rs

1//! Probabilistic day-ahead price forecasts.
2//!
3//! A [`Forecast`] gives, for every market time unit of a delivery day, the 10, 25, 50, 75 and 90 %
4//! quantiles of the price. Built-in [`Model`]s are the seasonal baselines of electricity price
5//! forecasting — yesterday, last week, and their blend — each with intervals from the empirical
6//! quantiles of its own errors over the previous 28 days per local hour (split conformal).
7//!
8//! Models read history only through a [`flexpool_sim::View`] fixed at the issue time, so a forecast
9//! can never use what was not yet known. [`score`] and [`Ladder`] measure forecasts with the pinball
10//! loss, interval coverage and skill against the weekly naive; the ladder backtests each day as of
11//! its own day-ahead gate (rolling origin).
12//!
13//! `f64` is allowed here (forecasting); nothing becomes a market quantity.
14
15mod model;
16mod score;
17
18pub use model::{
19    Forecast, Interval, LEVELS, Model, NoForecast, WINDOW_DAYS, builtin, error_lag1,
20    same_local_time,
21};
22pub use score::{DayScore, Ladder, LadderRow, REFERENCE, pinball, score};