Luck Adjusted.

Methodology · rules v1

How every number is calculated.

The whole idea: a backtest is usually the best of many tries, and the best of many tries looks good by chance alone. So every result here is measured against what that much searching would produce from pure noise. All of it is open source and runs in your browser.

The verdict

Real edge
All of: luck adjusted p value below 0.05; beat at least 95% of random versions; the record is long enough; the most recent 30% of the record is still profitable.
Probably luck
Any of: luck adjusted p value of 0.2 or more; beat fewer than 80% of random versions; the most recent part of the record lost money.
Can't tell yet
Everything else, and any record with fewer than 30 trades or days.

Thresholds are versioned (rules v1), so an old report can always be reproduced. Every report shows its rules version and random seed.

Sharpe ratio

Average daily result divided by how much it swings from day to day, scaled to a year. Days without trades count as zero, otherwise the ratio is inflated.

SR = mean(daily P&L) / stdev(daily P&L) × √(trading days per year)

Source: Sharpe (1966). Trading days per year: 252 stocks and futures, 260 forex, 365 crypto.

Code: stats/sharpe.py

Probabilistic Sharpe Ratio

The chance that the true Sharpe is above zero, given how many days you have and how lopsided and fat tailed the results are. Rare big losses lower it.

PSR = Φ( (SR − 0) √(n − 1) / √(1 − skew·SR + (kurtosis − 1)/4 · SR²) )

Source: Bailey and López de Prado (2012), The Sharpe Ratio Efficient Frontier.

Code: stats/sharpe.py

Deflated Sharpe Ratio (the luck correction)

The same chance, but measured against the best Sharpe you would expect from the luckiest of all the versions you tried, if none of them had any edge. More versions tried means a higher bar.

Bar = √V × ((1 − γ) Φ⁻¹(1 − 1/N) + γ Φ⁻¹(1 − 1/(N e))), DSR = PSR measured against the bar

Source: Bailey and López de Prado (2014), The Deflated Sharpe Ratio. Matches the paper's worked example exactly (0.9004).

Limits: V, the spread of the trial Sharpe ratios, is usually unknown; we use 1/(n − 1), what pure noise would produce. Trials that were very similar to each other count as fewer independent tries, which this treats conservatively.

Code: stats/sharpe.py

How many more trades are needed

How long the record must be before the edge would clear the 95% bar, at the Sharpe you have now.

MinTRL = 1 + (1 − skew·SR + (kurtosis − 1)/4 · SR²) × (1.645 / SR)²

Source: Bailey and López de Prado (2012).

Code: stats/sharpe.py

What to expect live

The Sharpe ratio left after a correction for multiple testing. We compute three standard corrections (Bonferroni, Holm, BHY) and show the middle one.

Source: Harvey and Liu (2015), Backtesting. Multiple testing adjustments checked against statsmodels.

Limits: When only the number of versions is known, your strategy is treated as the best of them, which is what picking a winner means.

Code: stats/haircut.py

Random strategy benchmark

Thousands of random strategies trade the same price file, entering at the same times of day, holding just as long, with the same long and short mix, sizes and costs. Your percentile says how many of them you beat.

Source: A placebo test in the spirit of White's Reality Check (2000).

Limits: Random trades may overlap each other. Without a price file a weaker fallback is used: your own trades with randomly flipped signs.

Code: engine/monkey.py

Ranges (stationary bootstrap)

Your trades are reshuffled in blocks thousands of times to see how much the Sharpe ratio, worst drawdown and profit factor could have varied. Blocks keep streaks intact.

Source: Politis and Romano (1994); block length by Politis and White (2004), checked against the arch library.

Code: stats/bootstrap.py

Account survival and prop firm pass rates

Your trading days are replayed in random order under the account's real rules: profit target, max loss (fixed, end of day trailing or intraday trailing), daily loss limit, consistency rule, minimum days, fees. Then again with every trade shifted down so the average matches what to expect live.

Source: Rules from each firm's own pages, with the date checked shown on the Accounts page.

Limits: Days are drawn independently. Intraday trailing drawdown follows closed trades, not open trade swings. A consistency rule is read as best day at most X% of total profit when passing.

Code: account/sim.py

How often a real edge is detected

Simulated strategies with a true edge, 60 runs each. Share that got Real edge:

True SharpeYears1 version10100
1.0242%7%0%
1.0453%10%2%
2.0287%30%13%
2.0498%82%48%
3.0297%85%47%
3.04100%100%90%

A good strategy picked from ten or more versions rarely proves itself within two years. That is not the tool being harsh; the data cannot yet tell it apart from the luckiest of the versions tried.

Ready? Check a backtest.