Skip to content
All library documents

Classifying S&P 500 Direction with Lagged Returns

Article QuantStart

Summary

The article introduces supervised binary classification for predicting whether the S&P 500 will rise or fall. It uses the first two lagged daily returns as predictors and compares logistic regression, linear discriminant analysis, and quadratic discriminant analysis. Logistic regression estimates class probabilities directly, while the discriminant methods model predictor distributions by class; LDA assumes shared class covariance, whereas QDA allows class-specific covariance. A historical SPY sample is split into earlier training data and a later test period.

The reported hit rates are modestly above an even directional guess for all three models, with logistic regression and LDA slightly ahead of QDA. The article cautions that the experiment lacks cross-validation, uses a limited historical period, and does not test trading execution or transaction costs. It also reports that forecasts generated from random draws achieved a seemingly favorable hit rate, illustrating why a hit rate alone does not establish predictive skill or economic value. The example is a teaching demonstration, not evidence of a deployable strategy.

Key ideas

  • The example classifies daily index direction using two lagged returns as predictors.
  • Logistic regression, LDA, and QDA differ in how they model class probabilities and predictor distributions.
  • The reported test hit rates are only modestly above chance and do not establish profitability.
  • The experiment omits cross-validation, broader historical testing, execution analysis, and transaction costs.
  • A random forecast can produce an apparently favorable hit rate, so statistical significance matters.

Tags

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