Backtesting applies explicit trading rules to historical data. It asks how those rules would have behaved under specified assumptions—not how much you will earn next month. The most valuable result may be.
Educational guide. Examples are hypothetical, not live quotes. Not personalized investment advice.
Backtesting applies explicit trading rules to historical data. It asks how those rules would have behaved under specified assumptions—not how much you will earn next month. The most valuable result may be discovering that an attractive idea disappears once you remove hindsight and include realistic costs.
Write the rules before inspecting the result
Specify the asset universe, venue, timeframe, signal, entry timing, position size, exits and maximum simultaneous exposure. Also specify missing-data treatment and any borrowing or short-selling requirements. A simple rule with clear assumptions is easier to audit than a collection of exceptions invented to improve the equity curve.
For illustration only, imagine a rule that observes a completed daily close relative to a moving average and trades no earlier than the next available execution opportunity. This is a test specification, not a recommended strategy. A signal using the final close cannot magically receive a fill earlier in that same candle.
Check what your data actually represents
Use consistent timestamps and time zones. Check for duplicate candles, missing intervals, venue outages and suspicious prices. Do not assume every aggregated quote could have been executed on your intended exchange. For derivatives, contract specifications and funding history matter; for spot, listing dates and available pairs matter.
Avoid survivorship bias. Today's successful tokens do not represent all tokens that existed in the past. Excluding failed or delisted assets can make a strategy look more resilient than it was. Market data available today may also contain revisions or classifications that were not known at the time.
Three shortcuts that invalidate a result
Look-ahead bias uses information before it was available. Examples include trading on an unclosed candle or using a later-revised data point as though it were known then. Shift signals and execution deliberately, and audit several trades by hand.
Overfitting means tuning a rule to historical noise. Trying hundreds of parameter combinations and reporting only the winner creates a hidden selection problem. Record what you tried, prefer understandable rules and do not present the best run as an unbiased discovery.

Intrabar ambiguity arises when candle data cannot reveal event order. If both the stop and target were inside a candle's range, OHLC values alone may not reveal which happened first. Use finer data or a conservative assumption, and disclose the choice. A high or low touching a limit also does not prove your order had execution priority.
Include the costs of actually trading
Deduct entry and exit fees, model spread and slippage, and include financing or funding where relevant. Respect minimum order sizes and plausible liquidity. Test higher costs as a stress case. An approach requiring impossible fills is not improved by a more attractive chart.
In a hypothetical test with $10,000 of starting equity, gross profit of $800 and total modeled costs of $350 produce $450 net profit, or 4.5%, before taxes and omitted effects. Gross return alone would have shown 8%. Neither number says anything about the size of drawdowns along the way.
Separate development from evaluation
Use an earlier period for development and a later, untouched period for evaluation. A walk-forward process repeatedly develops on earlier information and evaluates on subsequent windows. Once you repeatedly tune against a held-out set, it is no longer truly untouched. Test across rising, falling and sideways conditions where suitable data exists.
Review net return alongside maximum drawdown, exposure, turnover, trade count, average win and loss, and dependence on a few outliers. Drawdown measures decline from a prior equity peak; a good final balance can conceal an intolerable path. A small sample or one lucky trade can dominate summary statistics.
The next step is another test
Preserve the rules, data window and assumptions so someone else could reproduce the result. Then use https://realcryptocap.com/articles/crypto-paper-trading-guide to forward-test the unchanged rules. Historical profitability is not a forecast, and a backtest does not establish that risking real capital is suitable.
Sources and further reading: Binance Academy, What Is Backtesting? — https://academy.binance.com/en/articles/what-is-backtesting; Binance Academy, How to Backtest a Trading Strategy — https://academy.binance.com/en/articles/how-to-backtest-a-trading-strategy. Independent explanation with original examples.