How to backtest a crypto strategy without fooling yourself
Keep data you never tuned on, count every cost, measure risk over every day, and expect most ideas to fail.
A backtest is easy to make look good. Try enough settings on enough coins and one of them will have a beautiful equity curve, because you've found the version that happened to fit the past. Most of the work in backtesting is stopping yourself from doing that. I build Central Command, whose backtester replays trading rules on BloFin candles, and these are the habits we built into it.
Keep a stretch of data you never tuned on
Split your history in two. The first part is in-sample: the data you look at while you choose rules and settings. The second is out-of-sample: data the choices never saw, used once to judge them.
Our backtester does this on every run. Results show the first 70% of the period against the last 30%. If a strategy made its money in the first stretch and lost it in the second, the result page says to treat the early result as luck or curve fitting until it holds up.
The split only works if you don't peek. Change your rules after looking at the last 30%, run again, and the last 30% has become in-sample too.
Cut the period into folds
A single split can hide a strategy that made all its money in one lucky month. So the period is also cut into time windows, four by default, each summarised on its own. When a strategy is profitable overall but most of the windows lost money, the result warns that the profit comes from a few stretches.
Count every cost
- Fees on every fill. Our backtest charges 0.05% per fill by default, on the entry and the exit. Stops and targets execute as market orders, as they do for an agent.
- Funding at every settlement. While a position is open it pays or receives funding from BloFin's own history. On a strategy that holds for days, funding can cost more than the fees. How funding works.
- Slippage. Our default adds none. Real stop orders fill at the next price available, so test what your result looks like with costs doubled before you trust a thin edge.
When fees and funding take all of the gross profit, or more than the strategy kept, the result says so in those words.
Measure Sharpe over every calendar day
The Sharpe ratio is the average daily return divided by how much daily returns vary, scaled to a year. It rewards steady returns and punishes lumpy ones.
The trap is which days you count. Take a strategy that trades on 20 days a year, averaging +0.5% on those days with a standard deviation of 2%, and doing nothing on the other 345. Count only the trading days and its Sharpe is about 4.8. Count every calendar day, with the quiet days as zero returns, and it's about 1.1. The money is the same. The first number leaves out the time your capital sat waiting.
We count every calendar day. An earlier version of our backtester used only the days with a point on the equity curve, which flattered strategies that trade now and then, and we changed it.
Make sure there are enough trades
Under 30 trades, a result can't tell skill from luck, and the backtester says so. It also resamples the trades to get a range for the average trade. If that range includes zero, the result isn't clearly different from having no edge. Aim for 100 trades or more, and look at how many fell in the out-of-sample stretch, not only the total.
Why most strategies fail out of sample
Three reasons do most of the damage:
- Fitting noise. Every setting you try is another chance to match random wiggles in the past.
- Too many tries. Test 200 ideas and a handful will look good by luck alone.
- The market changes. A long-only trend system tuned in a rising market meets a falling one.
Our strategy library shows how often this happens. It has 197 built-in strategies, each tested the same way on six coins. Settings were chosen on data from October 2023 to the end of July 2025, then each strategy was judged once on August 2025 to October 2026. Their verdicts:
- 41 held up: made money in both periods, kept a profit factor of 1.2 or more on 25 or more out-of-sample trades, stayed profitable with fees doubled and in a quarterly walk-forward, and didn't lose on 20 coins they were never tuned on.
- 17 mixed: all of that, except they lost on the other coins.
- 48 thin: made money in both periods without clearing that bar.
- 91 failed: lost money in one period or both.
The hourly strategies fared worst: 16 of the 19 failed. And "held up" means a strategy passed our filter, not that it works. A filter run on 14 months of unseen data can't prove an edge, only rule out some that aren't there.
Make it repeatable
A result you can't run again is hard to trust, including your own from last month. Every test now records what was tested: the rules and a fingerprint of them, how they were compiled, the engine, the period, where each market's data came from, every cost and every sizing setting. You can download every trade as a CSV and the whole report as JSON, and Run this version again reruns the same compiled rules on the same period and says whether the trades came out the same.
Then test it on paper
A backtest uses closed history. Paper trading uses live prices you couldn't have tuned on, with checks that run on a schedule like the real thing. What a realistic paper account should charge.
Backtesting FAQ
How much data do I need?
Enough for 30 trades or more in the out-of-sample part alone, and ideally a period that includes both a rising and a falling market.
What is walk-forward testing?
Choosing settings on one window, testing them on the next, then moving both windows forward and repeating. It shows whether re-choosing the settings keeps working.
Try it
Look through the strategy library with its verdicts, or write your own rules and backtest them before anything runs. It's free with a BloFin account opened through our link, or there's a 10-day free trial with no card.
Disclosure: I build Central Command, which earns a commission from BloFin on members' trading. This article was drafted with AI assistance. It is not financial advice. Past results do not guarantee future returns, and leveraged trading can lose all of your money.
Start free
Central Command is free with a BloFin account opened through our referral link, for as long as you trade through us. Or take the 10-day free trial: no card, no wallet, nothing renews.
- Create an account at https://centralcommand.io/signup.
- Choose Free with BloFin and connect BloFin in one click (no BloFin account yet? open one at https://partner.blofin.com/d/centralcommand), or choose the 10-day free trial.
- Trade from the terminal at https://centralcommand.io/dataterminal, or describe a strategy in plain English at https://centralcommand.io/agents/new: backtest it, run it on paper, and go live when you choose.
BloFin's normal trading fees still apply. Central Command trades BloFin perpetual futures only.