Backtesting · 9 min read

How to Backtest a Crypto Strategy (Step-by-Step)

Crypto is one of the friendliest markets to backtest. It trades 24/7, the data is abundant and free from public exchange APIs, and volatility means you get plenty of trades in a short window. But those same traits hide traps: no session boundaries, fees that compound brutally on high-frequency systems, and regimes that flip from euphoric trend to dead chop within weeks.

This guide walks through backtesting a crypto strategy step by step — and uses real numbers from our own published BTC and ETH research, where the honest answer was that none of the baselines we tested made money after costs.

Step 1 — Pick the coin and the timeframe deliberately

Start with a deep, liquid pair like BTC/USDT or ETH/USDT. The majors have tight spreads and clean tape, so your results reflect the strategy rather than a thin order book. Exotic alts can swing your fills wildly and make a backtest meaningless.

Match the timeframe to how you actually trade. A 1-minute scalping idea behaves nothing like a 1-hour swing system, and the fee math punishes the fast one far harder — a point we will return to.

  • Liquid majors first: BTC/USDT, ETH/USDT — clean data, realistic fills.
  • Test on the timeframe you trade, not whatever is convenient.
  • Span more than one regime: trend, chop and a sharp drawdown.

Step 2 — Get clean, representative historical data

Crypto data is easy to obtain — public exchange klines go back years at 1-minute resolution. Our own research is built on Binance spot 1-minute candles aggregated up to each strategy’s timeframe, which is a reasonable template: pull fine-grained data and roll it up rather than starting coarse.

Whatever you use, cover a span that includes different conditions. Our published study runs a full 12 months (June 2025 to June 2026) precisely so a trend-loving system cannot cherry-pick a single friendly quarter.

Step 3 — Remember crypto trades 24/7 with no session bell

Forex and stocks have sessions; crypto does not close. That changes strategy design. "Opening range" or "London breakout" ideas borrowed from equities have no native exchange open in crypto — you are really capturing the volatility around when traditional markets wake up, not a true session bell.

In our research we tested these explicitly: an opening-range breakout on BTC, read as the New York window, finished the year down about 45% with a profit factor near 0.65. The setup still "works" mechanically; it just did not have an edge after costs.

Step 4 — Model fees, because crypto fees compound viciously

This is where most crypto backtests lie. A few basis points per trade sounds trivial until you multiply by trade count. We modelled a modest 0.05% commission per side — and on a 1-minute momentum scalper that fired over 15,000 times on BTC, fees alone obliterated the account: the strategy ended down essentially 100% with a profit factor near 0.05.

The slower systems were not immune either. The lesson is blunt: a crypto strategy that looks profitable gross can be a guaranteed loser net once you count every commission.

  • Charge commission on every side of every trade — entry and exit.
  • Multiply by realistic trade frequency before you celebrate a gross edge.
  • Add slippage on stops; fast crypto moves do not fill at your number.
  • High-frequency crypto strategies have the highest cost hurdle of all.

Step 5 — Run it bar by bar or describe it to the engine

For discretionary crypto setups, bar-by-bar replay is the cleanest backtest: step through real BTC or ETH history candle by candle, place simulated orders, and never peek ahead. For rule-based ideas, describe the rules in plain English to an AI backtester and let a deterministic engine run them identically every time.

Secuora supports both — free bar-by-bar crypto replay on real Binance history, and an AI backtester at /backtest/ai that compiles plain-English rules into deterministic primitives like FVG, order blocks, liquidity sweeps, EMA crosses and RSI.

Step 6 — Read the metrics, not the hope

Judge the net result with win rate, profit factor and expectancy across a meaningful sample, not the gross total or a pretty curve. A profit factor above 1.0 is the bar to clear; expectancy tells you the average outcome per trade.

Across more than 40 rule-based crypto baselines (BTC and ETH) in our study, every single one lost money after costs — the closest to breakeven was a previous-day-level break on ETH at roughly −0.2% with a profit factor of about 0.996. "None were profitable after costs" is not a downer; it is the result a rigorous backtest exists to deliver before you fund the idea.

Then forward-test before you risk real coins

A promising backtest is a hypothesis, not a guarantee. Forward-test on history you deliberately held out, or trade it small and live, before sizing up. Crypto regimes change fast, so an edge that survives unseen data is worth far more than one tuned to the past.

You can run the whole loop on Secuora — replay, journal and auto-calculated stats — on a free plan with no credit card, and try the live demo at /backtest/demo without signing up.

Frequently asked questions

What is the best crypto pair to backtest?

Start with a deep, liquid major like BTC/USDT or ETH/USDT. Tight spreads and clean tape mean your results reflect the strategy rather than a thin order book. Add alts only once your process is solid.

Do trading fees really matter in a crypto backtest?

Enormously. In our research a 1-minute BTC scalper firing over 15,000 times lost nearly 100% on a modest 0.05% per-side commission — fees alone. Always charge commission on both sides and multiply by trade frequency.

Does the 24/7 crypto market change how I backtest?

Yes. There is no session bell, so equity-style "opening range" or "session breakout" ideas only capture the volatility around traditional market hours, not a real exchange open. Design and label your tests accordingly.

Where can I backtest a crypto strategy for free?

Secuora offers free bar-by-bar crypto replay on real Binance history plus a 20-trade journal with no credit card, and a live demo at /backtest/demo that needs no sign-up.

Practise this on Secuora

Free trading journal + bar-by-bar replay backtester. Crypto replay is free and there's a live demo with no sign-up.

Keep reading