Direct Answer

Backtesting a crypto trading strategy follows the same process as backtesting a stock strategy: state a falsifiable hypothesis, convert it into exact entry, exit, and sizing rules, validate the data, model realistic execution, hold back an out-of-sample period, and forward-test before risking capital. What changes is the market, not the method. Crypto trades continuously with no session close, so the stock-style assumption that the next fill arrives at the next open misstates timing and slippage, and perpetual futures accrue funding payments that a price-only backtest never records.

Key Takeaways

  • The core backtesting process (hypothesis, rules, data validation, execution modeling, in-sample/out-of-sample split, forward testing) is identical across crypto and stock strategies.
  • Crypto markets trade 24/7 with no session close, so the stock-style "wait for the next open" fill assumption misstates timing and understates slippage risk during low-liquidity windows.
  • A crypto backtest built on stock-market assumptions can insert fill delays that would not exist in a continuous market.
  • Funding rates and other crypto-specific mechanics need explicit modeling rather than being borrowed from stock-market conventions.

Is Backtesting a Crypto Strategy Different From Backtesting a Stock Strategy?

Not at the process level. Whichever crypto strategy from this cluster is under test, dollar-cost averaging and position trading, swing trading, day trading or scalping, trend following, range and grid trading, or arbitrage: the same ten-step discipline applies: state a falsifiable hypothesis, convert it into exact entry, exit, and sizing rules, define the historical universe, validate the data, model realistic execution, separate development data from a held-back test, run the simulation once rules are frozen, analyze return alongside risk and exposure, test robustness, and forward-test before risking capital. That full process, including look-ahead bias, walk-forward validation, overfitting, execution modeling, and benchmarking, is covered end to end in the backtesting pillar guide and its seven-part deep-dive cluster:

This guide does not repeat that material. Its job is narrower: the handful of things that are genuinely different, or additionally important, when the asset being tested is crypto rather than a stock.

How Do 24/7 Markets Change Backtest Assumptions?

A stock market has a defined session, so a signal generated after the close has an obvious, well-understood next fill point: the next session's open. That single assumption underpins a large share of stock-backtest execution modeling, including the treatment of overnight gaps, because there genuinely is a gap, hours during which nothing can be done about a position, and news can accumulate before the market reopens.

Crypto spot and derivatives markets trade continuously, with no scheduled close and no weekend pause. A signal computed from an hourly or daily bar can, in principle, fill within seconds at any hour, including the middle of the night in the trader's own time zone and on a weekend, when liquidity and staffing on the executing side may be thinner even though the market never technically closes. A backtest built around a stock-style "wait for the next open" assumption will misstate fill timing for a crypto strategy, either by inserting a delay that would not exist in a continuous market or by understating the slippage risk during the low-liquidity windows that do exist, such as overnight in a given region even though the market stays open elsewhere. The general treatment of fills, spreads, and slippage still applies in full, see the execution modeling guide: but the specific assumption about when the next fill opportunity occurs needs to be rebuilt for a market with no session boundary.

Do Crypto Backtests Need to Model Funding Rates?

Perpetual futures contracts have no expiration date, so exchanges use a funding rate, a periodic payment exchanged between long and short holders, to keep the contract's price anchored close to the underlying spot price. When the funding rate is positive, longs typically pay shorts; when it is negative, shorts typically pay longs. This payment is real cash flow, and it accrues whether or not the position is ever closed at a loss on price alone.

Bitcoin coins stacked in front of cryptocurrency trading chart reflecting market trends.
Photo by DS stories via Pexels

A backtest that only tracks the entry price, exit price, and price-based profit and loss on a perpetual position is missing a cost or credit that is often small per interval but compounds over a holding period. For a strategy that opens and closes a position within an hour, funding is usually negligible or zero, because most exchanges settle funding every eight hours and a position closed before settlement never accrues it. For a strategy that holds a leveraged perpetual position for days or weeks, ignoring funding can materially overstate or understate the true return, depending on which side of the payment the position sat on.

Worked example: funding cost over a 30-day hold

Hypothetical example, for education only.

A trader holds a $10,000 notional long perpetual futures position for 30 days. The exchange settles funding every 8 hours, so a full day contains 24 ÷ 8 = 3 funding intervals, and 30 days contain 30 × 3 = 90 intervals. Assume an illustrative funding rate of 0.03% per interval, paid by longs to shorts throughout (0.03% annualizes to roughly 0.03% × 3 × 365 ≈ 32.9%, a level that has occurred during periods of strong bullish demand for leverage). Cost per interval is $10,000 × 0.03% = $10,000 × 0.0003 = $3. Over 90 intervals, total funding paid is 90 × $3 = $270, equal to $270 ÷ $10,000 = 2.7% of the position's notional value for the month.

A backtest that ignores this $270 would overstate the strategy's net return by 2.7 percentage points of notional for that single position, enough, on its own, to turn a strategy that looks modestly profitable on price action alone into one that is unprofitable after funding, or to erase most of an expected monthly edge. The rate used here is illustrative; actual funding rates vary by exchange, by contract, and over time, and can also run negative, in which case a long position would have received payments instead of making them. The point a backtest must not skip is including the mechanism at all, using rates consistent with the venue and period being tested.

Why Is Survivorship Bias More Severe in Crypto Backtests?

The historical data guide covers survivorship bias in general: building a test universe from today's constituents silently excludes companies that failed, merged, or were delisted along the way, which flatters almost any long-only result. The same distortion exists in crypto, and it tends to be worse, for a structural reason.

A troubled public company usually still has a secondary market for its shares, even after a severe decline, the stock trades at a low price, but it typically still trades, and a backtest can generally still price an exit. A large share of low-capitalization crypto tokens do not follow that path. Many go to zero entirely, their trading venues shut down or delist the pair, and there is no orderly secondary market left to exit into at any price. A universe built from "today's top 50 coins by market capitalization" does not just exclude a few underperformers the way an equivalent stock universe might, it can exclude a large number of tokens that once ranked inside that top 50 and later collapsed completely, along with every failed project that never got that far but would still have been eligible for the backtest's stated criteria on some historical date.

Reconstructing a crypto backtest universe therefore means using the tokens that met the stated criteria on each historical date, including every one that later failed, was delisted, or became too illiquid to trade, not the list of tokens that happen to still be trading and liquid enough to easily pull data for today.

Why Do Data Source Discrepancies Matter More in Crypto?

A given token's price is not a single number at a given moment. It is whatever each individual exchange's order book says, and those order books do not always agree, especially for a thinly traded token where a single moderately sized order can move one venue's price meaningfully more than another's. On-chain and oracle prices, used by many derivatives and lending protocols, can also diverge from any individual centralized exchange's quoted price for a period of time.

Golden Bitcoins on a laptop keyboard with a stock market chart on the screen, symbolizing cryptocurrency trading.
Photo by Leeloo The First via Pexels

This matters directly for a backtest. A test built entirely on one exchange's historical price feed implicitly assumes that the fills it reports were achievable on that same venue, at that same time, at that price. If the strategy would actually be traded on a different venue, or across several venues, as many arbitrage and execution approaches require, the historical feed used for the backtest may not reflect what was actually fillable there. The gap between reported price and achievable fill widens with thinner liquidity, which is exactly when a naive backtest is most likely to assume a clean fill. The crypto liquidity and slippage guide covers how order-book depth and spread interact with position size to determine what a real fill would have looked like, which is the deeper mechanism behind this data-quality problem.

Should a Crypto Backtest Include Stablecoin and Exchange-Stress Events?

A backtest period confined to ordinary volatility, even a period that includes a normal bear market, does not necessarily tell you how a strategy behaves during a genuine tail event specific to crypto market structure. A stablecoin losing its peg, or a major exchange experiencing withdrawal problems or insolvency, produces price and liquidity behavior that looks different from an ordinary sharp decline: spreads on affected pairs can widen far beyond their normal range, correlations between otherwise unrelated tokens can spike as participants de-risk everywhere at once, and the price of an asset used as a settlement currency or collateral base can itself become unreliable at the exact moment a strategy most needs a stable reference point.

A credible crypto backtest sample should therefore include at least one period covering a stablecoin depeg or an exchange-stress event, not because either is common, but because a strategy's behavior during one is informative in a way that an otherwise-calm sample cannot be. The crypto exchange and custody risk guide covers this class of event and how to evaluate exposure to it directly.

Crypto Backtesting Checklist

This list assumes the general backtesting checklist in the backtesting pillar guide has already been satisfied. It adds only the items specific to crypto.

Top view of golden Bitcoin coins scattered on clipboard with 2021 text, symbolizing wealth.
Photo by Leeloo The First via Pexels
  • Funding rates are modeled for any perpetual futures position held more than a few hours, using rates consistent with the venue and period tested.
  • The token universe includes projects that were later delisted, went to zero, or became illiquid, not only tokens that are still liquid and trading today.
  • Cross-exchange price consistency has been checked, especially for less liquid tokens, and the venue used for backtest prices matches the venue the strategy would actually trade on.
  • The historical sample includes at least one stablecoin depeg or exchange-stress event, not only ordinary volatility.
  • Fees and expected slippage are realistic for the venue type, spot, perpetual futures, or decentralized exchange, rather than copied from a different venue's fee schedule.

The Corrections That Make a Backtest Worth Reading

A backtest is a hypothesis test that is unusually easy to fail without noticing. Four corrections separate a result worth acting on from a curve fitted to history: realistic fees on every trade, slippage sized to the liquidity that actually existed, exclusion of assets that no longer trade, and a holdout period the strategy was not tuned on.

Survivorship bias deserves particular attention in this market. Testing across the tokens listed today omits every one that failed, was delisted or was abandoned, and those were real options at the time. A strategy that selects assets by momentum or volume is especially exposed, since the assets it would have chosen are disproportionately the ones missing from the dataset.

The mistake is iterating until the equity curve looks right. Every parameter adjustment made after seeing the result borrows a little explanatory power from noise, and enough adjustments produce a strategy that describes the past precisely and predicts nothing. Recording how many variants were tried is the cheapest defence available.

Backtests also cannot model exchange outages, withdrawal freezes, delistings or the moment your own conviction fails. Those events shaped real outcomes in this market and appear nowhere in a price series.

Crypto Backtesting FAQs

Is backtesting crypto strategies different from backtesting stock strategies?

The core process is the same: state a hypothesis, write exact rules, define a universe, validate the data, model execution, split in-sample from out-of-sample data, and forward-test frozen rules. What differs is a handful of crypto-specific inputs, funding rates on perpetual futures, a market that never closes, a higher rate of tokens going to zero or being delisted, and exchange price feeds that can disagree with each other, that a stock-oriented checklist does not ask about.

Do crypto backtests need to include funding rates?

Yes, for any strategy that holds a perpetual futures position for more than a few hours. Funding is exchanged between long and short holders at regular intervals, and ignoring it either overstates or understates the true return depending on which side of the funding payment the position sat on and how long it was held.

What is survivorship bias in a crypto backtest?

It is building a historical universe from tokens that still exist today, which silently excludes every token that was delisted, went to zero, or became too illiquid to trade. Because a large share of low-capitalization tokens fail entirely rather than merely underperforming, this bias tends to inflate crypto backtest results more than it inflates stock backtest results.

Can you backtest a crypto strategy using only current top-50 coins?

You can run it, but the result describes survivors, not a historical universe. A list of today's top 50 coins by market capitalization excludes every token that was once ranked there and later collapsed, was delisted, or lost most of its liquidity. Reconstructing the universe as it existed on each historical date, including tokens that later failed, avoids this distortion.

How much historical data do you need to backtest a crypto strategy?

Enough to include at least one period of ordinary conditions and at least one period of acute stress, such as a stablecoin depeg or an exchange failure, since crypto markets can behave very differently during those events than during normal volatility. A sample confined only to calm or steadily rising conditions will not reveal how a strategy behaves when liquidity and correlations shift suddenly.

How do I handle exchange outages when backtesting a crypto strategy?

Historical price data usually contains no record that a venue was unreachable, so a backtest quietly assumes every signal could be acted on. Outages cluster during exactly the volatile periods that produce the largest signals, which biases results in the strategy's favour. A workable adjustment is to assume some fraction of signals during extreme moves are missed, and check whether the strategy still works when its best days are removed.

What is look-ahead bias and how does it creep into a crypto backtest?

Look-ahead bias is using information in a simulation that was not available at that moment. In crypto it commonly enters through data that is revised after the fact, such as supply figures or exchange volume that were restated later, and through indicators computed on a candle that had not yet closed. The result is a backtest that trades on knowledge the live strategy would not have had, which usually shows up as unrealistically clean entries.

Should a crypto backtest use candle data or trade-by-trade data?

Candles are adequate for strategies that hold for hours or longer, because the entry price approximation matters less than the direction. Strategies acting inside a candle need trade-level or order-book data, since a candle records only four prices and hides the path between them. A backtest assuming a fill at a candle's low is assuming the best possible price in a window it cannot see inside.

How many trades does a backtest need before the result means anything?

There is no single threshold, but a result built on a handful of trades describes those specific trades rather than the strategy. What matters more than the raw count is whether the sample spans different market conditions, since a hundred trades from a single uptrend tell you less than thirty spread across a trend, a range, and a crash. Reporting the conditions the sample covers is more informative than reporting the count alone.

Related Guides

References