Backtest playground

Pick a coin and a rule, run it on real Binance futures history, and check it against luck.

Blue: the rule. Grey: simply holding. Signals use closed candles only and trades happen at the next open. Fees are charged on every entry and exit.

Last trades

Backtest playground: test a simple trading rule against luck on real futures data

The playground lets you pick a Binance USD-M futures coin, a timeframe and one of three classic rules, run it on up to 6000 candles of real history and see the equity curve next to simply holding the coin. The three rules are a moving-average cross, a channel (Donchian) breakout and an RSI mean-reversion rule. You can allow shorts, add an ATR-based stop and set the fee per side. Everything runs in your browser; nothing is saved and no account or exchange key is needed.

The engine is deliberately strict. A signal uses only candles that have closed, and the position changes at the next candle open, so there is no look-ahead. A fee is charged on every entry and exit. If a candle could hit both the stop and a normal exit, the stop is assumed to hit first. Only one position is held at a time.

Why the page compares the rule with random timing

Most rules look good on some coin in some period. To separate skill from luck, the page repeats the same number of trades, with the same holding lengths and the same long/short mix, at random times 300 times, and tells you what share of those random runs the rule beat. A rule that beats less than about 95% of random runs is not distinguishable from chance. The page also splits the history into two halves, because a rule that works only in one half has probably been fitted to that half.

Trying many settings until one looks good is the main way traders fool themselves; every extra setting you try makes a lucky result more likely. Our own tests of simple rules on this site found few that held up after fees. Use the playground to learn that discipline, and treat a good-looking result as a hypothesis to test on other coins and periods, not as a strategy.

Questions and answers

Is a profitable backtest a promise of future profit?

No. It shows what a rule would have done on past data. Overfitting, a lucky period and a single coin can all produce a good-looking result that does not repeat.

What does "beat X% of random runs" mean?

The same number of trades with the same holding times is placed at random moments 300 times. The share shows how often the real rule did better than blind timing.

Does it include fees?

Yes. The fee per side is charged on every entry and exit. Funding payments and slippage are not included, so real results are usually a little worse.