Crypto guide

How to Backtest Crypto Trading Strategies

Crypto backtesting requires more than loading a Bitcoin chart. The market trades continuously, prices vary across venues, liquidity changes sharply, and many assets have short or incomplete histories.

To backtest a crypto trading strategy properly, define the market before defining the result. Bitcoin spot, perpetual futures, and regulated futures are different instruments. They can have different prices, fees, funding mechanics, trading hours, and available history. Combining them without a clear rule creates a test that no trader could execute.

Choose the venue, instrument, and historical universe

Crypto does not have one universal price feed. A spot pair on one exchange can differ from the same pair elsewhere, especially during fast markets. Decide whether the strategy trades spot, perpetuals, or dated futures and use data that represents that instrument.

Asset selection introduces another problem. Testing only coins that are large and liquid today excludes projects that failed, were delisted, or lost liquidity. That is a form of survivorship bias. Build the historical universe using information that would have been available on each test date, including listing dates and eligibility rules.

Data decisionQuestion the backtest must answer
Spot or derivativeDoes the data include the instrument's actual fees and financing mechanics?
Trading venueCould the modeled price and liquidity have been accessed there?
Asset universeWere assets eligible based on information available at the time?
Bar constructionWhich timezone defines a day in a market that never closes?

Preserve weekend and overnight market behavior

Crypto trades continuously, so a backtest should not quietly remove weekends or impose stock-market session boundaries. CME Group's analysis of the 24/7 cryptocurrency market found meaningful weekend activity and volatility. Weekend observations are therefore part of the risk sample, not empty time to discard.

Define when signals are evaluated and how daily candles are constructed. A UTC daily bar can produce different indicator values from a bar using another cutoff. For intraday strategies, compare weekday and weekend results because liquidity and participant mix can change even though the market remains open.

Model fees, slippage, liquidity, and funding

Crypto execution assumptions should reflect the instrument and venue. Spot strategies may pay maker or taker fees and cross a variable spread. Perpetual strategies can also pay or receive funding. Thin altcoins may show an attractive candle price while offering too little depth to fill the intended position near that price.

  • apply the correct fee tier to every entry and exit
  • stress-test spread and slippage during volatile periods
  • include funding when positions span funding timestamps
  • cap position size using plausible volume or liquidity constraints
  • define how exchange outages or missing bars are treated

Liquidity stress test

Run the original result, then double the assumed slippage and remove the least-liquid assets from the universe. If most profit disappears, the strategy may be harvesting an execution assumption rather than a repeatable market edge. Record that sensitivity as part of the result instead of hiding it in setup notes.

Validate the edge across assets and market regimes

Crypto history contains sharp bull markets, prolonged declines, volatility shocks, and periods of quieter consolidation. Separate results by regime and asset rather than relying only on one full-period equity curve. A strategy carried by one Bitcoin bull run has not demonstrated the same robustness as one that retains a sensible payoff structure across several conditions.

Use the same fixed-rule discipline described in our guide to backtesting forex trading strategies, but do not copy forex session assumptions into an always-open market. Likewise, the historical-universe controls used when backtesting stock strategies are useful for avoiding survivorship bias in changing crypto asset lists.

  • report results separately for Bitcoin, Ether, and any altcoin group
  • compare bull, bear, and range-bound periods
  • reserve a later period or separate asset group for validation
  • reject conclusions that depend on one venue, asset, or exceptional cycle

Crypto backtests need market-specific realism

Continuous trading, fragmented prices, funding, and changing asset universes are part of the strategy environment. Modeling them explicitly produces a result that is more useful than a smooth curve built from convenient data.