Partner · Blockchain Life 2026 — Dubai, December 1–2 · 15,000+ attendees from 130+ countriesGet tickets →
LIVE
BTC—ETH—SOL—BNB—XRP—ADA—AVAX—DOGE—LINK—DOT—MATIC—ATOM—LTC—TRX—TON—BTC—ETH—SOL—BNB—XRP—ADA—AVAX—DOGE—LINK—DOT—MATIC—ATOM—LTC—TRX—TON—
—▲0.0%
Trading

How to Backtest a Crypto Strategy: Tools, Data, Fees and Real Examples

5 min readGuide
How to Backtest a Crypto Strategy: Tools, Data, Fees and Real Examples

Backtesting means running your trading rules over past price data to see what they would have done. It is the cheapest way to find out that an idea does not work. The catch is that a careless backtest almost always looks brilliant, because every shortcut you take quietly flatters the result. Doing it properly is mostly about taking those flatteries away.

Which tool to start with

For a rule you can draw on a chart - a moving-average cross, a breakout above last week's high - TradingView's Strategy Tester is the gentlest start: you write the rule in its Pine Script editor and it marks every trade on the chart. If you can write a little Python, Backtrader and VectorBT handle the same job with far more control, and Freqtrade is built specifically for crypto and can take the strategy straight to live trading afterwards. Spreadsheets work too for simple rules, and force you to understand each step.

Data and fees decide the result

Two unglamorous details matter more than the strategy itself. Data: use candles from the exchange you would actually trade on, over a period containing both a bull run and a long grind down - a test that only covers a rising year will make almost any buy-the-dip rule look like genius. Costs: enter the real taker fee of your exchange, roughly 0.04 to 0.1 percent a side, plus slippage, the gap between the price you saw and the price you got. A strategy taking twenty trades a day pays those costs forty times a day. That alone kills most scalping ideas on paper before they can kill a real account.

A worked example

Say the rule is: buy bitcoin when the 50-day moving average crosses above the 200-day, sell when it crosses back. Run it over three full years, with fees on, and you typically get few trades, several losing whipsaws in sideways months, and a long drawdown you would have had to sit through. The headline return matters less than two other figures the tester prints: the maximum drawdown, which is the worst stretch you would have had to endure, and the number of trades, because a result built on six trades is a coincidence, not evidence.

Before risking money, run the strategy forward on paper for a month - the one test that cannot be fooled by hindsight. Strategy ideas worth testing are in 5 popular crypto trading strategies, and a concrete rule set in the support and resistance strategy.

← All guides