LucyTrade

Home/Blog/How to Backtest a Crypto Trading Strategy Without Fooling Yourself

How to Backtest a Crypto Trading Strategy Without Fooling Yourself

Oct 24, 2026, 6:49 PM UTC

How to Backtest a Crypto Trading Strategy Without Fooling Yourself

A backtest is a simulation of how a strategy would have performed on historical price data. Done well, it is the cheapest way to find out whether a trading idea has an edge. Done badly, it is the most convincing way to lose money, because it hands you a chart that goes up and to the right and a false sense of certainty.

This guide walks through the process and the traps.

Step 1: Write the rules down so a machine could follow them

A strategy you cannot describe precisely cannot be tested. "Buy dips in an uptrend" is not a strategy. "Buy when price closes above the 20 EMA after touching the 50 EMA, with the 200 EMA rising, on the 4-hour chart" is.

Every rule needs a condition for entry, a condition for exit in profit, a condition for exit at a loss, and any filters that must be true for the trade to be allowed. If you find yourself adding "unless it looks weak", stop and define what weak means.

Step 2: Get enough data and the right data

Test on the timeframe you will actually trade, and on enough history to include different market regimes. A strategy tested only on the 2024 bull run tells you nothing about how it behaves in a sideways grind or a sharp drawdown. Aim for data that covers at least one strong uptrend, one strong downtrend and one extended range.

Use candle data from the exchange you plan to trade on, because volume and wicks differ between venues. Make sure the data includes delisted or low-liquidity periods where relevant, since excluding them is a form of survivorship bias.

Step 3: Include costs

Every simulated trade should pay the real maker or taker fee, plus a slippage estimate. For liquid pairs on major exchanges, 0.05 to 0.1 percent per side is a reasonable starting assumption. For small-cap altcoins it can be far higher. A strategy that only works with zero fees is not a strategy.

Step 4: Look at the right numbers

Total return is the least useful metric because it depends on the period and on luck. Focus instead on:

Number of trades. Fewer than a hundred and you are reading noise.
Win rate and average win versus average loss, which together give expectancy per trade.
Maximum drawdown, the largest peak-to-trough loss. This is what you will actually have to sit through.
Profit factor, which is gross profit divided by gross loss. Above 1.5 is respectable; above 3 usually means something is wrong with the test.
Consistency across time. Split the results by quarter or by year. A strategy that made all its money in one month and bled the rest of the time is a lottery ticket.

Step 5: Hold back data you have never looked at

Divide your history into two parts. Build and tune the strategy on the first part only. Then run it once, with no changes, on the second part. If the results collapse, the strategy was fitted to the past rather than capturing something real. This is called out-of-sample testing, and skipping it is the single most common reason backtests disappoint in live trading.

The five mistakes that make bad strategies look good

Lookahead bias. Using information in the entry decision that would not have been available at the time, such as the candle's close while trading inside that candle, or an indicator that repaints.

Overfitting. Tuning parameters until the curve looks perfect. If your strategy needs the RSI period to be exactly 13 and falls apart at 12 or 14, it has learned the noise, not the market.

Ignoring the stop. A backtest that fills stops at the exact stop price in a fast market is optimistic. Real stops get slipped, especially in crypto on weekends and during news.

Cherry-picking the window. Starting the test the day before a big move, or ending it just before a big loss, is easy to do without noticing. Always test the full available history.

Too few trades. Thirty trades with a 70 percent win rate is a coin that landed heads a few times. Four hundred trades with a 55 percent win rate is evidence.

From backtest to live

Even a clean backtest is a hypothesis, not a guarantee. The next step is forward testing: run the strategy on live data without real money, or with a small size, for a few weeks. Compare the live results to the backtest. If they roughly match, scale up gradually. If they do not, the gap is telling you something the historical data could not.

← All articles