Skip to content

Regression prediction

Apply a fitted model to a new input, track forecast timing and target units, and distinguish a point prediction from its later error and uncertainty interval.

A regression prediction is the numerical output of a fitted model for a quantitative target at supplied input values. A quant might predict the size of the next session's price change, rather than only whether it rises or falls. The output can feed an execution or risk decision, but its usefulness depends on what was knowable when the prediction was made and how it performs on later outcomes.

Write the operation as

y^∗=f^(x∗).\hat y_* = \hat f(x_*).
Here f^\hat f is the fitted prediction rule, x∗x_* is the query's feature vector, and y^∗\hat y_* is the resulting prediction. The model's estimated parameters determine the rule; the prediction is what the rule returns for this particular input. Different queries can produce different predictions without changing any parameters.
Linear regression is one way to produce regression predictions. Trees and other nonlinear models can produce them too. The distinction from classification is the target: a continuous price-change estimate has magnitude and units, while an up/down class label identifies a category. A classification probability is still a probability of a category, even though it is numerical.

A forecast with a clock and units

Consider a synthetic model that has already been fitted before a decision at the end of session tt. Its stipulated rule is
y^=1+2x.\hat y = 1 + 2x.
The input xx is a dimensionless feature available at that decision time. The target is the midquote change from the decision-time midquote to the end of the next session, expressed in basis points of the decision-time midquote. Thus the intercept is 1 bp and the slope is 2 bp per unit of xx. No transaction price, financing or trading costs enter this illustrative target.

At x=3x=3, the recorded prediction is

y^=1+2(3)=7 bp.\hat y = 1 + 2(3) = 7\text{ bp}.
The actual target is unknown at the decision. Suppose it later becomes observable as 8 bp. With the explicit convention actual minus prediction, the forecast error is
e=y−y^=8−7=1 bp,e2=1 bp2.e = y-\hat y = 8-7=1\text{ bp}, \qquad e^2=1\text{ bp}^2.

The positive sign means the model underpredicted the change. Reversing the error convention reverses the sign but leaves its square unchanged. The squared error has squared target units; it is not a 1% return or a probability of being wrong.

At dimensionless feature x equals 3, the stipulated line predicts 7 bp. The later actual is 8 bp, leaving an actual-minus-prediction error of positive 1 bp and squared error of 1 bp squared. A timeline separates the recorded forecast from the later outcome.
At dimensionless feature x equals 3, the stipulated line predicts 7 bp. The later actual is 8 bp, leaving an actual-minus-prediction error of positive 1 bp and squared error of 1 bp squared. A timeline separates the recorded forecast from the later outcome.
Original synthetic example. The filled point is the decision-time forecast; the hollow point is the subsequently observed target. The rule is stipulated rather than estimated from market data.
If the rule used next session's realised information to construct xx, the same arithmetic would no longer describe an available forecast. Training labels must also have become observable before fitting. These are safeguards against look-ahead bias, including leakage through preprocessing fitted using future data.

A number is not an uncertainty interval

A point prediction gives one value. When the objective is expected squared error, the ideal population prediction is the conditional expectation of the target given the inputs. A fitted model only estimates that relationship; neither its form nor its training objective guarantees that it has recovered it.
A confidence interval for the conditional mean quantifies uncertainty about that mean under stated assumptions. A prediction interval for a new outcome must also account for variation around the mean. The number 7 bp supplies neither interval. The NIST prediction discussion explains this distinction between estimating a regression relationship and predicting a new measurement.

Evaluate the predictions you could actually have made

The single error above illustrates calculation, not empirical forecasting skill. Evaluate a sequence of predictions recorded before their outcomes, with the target horizon, input availability and error units fixed. Use an appropriate baseline and held-out evaluation; fitting, feature selection and tuning must not use the evaluation outcomes. Low training error can reflect overfitting.
For the model-to-prediction workflow, The Supervised Learning Problem and the ML Pipeline develops quantitative targets, fitted rules, prediction and held-out mean squared error. Its public preview is available; the full lesson requires membership. Financial forecasting additionally needs chronological splits that respect when both features and labels become available.

Sources

  • James, Witten, Hastie and Tibshirani, An Introduction to Statistical Learning with Applications in R, second edition (2021), §§2.1.1, 2.1.5 and 2.2.1; §3.2.2, “Four: Predictions,” pp. 81–82. Author site and free book.
  • NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.3.2: Prediction.
Last updated
  • regression
  • prediction
  • forecast error
  • machine learning
  • data timing
← Back to the glossaryBack to top ↑