All That Glitters Is Not Gold
Citation. Thomas Wiecki, Andrew Campbell, Justin Lent and Jessica Stauth (all Quantopian Inc). "All that glitters is not gold: Comparing backtest and out-of-sample performance on a large cohort of trading algorithms." Working paper, SSRN 2745220, 9 March 2016. Preprint, no venue given. No code or data: the algorithms' source code is private under Quantopian's terms, and Quantopian closed in 2020. The authors worked for Quantopian, whose CEO "generously" supported the work. DataRobot gave them access to its platform.
Status. Planned. #7's trial ledger records what this paper could only approximate: how much each strategy was backtested before it was chosen. No code in the repo uses the paper yet.
Read. Read on 2026-11-27. SSRN refuses automated fetches, so I read the authors' PDF of 9 March 2016 as the MQL5 forum hosts it (c.mql5.com), 19 pages. Each page carries the SSRN 2745220 footer. I extracted the whole text with pdftotext and read it, including the appendix's feature list. I saw Figures 1 to 6 only as captions. The data are not public, so I recomputed nothing beyond the arithmetic in the text.
Summary
Claim. A backtest's Sharpe ratio barely predicts the same strategy's Sharpe ratio out of sample. Volatility and maximum drawdown persist much better. The more a strategy's author backtested it, the larger the gap between in-sample and out-of-sample Sharpe ratios. A non-linear model on 57 backtest features predicts out-of-sample Sharpe ratios better than any one metric.
Method.
- The data. 7,152 U.S. equity algorithms from Quantopian users, filtered to 888. The filters drop single-stock strategies, a Sharpe ratio below −1.0, and backtests shorter than 500 days. They also drop strategies invested on less than 80% of days, features more than 4 standard deviations from the mean, and clones.
- In and out of sample. Each algorithm's code is time-stamped. The authors wrote all 888 between January and June 2015. The period before deployment is in sample, and the period after is out of sample. Zipline simulates both from 2010 to the end of 2015, with costs and slippage, on minute bars.
- The measure of effort. "user_backtest_days", the total number of days over all the backtests the author ran before deployment, log-transformed.
- The analysis. Linear regressions of each out-of-sample metric on its in-sample value. Then random forests, gradient boosting and DataRobot models on 57 features, with 5-fold cross-validation and a 20% hold-out set. Then a portfolio of the 10 hold-out algorithms with the highest predicted Sharpe ratio. It is compared with 1,000 random portfolios of 10, and with the 10 highest in-sample Sharpe ratios.
Findings, as the source reports them.
| Setting | Number | Value |
|---|---|---|
| Last in-sample year against the earlier in-sample period | Sharpe ratio, Pearson R² | 0.21 |
| In sample against out of sample | annual return, Pearson R² | 0.015, negative |
| The same | Sharpe ratio, Pearson R² | 0.02 |
| The same, last in-sample year only | Sharpe ratio, Pearson R² | 0.05 |
| The same | Sortino ratio, Pearson R² | 0.02 |
| The same | information ratio, Calmar ratio, alpha | R² below 0.005, not significant |
| In-sample tail ratio against out-of-sample Sharpe ratio | Pearson R² | 0.025 |
| In sample against out of sample | annual volatility, Pearson R² | 0.67 |
| The same | maximum drawdown, Pearson R² | 0.34 |
| log(backtest days) against Sharpe shortfall (IS − OOS) | Spearman R² | 0.017, p < 0.0001 |
| Turnover in a regression on Sharpe shortfall | p | 0.074 |
| Hedged against unhedged strategies | t for lower volatility, in and out of sample | 5.78 and 4.62 |
| Extra Trees on all features | Pearson R², cross-validation and hold-out | 0.18 and 0.17 |
| Top 10 by predicted Sharpe ratio | OOS Sharpe ratio | 1.8 |
| The same | share of random portfolios beaten | 99% |
| Top 10 by in-sample Sharpe ratio | OOS Sharpe ratio | 0.7 |
| The same | share of random portfolios beaten | 92.16% |
Where the claims go beyond the evidence
The out-of-sample period is short and is one regime. It runs from mid-2015 to early 2016, about 6 to 8 months. The authors call it "flat-to-bear" with medium-to-high volatility, after an in-sample bull market. One regime change can explain the negative correlation of returns. The market-neutral subset helps, but the paper reports no numbers for it.
"Out of sample" is a simulation. Zipline simulates the out-of-sample period with the same engine. The trades are not live, so the paper's results measure overfitting, not live costs or capacity.
The filters may use the out-of-sample period. The paper drops strategies with a Sharpe ratio below −1.0 and outliers on any feature. It doesn't say whether these use only in-sample data. If not, the sample is selected on the test period.
Backtest days are not the number of trials. The proxy counts days over all backtests, not distinct configurations. A long backtest and many short ones give the same count. The effect is real but small: R² = 0.017.
One portfolio, one period. The 99% result is one portfolio of 10 algorithms from a hold-out set of about 178. The paper gives no interval. The authors also say the model "might learn to predict which strategy type worked well" in that period only.
Inconsistencies in the text.
- The portfolio's Sharpe ratio is 1.8 in the Results and 1.2 in the Discussion.
- Figure 1's caption says "None of the performance metrics show a significant correlation". The text reports significant correlations for annual returns, the Sharpe ratio and the Sortino ratio.
- The best model is Extra Trees. The feature importances and the portfolio come from a random forest.
- The text cites "figure 3" for the backtest-days result, which is Figure 4.
- The abstract calls volatility and maximum drawdown "higher order moments".
- The Discussion gives "R² < 0.25" as the overall predictability, against 0.17 in the Results.
- The appendix defines the Sortino ratio as mean / std(returns < 0), not as a downside deviation against a target. It defines mean_hedge_ratio as a median.
Credit. The authors state that their quants are not all professionals, that the time periods overlap, and that the model may only fit one period. They suggest calibrating a backtest penalty, such as the deflated Sharpe ratio, from data like theirs.
Use in this repo
The ledger must count effort directly. The paper had to approximate the search by backtest days. #7 can record each run, each configuration and each revision of a strategy, including the agents' own reruns. The DSR, PBO and haircut reviews need the same count (docs/literature/deflated-sharpe-ratio.md).
Persistent metrics deserve weight. Volatility (R² = 0.67) and drawdown (R² = 0.34) carry over from backtest to forward period, and the Sharpe ratio (R² = 0.02) doesn't. The harness (#87) can trust a backtest's risk metrics more than its return metrics. The verdict (#12) shouldn't rank candidates by backtest Sharpe ratio alone.
Forward evidence matters more than the backtest. Even the same in-sample data split in two gives only R² = 0.21. That ceiling supports RQ1's Phase 3, paper trading on Modal, and RQ5 (#32) on how long it must run. The authors' own rule is at least 6 months of out-of-sample data.
Don't copy the classifier. An R² of 0.17 from one period and one portfolio is not evidence for an ML selector. The repo's strategies also span markets that Quantopian didn't cover.
#5 overstates this source slightly. Its summary says backtest Sharpe "barely predicts live results". The paper's out-of-sample results are simulated, not live.
A question for the maintainer. Should the verdict (#12) penalise a strategy for the number of runs in the ledger, as the authors suggest calibrating, or leave that to DSR?