In this article
Backtesting means running your trading rules on historical data to see how they would have performed. It's the cheapest way to find out that an idea doesn't work, before the market teaches you the expensive way.
But a backtest is only as good as the way it's done. Here's how to get useful answers instead of comforting ones.
What you need before you start
- Clear rules. Exactly when to enter, when to exit, and how much to trade. "Buy when it looks strong" can't be tested.
- Good historical data. Prices for the markets and time frame you plan to trade, ideally from the exchange you'll actually use.
- Realistic costs. Trading fees, the spread, and slippage: the difference between the price you wanted and the price you actually got.
A good backtest, step by step
1. Choose your test period carefully
Include different kinds of markets: rising, falling and sideways. A strategy tested only during a strong rally will almost always look better than it really is.
2. Keep some data aside
Don't look at part of your history while you build the strategy. When you're finished, test on that untouched part. If the results fall apart there, the strategy was probably tuned to the past rather than built for the future.
3. Include every cost
Fees and slippage look small on a single trade, but they add up fast for strategies that trade often. Plenty of strategies that look profitable before costs lose money after them.
4. Look beyond total profit
Total profit on its own tells you very little. Also look at:
- Maximum drawdown: the biggest drop from a peak. Could you live with that drop in real life?
- Number of trades: a handful of trades proves almost nothing.
- Average win compared with average loss: together with the win rate, it shows whether profits come from a solid edge or a few lucky trades.
- Consistency: does the strategy hold up across different years and markets, or only in one?
5. Paper trade before going live
A backtest uses the past. Paper trading runs your strategy in real time with simulated money, so you see how it behaves with live prices, real delays and real exchange quirks. A few weeks of paper trading often reveals problems a backtest can't.
Mistakes that create false confidence
If a backtest looks too good to be true, it usually is.
- Overfitting. Adjusting settings until the past looks perfect. The more settings you tune, the more likely you're fitting random noise instead of finding a real edge.
- Look-ahead bias. Accidentally using information that wasn't available at the time, like the day's closing price to make a decision in the morning.
- Survivorship bias. Testing only on coins or stocks that still exist today, and ignoring the ones that failed or were delisted.
- Ignoring liquidity. Assuming you can always buy or sell at the chart price, even in markets where very little actually trades.
From backtest to live trading
A sensible path looks like this:
- Backtest on part of your data.
- Check the results on the data you kept aside.
- Paper trade for a few weeks.
- Go live with a small amount and strict limits.
- Compare live results with the backtest regularly, and pause if they drift too far apart.
Past performance never guarantees future results. A good backtest can't promise profits, but it can stop you from trading a strategy that was never going to work.
Need help testing a strategy?
We build backtesting tools and trading bots that run your rules on historical data first, then in paper-trading mode, before any real money is involved. If you're new to automation, start with what trading bots can and can't do. If you'd like to test an idea properly, get in touch and we'll walk you through the results in plain language. We don't give investment advice, and the decisions stay yours.

Written by
MD Salman Farshi
COO and Technical Project Manager
Salman runs day-to-day operations and plans each project with clients, then leads the team from first idea to launch, keeping the work clear, on time and on budget.




