Prediction cases: demand, pricing and the traps in each
CASE · Chapter 212 min readAsked at QuantCo, Two Sigma, Citadel, Point72
After this lesson you should be able to
- Work a demand-forecasting case from target to baseline.
- Recognise censoring and why it biases a demand model.
- Handle a pricing case where the price itself is endogenous.
Prediction cases look like modelling exercises and are really data-definition exercises. In every one of them the interesting difficulty is that the thing you can measure is not the thing you want to predict — you observe sales rather than demand, and prices that were set in response to the very demand you are modelling.
Proposition 2.1
Sales are not demand
If you sold out, you do not know how much more you could have sold. Observed sales are censored at the inventory level, so a model fitted to them systematically underestimates demand exactly on the days demand was highest — which are the days the forecast matters.
Holds when
- Flag stock-outs and treat those observations as censored rather than as observed demand.
- A censored regression (Tobit) or a survival model handles it properly; dropping the days does not.
- The bias is worst for the popular items, which is where the money is.
Example 2.2
Bike share
Forecast bike hires so a dispatcher can reposition bikes. Define the target and the baseline.
Show the worked solutionHide the worked solution
Worked solution
- Formula
- Substitute
- Solve
- Answer
Sanity check. The seasonal-naive baseline is formidable here: commuting patterns are extremely regular, so any model must beat "what happened at this station at this hour last Tuesday" before it has earned anything. Weather is the obvious first feature, and it is genuinely available as a forecast at prediction time.
| Feature | Available at prediction time? | Note |
|---|---|---|
| Hour, day of week, month | Yes | Encode cyclically, not as integers |
| Weather forecast | Yes | Use the forecast, not the realisation |
| Actual weather | No | Using it is look-ahead |
| Holidays and events | Yes | Known well in advance |
| Recent hires at this station | Yes, with a lag | Mind the reporting delay |
| Hires at nearby stations | Yes | Spatial structure is usually the biggest gain |
The rest of this lesson is in Premium
You have read the opening. 9 more sections follow, including 3 worked examples and 3 quick checks.
Nothing is charged for 7 days, and you can cancel before then. Or read The law of large numbers and the central limit theorem in full, free.