Up or Down About

Model comparison: S&P 500

Trained on 5327 days (Apr 2000 to Jun 2021) and tested on the following 1332 days (Jun 2021 to Sep 2026). Every pipeline scales (and optionally applies PCA) inside each time-series fold.

Verdict

2 of 7 models beat the best naive guess

That guess is to always predict "up", which scores 53.5% test accuracy. The best ROC AUC is 0.500 (Bagging (KNN)); 0.5 means no better than chance. Daily direction is close to a coin flip, and these results reflect that honestly.

Test-set metrics

Will tomorrow's close be higher? CV figures are the mean ± std over expanding-window folds of the training period. Test figures come from the same fitted pipeline that is backtested.

ModelCV accuracyCV AUCTest accuracyPrecisionRecallF1ROC AUCvs naiveTuned params
Bagging (KNN) 51.0% ± 1.9% 0.508 51.1% 53.3% 70.1% 0.606 0.500 below defaults
Gradient Boosting 51.4% ± 1.9% 0.510 51.2% 53.3% 71.9% 0.612 0.499 below max_depth=5
SVM (RBF) 52.7% ± 4.0% 0.513 53.7% 53.8% 96.4% 0.690 0.495 above C=0.3
Linear SVC 52.1% ± 2.5% 0.509 52.2% 53.4% 83.6% 0.652 0.493 below defaults
Random Forest 52.3% ± 3.8% 0.530 52.9% 53.7% 87.7% 0.666 0.492 below max_depth=3
Extra Trees 53.1% ± 3.4% 0.521 53.9% 54.0% 94.7% 0.687 0.491 above defaults
Logistic Regression 52.1% ± 4.2% 0.522 53.1% 53.6% 91.3% 0.676 0.487 below C=0.01
Always up (baseline) –– 53.5%53.5%100.0%0.6970.500

Training period

How models scored during time-series cross-validation

Takeaway 7 of 7 models swing between beating and losing to a coin flip across folds, so their average CV score hides a lot of instability.

Test period

Unseen data: can the models rank up days above down days, and does any edge persist?

Takeaway Share of the test period each model spent above 50% (rolling 63 days): Logistic Regression 71%, SVM (RBF) 70%, Linear SVC 61%, Random Forest 66%, Extra Trees 74%, Bagging (KNN) 57%, Gradient Boosting 59%.

Walk-forward check

Would the result hold up if each model were refitted as new data arrived?

Takeaway Refitting 22 times changed test AUC by -0.003 on average (range -0.007 to +0.007). With 1,332 test days the 95% interval is about ±0.031 wide, so none of 7 models trained once and none walk-forward are reliably better than a coin flip.

Method The models above are fitted once on the training period. Walk-forward keeps the same tuned settings but refits every 63 trading days (22 times) on all earlier days, then predicts only the next block. The backtest still uses the model trained once.

Inside Bagging (KNN)

Pick another model from the selector or the table above

Takeaway Bagging (KNN) has a test ROC AUC of 0.500: pick a random up day and a random down day, and it ranks the up day higher 50% of the time (50% = guessing).

Method Permutation importance is measured on the last validation fold of the training period, never on the test set. It's always reported for the original named features, even for PCA pipelines.