⏪ Backtesting Backtesting
Take a trading strategy's rules and run them against past market prices to see how they would have performed — all before you risk any real money.
👨🍳 The simple version — a recipe test run
Imagine a chef who wants to try a new dish. Before serving it to paying customers, they cook it with last week's leftover ingredients to see if the idea works. Backtesting is the same move for trading. You write down a strategy — clear rules for when to buy and when to sell — then a backtesting engine replays old price data from a start date to an end date, simulates every buy and sell those rules would have triggered, and hands you the results: a profit curve, a win rate, and more. You learn whether the idea holds up without spending fresh money.
🧮 What a good backtest includes
A test that assumes you always buy and sell at the perfect price is lying to you. Real trading has friction, and a trustworthy backtest puts that friction in.
| Factor | Why it matters |
|---|---|
| 🧾 Trading fees | Every trade costs a small cut; ignore it and your profit looks bigger than it really is |
| 📉 Slippage | The price can move between your decision and your fill, so you rarely get the exact price you wanted |
| ⏱️ Realistic execution | Orders take time and may not fill instantly; a good test does not assume flawless, frictionless fills |
🪙 Why backtesting matters in crypto
Crypto markets run 24/7, and a lot of retail traders lean on trading bots and automated strategies. Backtesting lets them check an idea against years of historical price data without putting capital at risk. Exchanges supply the raw material: Binance, for example, reportedly offers historical kline (candlestick) data going back to roughly 2017 for its major pairs, which is why most tests run on deep, liquid pairs like BTC/USDT and ETH/USDT.
🖱️ Where beginners meet it
You usually run into backtesting inside no-code bot platforms — names like 3Commas, Coinrule, Cryptohopper, Kryll, and OctoBot. You build the rules visually, point the tool at a date range, and it does the replay for you. No coding required.
🚨 Three biases that make backtests lie
- 🎯 Overfitting — Rules tuned so tightly to past data that they fit random noise, not a real edge. They look brilliant in the test and collapse in live trading.
- 🏚️ Survivorship bias — Only testing coins that still exist and ignoring the dead and delisted ones. This can overstate annual returns by roughly 1–4%.
- 🔮 Look-ahead bias — Using data that wasn't actually available at the moment of the simulated trade, like deciding an intraday trade with prices you'd only know later.
📊 Because of these traps, a backtest is normally followed by paper trading (also called forward testing): running the strategy live in real markets but with fake money, before any real funds go in.
❓ FAQ
- If a backtest shows big profits, will the strategy make money for real?
- Not necessarily. A backtest only tells you about the past, not the future. The most common trap is overfitting — tuning the rules so tightly to old data that they fit random noise instead of a real edge, so the strategy falls apart in live trading.
- What's the difference between backtesting and paper trading?
- Backtesting replays past data to see how rules would have done. Paper trading (forward testing) runs the same rules live in today's market but with fake money. The usual order is backtest first, then paper trade, then risk real funds.
- Do I need to code to backtest a crypto strategy?
- No. Beginners usually meet backtesting inside no-code bot platforms like 3Commas, Coinrule, Cryptohopper, Kryll, and OctoBot, where you build the rules visually and run them on historical data without writing code.