Up or Down About

Strategy backtest: S&P 500

Each model's prediction at today's close sets tomorrow's position (long or short). Returns are daily log returns over the test period (7 Jun 2021 to 24 Sep 2026), net of costs charged on every position change.

Verdict

0 of 7 strategies beat buy & hold on Sharpe ratio

With hindsight, the best on the test period is Extra Trees at 0.66 against 0.69 for buy & hold. Drag the cost slider to see how quickly turnover erodes any edge.

Risk and return

Annualised with 252 trading days. Sharpe and Sortino assume a zero risk-free rate; Calmar = annual return รท max drawdown.

StrategyTotal returnAnnual returnVolatilitySharpeSortinoMax drawdownCalmarHit rateTradesCosts
Extra Trees +78.2% +11.6% 16.7% 0.66 0.94 23.3% 0.50 53.5% 89 8.85%
Random Forest +69.4% +10.5% 16.7% 0.60 0.87 20.0% 0.52 52.2% 149 14.85%
SVM (RBF) +62.0% +9.6% 16.7% 0.55 0.77 24.4% 0.39 53.3% 67 6.65%
Logistic Regression +57.0% +8.9% 16.7% 0.51 0.75 18.8% 0.47 52.5% 175 17.45%
Bagging (KNN) +27.0% +4.6% 16.7% 0.27 0.39 28.8% 0.16 49.2% 442 44.15%
Linear SVC +13.0% +2.3% 16.7% 0.14 0.19 28.6% 0.08 50.8% 333 33.25%
Gradient Boosting +11.9% +2.2% 16.7% 0.13 0.18 26.0% 0.08 50.0% 395 39.45%
Buy & hold +83.1% +12.1% 16.7% 0.69 0.98 25.4% 0.48 53.5% 1 0.05%

Costs and risk

Would it survive real trading, and was the return worth the risk?

Takeaway With free trading, 4 of 7 strategies beat buy & hold on Sharpe; at 50 bp, none do. Extra Trees changed position 89 times in 1,332 trading days.

Takeaway In long/short mode every strategy is always fully invested (long or short), so they all carry the stock's volatility. Only the return differs.

Inside one strategy

Change the model with the "Detail model" selector