Strategy backtest: Amazon
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
1 of 7 strategies beat buy & hold on Sharpe ratio
With hindsight, the best on the test period is SVM (RBF) at 0.50 against 0.24 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.
| Strategy | Total return | Annual return | Volatility | Sharpe | Sortino | Max drawdown | Calmar | Hit rate | Trades | Costs |
|---|---|---|---|---|---|---|---|---|---|---|
| SVM (RBF) | +157.4% | +19.6% | 35.7% | 0.50 | 0.72 | 45.5% | 0.43 | 51.0% | 252 | 25.15% |
| Random Forest | +30.0% | +5.1% | 35.8% | 0.14 | 0.20 | 52.6% | 0.10 | 50.6% | 171 | 17.05% |
| Extra Trees | +24.4% | +4.2% | 35.8% | 0.12 | 0.16 | 58.9% | 0.07 | 50.8% | 59 | 5.85% |
| Logistic Regression | +9.9% | +1.8% | 35.8% | 0.05 | 0.07 | 77.3% | 0.02 | 50.1% | 240 | 23.95% |
| Linear SVC | -6.0% | -1.2% | 35.8% | -0.03 | -0.05 | 78.1% | -0.01 | 49.5% | 236 | 23.55% |
| Bagging (KNN) | -6.6% | -1.3% | 35.8% | -0.04 | -0.05 | 46.4% | -0.03 | 48.2% | 541 | 54.05% |
| Gradient Boosting | -28.9% | -6.2% | 35.8% | -0.18 | -0.25 | 69.7% | -0.09 | 49.8% | 429 | 42.85% |
| Buy & hold | +56.1% | +8.8% | 35.8% | 0.24 | 0.34 | 56.1% | 0.16 | 50.9% | 1 | 0.05% |
Costs and risk
Would it survive real trading, and was the return worth the risk?
Takeaway With free trading, 2 of 7 strategies beat buy & hold on Sharpe; at 50 bp, none do. SVM (RBF) changed position 252 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