DeepAR Gas Forecasting
Sole developer · 2024–2025
Problem
The winter storm of 2024 gave Knoxville its longest consecutive stretch of heavy snow accumulation on record: seven days with four or more inches on the ground. KUB needed a 10-year gas demand forecast to support a $300M infrastructure decision about whether to build additional pipeline capacity to supply residential and industrial customers. The planning team had a single point estimate with no sense of how wrong it might be. They were weighing a major capital commitment without any visibility into the range of possible futures. The goal was threefold: produce an accurate probabilistic forecast, build a dashboard that made the model outputs accessible to non-technical executives, and create a what-if scenario tool so the gas reads team could model demand under different industrial customer configurations.
System Design
I chose DeepAR over Prophet, Polynomial Regression, and a manually configured neural network for two specific reasons. First, it outputs a full probability distribution rather than a single point estimate, producing P10/P50/P90 forecast bands without additional modeling work. Second, its autoregressive structure feeds each prediction forward as input to the next, making it naturally adaptive to demand shifts rather than assuming historical patterns stay fixed.
Weather drives gas demand more than almost any other variable. HDD and CDD covariates, along with wind and precipitation, were included so climate variability gets baked into the forecast range rather than treated as a fixed assumption.
At inference, DeepAR samples multiple trajectories from the learned distribution. This is what produces the probability bands. Each trajectory represents a plausible 10-year demand path given the model's uncertainty, and the P10/P50/P90 bands aggregate those trajectories into actionable planning thresholds.
What I Built
The system trained on roughly 20 years of historical gas demand data with holiday, day-of-week, and weather covariates fed into a DeepAR global model. A Streamlit dashboard compared all four models side by side so executives could see how each approach handled uncertainty and interrogate the assumptions directly without touching code. A what-if scenario tool let the gas reads team toggle individual industrial customers on and off to see how curtailing large accounts would shift the demand curve during peak events.
Architecture
~20 years historical gas demand data + Holiday / day-of-week / HDD-CDD covariates / Weather → Monte Carlo trajectory sampling at inference → Probabilistic forecast bands: P10 / P50 / P90 → 4-model comparison dashboard (Streamlit)
Results
KUB's critical planning threshold was 157,000 dekatherms per day. The model predicted demand would exceed that threshold roughly four times every two years over the 10-year horizon, less frequently than the original planning assumptions expected. That exceedance rate made the surcharge model viable at roughly $20M over 10 years: charging large industrial customers during peak demand events rather than building permanent capacity. Against a $300M pipeline build, the probabilistic analysis made the case for delaying construction clearly and quantifiably. That was a meaningful directional shift on the largest infrastructure decision KUB had faced in years.
Stack
Next Project
Market Signal Extraction→