Skip to content
beta
RU Laboratory

A good-looking backtest is not a strategy yet.

kquant replays history the way the exchange trades, then tries to break the result: other periods, nearby settings, other coins, a synthetic market and honest re-optimisation. Whatever survives gets a score from 0 to 100.

The Laboratory interface is in Russian for now.

First, an honest backtest.

Without these five rules there’s nothing to test: robustness on a flawed backtest is just a robust mistake.

  • Decide on the close, trade on the next candle

    A signal sees only closed candles. The order fills at the next open — as in live trading, with no look-ahead.

  • Costs in every trade

    By default 0.05% fee and 0.05% slippage per side, plus funding whenever a position is held through a payment.

  • Stops inside the candle

    Stops and take-profits trigger on the candle’s high and low, not just on the close.

  • Point-in-time universe

    The factor portfolio uses the tokens that traded on that day, including ones delisted later. Otherwise the past looks better than it was.

  • No leverage

    Backtests and searches always run unlevered. Leverage is chosen only when launching on an exchange and never flatters the result.

Five attempts to break the result.

The checks run one after another after the backtest. Each answers its own question, and each can fail the strategy. The whole path from idea to launch is in “How to test a strategy”.

  1. 1Periods

    Does the rule work across different stretches of history? History is cut into windows. The strategy must earn in most of them, not in one lucky year.

  2. 2Parameter stability

    Is the setting itself a fluke? Each parameter moves one step either way. If the neighbours fail, you found a point, not a pattern.

  3. 3Other coins

    Is it a property of the market or of one coin? The same rule, unchanged, runs on tokens it was never tuned on.

  4. 4Synthetic paths

    Will the rule survive another path of the same market? Plausible versions of history with the same return properties. A strategy that lives on one price path sags here.

  5. 5Re-optimisation

    Would the search have found a working setting in advance? Parameters are tuned on one window and tested on the next, all the way through history. The closest thing to how the strategy will actually live.

Spike or plateau.

The second check in one picture. Move along the curve: at the spike the worst neighbour drops below zero, on the plateau it holds. A search always finds the spike; the check looks for the plateau.

parameter valuemove along the curve
At the point+115 Worst neighbour−12 Spike: one step away the result is gone

The score adds up from nine parts.

Five checks and four properties of the backtest itself, each with its own weight. Click a row to change its result.

49/100

Failed: Other coins. Capped at 49; without the cap it would be 90.

Illustration: weights and caps match the Laboratory. There each part is scored on a scale between thresholds; here it has three levels: full, half, zero.
  • One red check — 49 at most

    A pretty curve doesn’t outweigh a failed check.

  • Borderline or skipped — 74 at most

    What isn’t tested isn’t proven: a skipped part scores zero.

  • Significance

    The probability that Sharpe is above zero for real, given the length of history and the number of trades.

  • Trade bootstrap

    The strategy’s trades are reshuffled many times. The share of orderings that stay positive shows how much depends on a lucky sequence.

  • A high score is not a launch yet

    It means the strategy survived attempts to break it on history. Next comes simulation on the live market, and real trading stays a separate decision.

The more attempts, the higher the bar.

Try enough variants and the best one looks convincing even on pure noise. kquant counts every attempt — optimiser runs and edits to your formula — and asks the result to beat what luck alone would give.

2.30Sharpe of the best variant when none of them has any edge

A calculation, not an illustration: the expected maximum Sharpe among independent zero-return strategies (Bailey and López de Prado). The kquant optimiser deflates its best result by the same bar.

Test the idea while it still costs nothing.

Open the Laboratory

The Laboratory interface is in Russian for now.