100 systematic trading strategies, each one coded from a published paper or a well-known practitioner rule, and backtested on real market data from January 2008 to November 2026. Every result is net of trading costs, and every number in this README comes from python run.py.
The goal is not to sell a "best strategy". It is to show, on one consistent test bench, how the classic ideas in quant finance hold up once you add costs, an out-of-sample period and a correction for trying 100 things at once.
| Strategies tested | 100 (10 families, 10 of them deliberate "control" rules) |
| Test period | Jan 2008 to Nov 2026 (in-sample 2008-2016, out-of-sample 2017-2026) |
| Beat SPY on Sharpe ratio | 37 of 100 |
| Beat SPY on annual return | 6 of 100 |
| Smaller worst drawdown than SPY | 97 of 100 |
| Still significant after correcting for 100 trials | 0 of 100 |
The honest headline: most rules do not beat buying and holding the S&P 500 on raw return. Many of them do cut the worst loss roughly in half for a similar Sharpe ratio, which is the real reason people use them. None of them clears the Deflated Sharpe bar of 0.95 once you account for the fact that 100 rules were tried. The best one gets to 0.905.
| Benchmark | CAGR | Sharpe | Max drawdown |
|---|---|---|---|
| SPY buy & hold | 10.9% | 0.55 | -51.9% |
| 60/40 SPY/IEF | 8.2% | 0.63 | -30.8% |
| CAGR | Sharpe | Max DD | Out-of-sample Sharpe | Sharpe if traded 1 day late | Deflated Sharpe | |
|---|---|---|---|---|---|---|
| 033 IBS mean reversion (SPY) | 11.7% | 0.76 | -26.1% | 0.76 | 0.44 | 0.70 |
| 050 VIX regime, defensive vs cyclical sectors | 11.7% | 0.66 | -39.1% | 0.75 | 0.63 | 0.53 |
| 059 Adaptive asset allocation | 10.4% | 0.94 | -18.0% | 0.70 | 0.91 | 0.91 |
033 IBS mean reversion. Buy SPY at the close when it closed near the low of its daily range (internal bar strength below 0.2) and sell when it closes near the high (above 0.8). It is in the market about a third of the time. Caveat: the signal uses the same day's high, low and close, so it needs a market-on-close order placed from a signal computed just before the bell. If you trade it one day late, the Sharpe drops from 0.76 to 0.44. It trades about 56 times a year, so it is sensitive to costs and taxes. Source: Pagonidis, "The IBS Effect", NAAIM 2014.
050 VIX regime sector tilt. Always 100% in equity sectors. Each week it holds defensive sectors (staples, utilities, health care) when the VIX is above its one-year median, and cyclical sectors (technology, consumer discretionary, industrials) when it is below. Caveat: this is mostly equity market exposure with a tilt, so the drawdown is still large (-39%). There is no primary paper behind the exact rule, and its in-sample Sharpe of 0.56 is about the same as SPY's.
059 Adaptive asset allocation. Each month, pick the top 5 of 10 asset-class ETFs by 6-month return, then weight them for minimum variance (no shorts). It has the best Sharpe (0.94) and the best Deflated Sharpe (0.905) of all 100 rules and the smallest drawdown of the three. Caveat: its Sharpe fell from 1.23 in-sample to 0.70 out-of-sample, so part of the early result was probably a bond tailwind. Source: Butler, Philbrick and Gordillo, "Adaptive Asset Allocation: A Primer", SSRN.
The ranking rule was written before any backtest (see SPEC.md). Candidates had to have a positive in-sample Sharpe, keep at least half of it out-of-sample, and have a smaller drawdown than SPY. They were then ranked by out-of-sample Sharpe, with at most one pick per family.
That rule picked 098, 033 and 050. One change was made after review, and it is disclosed here: 098 ("short-term trio") is a union of three rules that includes 033, and its daily returns correlate 0.91 with 033. It is a near-copy, not a separate idea. Its slot went to the candidate with the highest Deflated Sharpe, 059. You can see the mechanical result in the rule_top3 column of results/results.csv.
| Family | Strategies | Median Sharpe | Best Sharpe | Median CAGR |
|---|---|---|---|---|
| Volatility / VIX regime | 10 | 0.64 | 0.68 | 8.8% |
| Risk parity / allocation | 10 | 0.61 | 0.94 | 7.2% |
| Ensembles and combinations | 13 | 0.58 | 0.73 | 7.2% |
| Trend | 10 | 0.53 | 0.67 | 6.8% |
| Cross-sectional momentum / rotation | 10 | 0.50 | 0.69 | 7.8% |
| Carry / curve / macro proxy | 9 | 0.49 | 0.61 | 8.1% |
| Mean reversion | 10 | 0.43 | 0.76 | 4.4% |
| Breakout / channel | 9 | 0.32 | 0.64 | 3.3% |
| Time-series momentum | 10 | 0.31 | 0.65 | 3.1% |
| Seasonality / calendar | 9 | 0.22 | 0.58 | 3.8% |
Full table with every metric for all 100 rules: results/RESULTS.md.
- Data. Daily adjusted prices from Yahoo Finance for 24 ETFs: SPY QQQ IWM DIA EFA EEM, TLT IEF SHY LQD HYG TIP, GLD DBC VNQ and the nine SPDR sectors, plus the VIX and the 13-week T-bill rate. ETFs avoid the survivorship bias you get from testing on today's list of stocks. Data is downloaded on first run and not stored in this repo.
- Execution. Weights decided at the close of day t earn the return from close t to close t+1. Gross exposure is capped at 100% (no leverage). Shorts are allowed. Idle cash earns the T-bill rate.
- Costs. 5 basis points per unit of turnover, every trade.
- Out-of-sample split. 2008-2016 is in-sample, 2017-2026 is out-of-sample. Rules and parameters come from the original papers and were fixed in SPEC.md before the first run. Nothing was tuned on results.
- Lookahead test. Each strategy is run twice: on the full history and on history cut off at June 2015. Its weights up to the cut must be identical. All 100 pass.
- Late-execution test. Each strategy is also run with every trade one day late. A rule whose edge disappears with a one-day delay depends on precise timing, and you should know that before trading it. 89 of 100 keep at least half their Sharpe.
- Deflated Sharpe Ratio. If you test 100 rules, the best one looks good by luck alone. The DSR (Bailey and López de Prado, 2014) is the probability that a Sharpe ratio is real after accounting for the number of trials and for skew and fat tails. 0.95 is the usual bar.
What is not modelled: taxes, slippage beyond the flat 5 bps, the cost of rebalancing weight drift between signal dates, and the 15-minute gap between the VIX close (4:15 pm) and the ETF close (4:00 pm).
pip install -r requirements.txt
python tests/test_engine.py # hand-checked engine tests
python run.py # all 100 strategies, writes results/
python run.py --ids 30-40 # a subset, printed only
A full run takes a few minutes. The first run downloads about 20 years of prices.
Create strategies/s101_your_rule.py with NAME, FAMILY, SOURCE and a signal(d) function that returns a DataFrame of target weights (dates by tickers). d.close, d.open, d.high, d.low, d.volume are DataFrames, and d.vix and d.rf are Series. Use the helpers in strategies/lib.py and copy the shape of s001. The runner picks the file up and the lookahead test runs on it automatically.
engine.py data loading, backtest, statistics, lookahead test
run.py runs every strategy, ranks them, writes results/
report.py charts and markdown tables
strategies/ 100 strategy files and shared helpers (lib.py)
tests/ engine tests with hand-worked numbers
SPEC.md every rule, its parameters and its source, fixed before testing
results/ results.csv, RESULTS.md and the charts
Sister projects: Swing 10000, Day Trade 1000, 1000 intraday rules tested the same way.
This is research and education, not investment advice. Backtests are simulations: they are not live trading results and they do not predict future returns. Check everything yourself before you risk money.
MIT

