GridCast

Data & methods

The machine learning, statistics and data engineering behind GridCast: the tools, how the data flows, how look-ahead leakage is prevented, and what the limitations are.

Skills & tools

Machine learning & regression

Gradient-boosted quantile regression with LightGBM; LASSO-regularised linear regression with scikit-learn (the LEAR benchmark); neural forecasters N-HiTS, PatchTST and TFT in PyTorch via neuralforecast, currently in validation.

Statistics & time series

SARIMAX with statsmodels; Diebold–Mariano and Giacomini–White tests with Holm correction; model confidence sets with arch; Chow and Kolmogorov–Smirnov tests, Hill tail-index estimates and change-point detection (ruptures, SciPy) for the market-redesign question.

Probabilistic prediction & evaluation

21-quantile forecasts; conformal prediction (CQR) for calibrated ranges; CRPS, pinball loss, mean absolute error and interval coverage; rolling-origin backtesting with scheduled refits; Optuna hyperparameter search on validation data only.

Data analysis & engineering

pandas and NumPy; DuckDB SQL over Apache Parquet; schema validation with Pandera; XML and CSV parsing with lxml; rate-limited API clients for IESO, Open-Meteo and Grid Status (httpx, gridstatusio); automated data-quality reports.

Research design

Questions, data splits and decision rules pre-registered before modelling; a test window sealed in code; placebo-calibrated break tests; look-ahead leakage tests with pytest and Hypothesis.

Engineering & deployment

Python 3.12 with uv, Ruff, mypy (strict) and pre-commit; GitHub Actions CI; an Azure Linux server running the hourly collector and the 9:00 forecast on systemd timers; this site in plain JavaScript with hand-built SVG charts on Cloudflare Workers.

Pipeline

Data flows from IESO reports, the price-history backfill and weather forecasts into raw storage, validated tables, point-in-time features, frozen models, a public forecast log and this site. IESO reportshourly, every version Price backfillGrid Status, 2025–26 WeatherOpen-Meteo past runs Raw fileskept unchanged 12 tablestyped, validated Featuresas of 9:00, D−1 Frozen model+ calibration Public log→ this site

No peeking at the future

Limitations

Sources & attribution