Intraday Volume Prediction With Gradient Boosting
Predicting how much of a stock will trade in the next few minutes is what lets an execution algorithm decide how much of an order to release right now, and gradient boosting is the workhorse model for turning the day's shape and today's surprises into that forecast.
Prerequisites: Gradient Boosting as Functional Gradient Descent
An execution algorithm trying to trade a large order without moving the price too much needs to know, minute by minute, how much of the stock is likely to trade — because releasing 5% of the day's volume into a 5-minute window that only sees 1% of the day's volume will move the price against you. Intraday volume prediction forecasts that minute-by-minute trading activity, and gradient boosting is the standard model for it because volume depends on a tangle of interacting, nonlinear effects — time of day, day of week, upcoming news — that boosted trees pick up without anyone hand-specifying the interactions.
The analogy: predicting foot traffic in a mall
A mall's foot traffic follows a predictable daily shape — quiet in the morning, a lunch peak, a bigger evening peak — but that shape is also nudged by the day of the week, whether there's a sale on, and the weather. Predicting today's 3pm foot traffic well means combining the typical shape for this time of day with today's specific evidence (is it unusually busy already this morning?). Intraday volume prediction does the same for trading volume: combine the stock's typical intraday shape with what today's morning volume is already signaling.
Worked example 1: the U-shaped baseline, adjusted
A stock's average historical volume curve is strongly U-shaped: the first 30 minutes and last 30 minutes of the trading day each average about 12% of daily volume, while the quiet mid-day stretch averages closer to 4% per half hour. That U-shape alone is a naive baseline forecast. Now suppose today's first hour already traded 18% of a typical day's total volume — 50% more than the historical 12% baseline for that hour. A gradient-boosted model, given features like volume so far today relative to historical-same-time average (here, ), day of week, and time until close, learns from historical data that an early-volume surge like this typically predicts elevated volume for the rest of the day too — say a further 20% lift over the plain U-shaped baseline for the remaining hours, rather than a reversion back to the historical average.
Worked example 2: why trees, not a single regression line
A linear model fitting volume against "minutes since open" alone cannot represent the U-shape without manually constructed features (a quadratic term, dummy variables for each half-hour bucket). A single decision tree of depth 3 splits on minutes-since-open first (separating the open, midday, and close regimes), then on day-of-week within each, then on today's-volume-so-far — recovering the U-shape and its interactions automatically. Gradient boosting improves on one tree by fitting hundreds of small trees in sequence, each correcting the previous ensemble's residual errors, so that a stock's idiosyncratic quirks (say, this particular name always spikes 10 minutes before close on options-expiry Fridays) get captured by later trees even though they are a small, specific pattern the first few trees miss.
Intraday volume prediction blends a stock's typical time-of-day shape with today's specific evidence, and gradient boosting is favored because it captures the nonlinear interactions between time-of-day, day-of-week, and today's-volume-so-far automatically, without anyone hand-engineering every combination.
What this means in practice
Execution algorithms feed these forecasts directly into scheduling: a volume-weighted-average-price (VWAP) strategy releases a share of the parent order proportional to predicted volume in each interval, so predicting today's volume shape correctly is inseparable from executing at a good price. Getting the forecast wrong in either direction is costly — under-predicting a volume surge means an order lingers too long and eats stale liquidity; over-predicting means the algorithm dumps too much size into a quiet window and pushes the price.
The common mistake is training the volume model on stale historical averages and forgetting that today's realized volume-so-far is by far the single most informative feature — a model that ignores it is really just forecasting yesterday's shape, not today's market. Equally, a model overfit to rare historical event days (a single earnings day with 10x normal volume) can wildly overpredict on an ordinary day, so event days need to be flagged as a feature, not silently pooled into the general training data.
Related concepts
Practice in interviews
Further reading
- Bialkowski, Darolles & Le Fol, Improving VWAP Strategies: A Dynamic Volume Approach (2008)