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:
- Writing testable strategy rules — turning a hypothesis into entry, exit, timing, sizing, and conflict rules precise enough to reproduce.
- Historical data — corporate actions, raw versus adjusted prices, and point-in-time fundamentals.
- In-sample vs. out-of-sample testing — chronological splits and walk-forward validation windows.
- Execution modeling — commissions, spreads, slippage, fill rules, and capacity limits.
- Avoiding overfitting — trial counting, parameter stability, and locking a final test set.
- Benchmarking a strategy — matching the comparison to actual exposure.
- Forward testing frozen rules — paper trading and tracking expected versus actual fills.
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.
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.
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.
- 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.
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.
Related Guides
- Crypto trading strategies — the pillar overview for this cluster.
- Dollar-cost averaging and position trading — building a long-term crypto position on a schedule.
- Swing trading crypto — holding positions across multi-day price swings.
- Day trading vs. scalping — the tradeoffs between shorter holding periods.
- Trend following and momentum — riding an established directional move.
- Range trading and grid strategies — trading within a defined price band.
- Crypto arbitrage — capturing price discrepancies across venues.
- How to backtest a stock trading strategy — the full ten-step process and credibility framework.
- Writing testable strategy rules — entry, exit, timing, sizing, and conflict rules.
- Historical data — corporate actions, adjustments, and point-in-time fundamentals.
- In-sample vs. out-of-sample testing — split design and walk-forward windows.
- Execution modeling — commissions, spreads, slippage, fills, and capacity.
- Avoiding backtest overfitting — trial counting and parameter stability.
- Benchmarking a strategy — matching the comparison to exposure.
- Forward testing frozen rules — paper trading and expectation tracking.