A return can be an input without being a forecast
Suppose a synthetic stock's prior close was USD 100 per share and its current close is USD 110. Both prices have been received and processed before the decision. Assume no distributions, splits or other corporate actions between these closes; use the same currency and share basis at both endpoints.
The trailing simple price-return feature is
An example target is the next session's open-to-close simple price return:
Both the next open and the next close occur after this decision. Their realised values are unknown then. The model may use the known 10% trailing return to forecast that future outcome. A positive input does not determine the forecast's sign, and neither input nor forecast guarantees a positive realised target.
Measured, engineered and fitted
These are useful distinctions within a feature pipeline, rather than mutually exclusive kinds of data:
| Stage | Example | What must be specified |
|---|---|---|
| Measured attribute | A received closing price or reported sector classification | Source, units, identity, version and usable time |
| Engineered feature | A trailing price return calculated from eligible closes | Formula, lookback, missing-data rule and price-adjustment basis |
| Fitted transformation | A return centred and scaled using estimated training statistics | Fitting sample, stored transformation state and update schedule |
A fixed trailing-return formula needs eligible observations but no fitted mean. Standardising that return using an estimated mean and scale adds learned state. Fit that state on the permitted training data and reuse it for the next evaluation or prediction block; estimating it from future test data introduces data leakage. In a time-ordered financial study, the training information must also have been available by its cutoff, including completed training targets. Merely placing a transformation inside a software pipeline does not choose a valid chronological split.
Define the row before choosing the columns
In a conventional tabular dataset, a row is a sample and a column is a feature. The sample might be an instrument at a decision instant, an order awaiting a fill, or a company at a filing release. Choose that unit first. “Volatility” is an incomplete feature name: whose volatility, over which past observations, using which estimator and annualisation convention, available when?
Useful feature documentation records the instrument identifier, measurement units, source vintage, usable timestamp, transformation and missingness policy. A missing earnings value is not automatically zero earnings. A revised filing is not the figure a trader saw before the revision. These choices can alter the economic meaning of the input even if its column name stays unchanged.
Sources
- Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani and Jonathan Taylor, An Introduction to Statistical Learning, with Applications in Python (Springer, 2023), §2.1, pp.15–17. Input features and response variables; the authors' website identifies the Python edition and provides the book.
- scikit-learn: Glossary—feature, checked 27 October 2026. Feature functions, feature values and their representation as columns.
- scikit-learn: Preprocessing data, checked 27 October 2026. Fitted centring and scaling and subsequent application.
- scikit-learn: Common pitfalls—data leakage, checked 27 October 2026. Training boundaries for preprocessing and feature selection.