Backtest checker · open source

Is it real,
or is it luck?

TokIO tells you whether a strategy's profit is distinguishable from luck, once you allow for what a Sharpe ratio hides: P&L that isn't independent from bar to bar, and every variant you tried before this one. Every test it runs has a measured false-positive rate.

$ pip install tokio-ai
Verdict · SPY · 19 SMA crossovers Not significant
Best one, tested alonep .038
With the other 18p .12
Haircut Sharpe0.21
Prob. of overfitting0.90

Real daily SPY data. The in-sample winner did worse than a random pick out of sample in 90% of splits.

Your terminal.
With a skeptic built in.

Ask in plain English. The agent pulls the data, runs the test, and logs every attempt in the session ledger, so the ones that failed still count against the one that worked.

tokio · session Open the web terminal →
Tools check_backtest backtest_positions check_contracts vol_surface get_prices session_trials
youTry every SMA crossover from 10/30 to 50/200 on SPY. Does the best one work?
tokioRan 19 variants on daily SPY and checked them together.
VERDICT not significant after 19 variants best alone p 0.038 with the other 18 p 0.12 haircut Sharpe 0.21 prob. overfitting 0.90
›Ask about any ticker, signal or backtest…

Use it where you work.

01 · Python

In your notebook

Hand it a vectorbt Portfolio (a whole grid included), backtesting.py stats, or a P&L series.

import tokio_ai
print(tokio_ai.check_backtest(pf))
Open the Colab →
02 · AI assistants

In Claude Code

An MCP server: ask the assistant to test an idea and it checks the result before it tells you it works.

The plugin →
03 · TradingView

On your chart

Paste one Pine v6 script under any strategy and the verdict appears as a table on the chart. No export needed.

tokio_check.pine →
Calibration

We test the tester.

How often does each method call a strategy with no edge profitable? At p < 0.05 it should be 5%. We measured it, including on 20 years of real data, and published the table.

The full study, including what broke →
Best of 50 strategies · 20y, 10 real assets
t-test
83.5%
TokIO
4.2%
Overlapping 20-day trades · 20y, 10 real assets
t-test
30.5%
TokIO
5.4%
Overlapping 20-day trades · simulated
t-test
38%
TokIO
4–8%
Share of no-edge strategies called significant. Target: 5%.

What every result reports.

check_backtest()

Corrected for every try

A test of the mean that allows for serial dependence, corrected for every variant you tried (Romano-Wolf step-down).

DSR · PSR

Deflated Sharpe

The Deflated and Probabilistic Sharpe Ratios, as published and corrected for dependence, plus the minimum track record.

PBO

Overfitting odds

The probability of backtest overfitting (CSCV) for grids: how often the in-sample winner loses out of sample.

costs=

Costs and breakeven

Costs, turnover, and the transaction cost at which the edge disappears.

lookahead

Catches peeking

The Sharpe with every position taken one bar later. A cheating SPY strategy drops from 13.26 to −0.44.

robustness

Not one lucky stretch

Concentration with both tails trimmed, consistency across time, and the minimum backtest length.