Choosing What to Forecast
"Predict the stock" isn't a target — a forecast needs a precise, defensible choice of what quantity, over what window, measured against what baseline, and that choice shapes every downstream modelling decision.
Prerequisites: Framing a Research Question
"Build a model to predict the stock" sounds like a task, but it isn't one yet — it's missing the one decision that determines almost everything downstream: what, exactly, is being predicted. Price level, return, direction, volatility, and rank within a universe are all defensible targets for the same underlying question, and they lead to different data pipelines, different models, and different definitions of success.
The target is a design decision, not an afterthought
Predicting a raw price level is rarely useful and almost never done — prices aren't stationary, so a model trained on one price range fails silently on another. Predicting a return over a fixed horizon is the standard choice, but even "return" branches: total return or price return, arithmetic or log, raw or in excess of a benchmark. Predicting a rank — will this name be in the top or bottom half of the universe next period — throws away magnitude information but can be more robust when the signal's edge is really about relative ordering rather than precise sizing. Predicting volatility or another risk quantity is a completely different problem from predicting direction, with different natural loss functions and different uses downstream.
Each choice should trace back to what the forecast is for. A rank-based target suits a long-short strategy that only cares about relative ordering across the book. A magnitude-based target suits a strategy that sizes positions in proportion to forecast strength. Choosing the target after building the model, rather than before, is a common and expensive way to discover the model was solving the wrong problem.
Pick the target by asking what decision the forecast feeds, not by asking what's easiest to predict. A well-fit model of the wrong target is still the wrong target.
A worked example
A researcher is asked to "predict which names will do well next month." Framing A predicts next-month raw return for each name individually — useful if positions will be sized in proportion to the forecast, but sensitive to a handful of extreme outliers dominating the loss function during training. Framing B predicts next-month cross-sectional rank instead — less sensitive to outliers, and a natural fit if the eventual strategy only trades a long-short decile spread, but it throws away information about how much better the top names are expected to do than the middle. The right choice depends entirely on whether the downstream portfolio construction sizes positions by forecast magnitude (favouring A) or just sorts into buckets (favouring B) — a question worth answering before any model is trained, not after.
Write the target definition as a single unambiguous sentence — "log return over the next 20 trading days, in excess of the sector, winsorized at the 1st/99th percentile" — before writing a line of modelling code.
Related concepts
Practice in interviews
Further reading
- Grinold & Kahn, Active Portfolio Management (ch. 3, forecasting)