Why Your Backtest Lies
A backtest is a hypothesis, not a promise. Most of the gap between a beautiful backtest and a disappointing live account comes down to three things: hidden costs, trade frequency, and overfitting. Here is how each one deceives you, and how to test a strategy that survives a real market.
Backtest result
After real costs
Your backtest is probably lying to you. Not out of malice, but by omission. It replays your rules against clean historical data and hands back a smooth, rising equity curve. Then you go live, and the curve bends the other way.
Net edge per trade equals gross edge minus costs. If your costs are bigger than your edge, every extra trade loses you more money.
The gap between backtest and live is not bad luck. It is the predictable result of costs your simulation ignored, a trade count that multiplies those costs, and parameters tuned so tightly to the past that they describe noise instead of a pattern. These are universal laws of any tradable market: crypto, forex, or gold. Once you see them, you can test for them.
The Two Costs Your Backtest Quietly Ignores
Default backtests assume perfect, free fills. Real markets charge you on every trade: a fee on both the entry and the exit, plus slippage between the price your signal expected and the price you actually got.
Fees are charged on every round trip: once to enter, once to exit. Using real 2026 taker rates, a spot round trip costs roughly 0.20%, and a futures round trip roughly 0.10% to 0.11%. That sounds trivial until you multiply it by hundreds of trades.
| Market | Per side taker fee | Round trip |
|---|---|---|
| Spot on Binance or Bybit | 0.10% | About 0.20% |
| Spot on OKX | 0.08% to 0.10% | About 0.16% to 0.20% |
| Futures on Binance or OKX | 0.05% | About 0.10% |
| Futures on Bybit | 0.055% | About 0.11% |
Slippage is the gap between the price your signal expected and the price you actually filled at. It is a product of order-book depth, spread, latency, and volatility. On the top ten coins, assume 0.05% to 0.10% per trade. On thin altcoins outside the top one hundred, it can be 0.5% to 2% per trade, and far worse during news spikes.
Two more costs hide in the same blind spot. Funding, on perpetual futures, is paid or received roughly every eight hours on any position you hold. It is a recurring cost most backtests omit entirely. Latency, the 100 to 200 milliseconds between your signal firing and your order filling, is enough time for a fast market to move away from you.
The difference between the price you expected and the price your order actually filled at.
The fee charged when your order removes liquidity from the book by filling immediately.
A recurring payment exchanged between longs and shorts on perpetual futures, roughly every eight hours.
The Frequency Trap: More Trades Do Not Mean More Money
Costs are charged per trade, so your total cost drag equals cost-per-trade multiplied by the number of trades. The more a strategy trades, the more it pays. If costs exceed the edge, more trades means bigger losses, not bigger profits.
This is the point most new strategy builders miss. A backtest with zero modeled cost makes a busy, high-frequency system look brilliant, because in a frictionless world every trade is free. Add real costs and the arithmetic flips. Frequency does not create profit. It multiplies whatever net per-trade edge you already have.
| Trades | Gross at 0.15% each | Cost at 0.30% each | Net result |
|---|---|---|---|
| 100 | +15% | -30% | -15% |
| 500 | +75% | -150% | -75% |
| 1,000 | +150% | -300% | -150%, account wiped |
Suppose a spot strategy has a gross edge of 0.15% per trade and a realistic round-trip cost of 0.30%, which is 0.20% fees plus 0.10% slippage. Its net edge is minus 0.15% per trade, and every trade it takes deepens the hole. Now contrast a lower-frequency strategy with a genuine edge: a gross of 1.0% per trade against the same 0.30% cost nets 0.70% per trade. Fewer, higher-quality trades survive costs. A flurry of marginal ones does not.
Frequency amplifies your net edge, positive or negative. A zero-cost backtest makes a losing high-frequency system look like a winner.
This is market-agnostic. A scalping bot on gold or the euro dies to spread plus commission the same way a crypto scalper dies to taker fees. As a scale check, at 0.1% per trade a system that trades about 500 times a year turns over roughly 50% of its capital in fees alone. One published study watched a strategy's ten-year return collapse from 17.1% gross to just 1.6% after costs. The edge was real, but almost all of it belonged to the exchange.
Overfitting: When Your Strategy Memorizes the Past
Overfitting, also called curve-fitting, is tuning a strategy's rules and parameters until they fit the historical chart's noise perfectly.
An overfit strategy describes the past beautifully but has learned nothing durable about the future. It creeps in through a few familiar doors: too many parameters and degrees of freedom, too few trades to be meaningful, optimizing on a single symbol and a single period, and data snooping, which is trying hundreds of variants and keeping the luckiest.
If your strategy has a special rule for every dip, it has not found a pattern. It has memorized the chart.
Warning signs you have curve-fit
- Too-smooth curve: A suspiciously smooth equity curve with shallow drawdowns.
- Sky-high win rate: A very high in-sample win rate that feels too good to be true.
- Oddly specific values: Parameters sitting on strange values such as RSI 37.5 or EMA 63.
- Fragile to nudges: Performance that collapses when you move a parameter slightly.
- One-symbol wonder: Results that hold on one coin or one date range only.
- Tiny sample: A track record built on fewer than about 100 trades.
Overfitting travels with a family of related biases worth naming, because each one flatters a backtest in its own way.
Using data that was not available at decision time, like a candle's close to trigger an entry during that same candle. Always act on closed candles.
Testing only on coins that still exist today, silently excluding the ones that went to zero.
The optimizer sees the test data, or you cherry-pick the best of many runs. It is a multiple-testing trap.
How to Test a Strategy So It Is Real
A strategy is only credible if a single, untouched rule set stays profitable across data it was never tuned on: other symbols, other periods, other market regimes. Work through this checklist before you trust a result.
Out-of-sample and walk-forward
Optimize on in-sample data, validate on unseen out-of-sample data, and reserve at least 30% for out-of-sample. A Walk-Forward Efficiency of 50% to 85% suggests a real edge; below about 35% suggests curve-fitting.
Multiple symbols and markets
A real edge generalizes. Test BTC, ETH, and several alts, ideally some uncorrelated pairs, and sanity-check forex majors or gold if the logic is meant to be general. Working on one symbol only is the number-one tell of a curve-fit.
Multiple time ranges and regimes
Test bull, bear, and sideways markets across different years. A system that only worked in the 2021 bull run is not robust. It just met one friendly environment.
Parameter sensitivity
Nudge each parameter by 10% to 20%. You want a plateau, a broad zone of settings that all work, not a spike or a cliff. Think of it as a stability score: the fraction of nearby variations still profitable.
Enough trades, realistic costs
Aim for 100 or more trades for statistical validity; a result from 5 to 12 trades is noise. Model fees, slippage, and funding, then stress-test with double the spread, higher slippage, and 100 to 200 milliseconds of latency.
Monte Carlo, then paper trade
Shuffle the trade order and randomly skip entries to see whether the result depends on luck or sequence. Then paper-trade before real capital. It is the honest bridge that no historical simulation can fake.
Metrics Beyond Total Return
Judge a strategy on its net-of-cost, out-of-sample numbers, never the gross, in-sample total return. Total return is the most flattering and least trustworthy metric there is. Look at the numbers that describe the quality and durability of the returns, not just their size.
Return after all fees, slippage, and funding are subtracted.
The deepest peak-to-trough fall, and whether you could survive it.
Gross profit divided by gross loss.
Return per unit of risk taken.
Hit rate weighed against the reward-to-risk ratio.
Similar results across every symbol and every period.
For the quant-minded, two advanced flags are worth knowing. The Probability of Backtest Overfitting estimates how likely your best configuration is a fluke. The Deflated Sharpe Ratio discounts a Sharpe figure for the number of variations you tried. Both formalize the same instinct: the more you searched, the more skeptical you should be.
The Same Traps Hit Forex and Gold
This friction is universal; only the names change. In forex and gold, you pay the bid-ask spread on every trade, often the entire cost on ECN or STP accounts, plus a per-lot commission. Positions held overnight pay or receive swap, the forex cousin of perpetual funding. Slippage explodes around scheduled news such as NFP, FOMC, and CPI, when spreads on gold and the majors can blow out several-fold in seconds.
MT4 and MT5 modelling quality settings, plus default zero-spread tests, inflate results exactly the way a zero-commission default does for crypto. Overfitting, weak robustness testing, and the frequency trap apply to a gold scalper and a crypto scalper in exactly the same way. Any strategy on any market must be tested net-of-cost and out-of-sample.
How Algonney Helps You Backtest Honestly
Algonney is built to expose these traps, not hide them. The platform models the costs your last backtest ignored and makes robustness testing the default, not an afterthought.
- Real historical backtesting: Across Binance, Bybit, and OKX, with fees and slippage modeled on every trade.
- Multi-symbol, multi-range testing: Run the same strategy across many symbols and date ranges in one place.
- Strategy Boost: Optimize parameters with validation, so you tune a plateau instead of a spike.
- Paper trading: Forward-test in real time before you risk a cent.
- Built-in risk tools: Stop-loss, take-profit, and trailing stops on every strategy.
Test your strategy with the real costs baked in, free.
Build a strategy, backtest it with modeled fees and slippage, and validate it across symbols and market cycles on Binance, Bybit, and OKX. Algonney does not guarantee profits; backtesting is a research tool, not a promise.
Frequently Asked Questions
Why does my strategy work in backtest but lose money live?
Because live trading adds costs and imperfections a default backtest ignores, such as fees, slippage, funding, and execution latency, and because many strategies are overfit to the past. Expect a 20% to 50% haircut versus a naive backtest, and always validate out-of-sample before going live.
How much slippage and fees should I assume in a crypto backtest?
Assume roughly 0.05% to 0.10% slippage per trade on top coins, and 0.5% to 2% on thin altcoins, on top of real taker fees of about 0.10% per side on spot and about 0.05% on futures. Then stress-test with double the spread and higher slippage to confirm the edge survives.
Do trading fees really matter if my strategy is profitable?
Yes, especially for high-frequency strategies. Costs scale with the number of trades, so a strategy with a tiny gross edge can flip from a gross winner into a net loser once fees and slippage are charged on every round trip. That is the frequency trap.
What is overfitting and how do I spot it?
Overfitting is tuning a strategy until it fits the historical chart's noise instead of a durable pattern. Tell-tale signs include a suspiciously smooth equity curve, too many parameters, oddly specific values, performance that collapses when you nudge a parameter, results from only one coin or date range, or fewer than about 100 trades.
How many symbols and how much data should I backtest on?
Test several symbols across bull, bear, and sideways regimes and multiple years, not one lucky symbol on one lucky period. A real edge generalizes; a result that only holds on a single symbol or date range is a curve-fit, not proof.
What is walk-forward or out-of-sample testing?
Out-of-sample testing optimizes a strategy on one slice of data and validates it on unseen data. Walk-forward analysis repeats this across rolling windows. A Walk-Forward Efficiency of roughly 50% to 85% suggests a real edge; below about 35% suggests curve-fitting.
How many trades does a backtest need to be valid?
Aim for at least about 100 trades for statistical validity. A result built on 5 to 12 trades is noise, not proof. The sample is far too small to distinguish a real edge from luck.
Does trading more make more money?
No. More trades pay more costs. Only a positive net-of-cost edge scales up with trade count. If your per-trade edge is negative after fees and slippage, trading more simply loses money faster.
Do these problems apply to forex and gold, not just crypto?
Yes. Slippage, spread and commission, swap or rollover, overfitting, and weak robustness testing hit forex and gold the same way. Only the names of the costs change. Any strategy on any market must be tested net-of-cost and out-of-sample.