Skip to content
All library documents

Using Logistic Regression to Predict Return Direction

Article Quant Q&A · Author: Robert Kubrick

Summary

The document asks how to evaluate predictions of asset returns when matching the sign of each forecast to the realized return matters more than explaining return magnitude. It gives a small example where ordinary least squares has low explanatory power, while noting that an R-squared or F-statistic does not directly measure directional accuracy.

The proposed approach is to recast the task as classification: use the sign of the realized return as the dependent variable and fit a logistic regression. This makes the model focus on whether returns are positive or negative rather than on their size. The answer does not provide a fitted model, comparative results, or guidance on converting forecasts and inputs into a calibrated trading strategy. Its suggestion addresses direction alone and leaves magnitude, threshold selection, and out-of-sample performance for separate analysis.

Key ideas

  • Directional accuracy is distinct from the variance explained by a return regression.
  • Logistic regression can model the sign of realized returns as a classification target.
  • A sign-based target gives up information about return magnitude.
  • The suggested method does not establish profitability or out-of-sample predictive value.

Tags

Full text
# Linear regression and assets direction prediction


# Linear regression and assets direction prediction












I have the following asset returns Y and the predictions for the same periods Y':

```
Y = { 10, 200, -1000, -1, -7 }
Y' = { 1, 2, -3, -4, -5 }
```

The OLR R-squared for these 2 vectors is 0.11 and the F-statistic 0.39, so clearly the explained variance is not very high. However variance analysis does not show that all the predicitions in Y' matched the same return direction than Y. To capture this point I would have to run a separate study counting each (Yn, Y'n) pair that has the same sign.

Are there better ways to fit a model and optimize the IVs coefficients for return direction? Ideally I would like to fit a model that gives more weigth to assets direction, then variance.

## Answer by Tal Fishman (score 2, accepted)

https://quant.stackexchange.com/a/2629

It sounds like all you need is to run a logistic regression, with the sign of $Y$ as your dependent variable instead of $Y$ itself. This will only give weight to the sign of the variable, and not to the magnitude. Once you have reformulated your question in more general terms (sign and magnitude of $Y$, rather than direction and volatility), you may be able to get further help from Cross Validated.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.