Craft
Why backtests lie, and how to make them lie less
A backtest is not evidence that a strategy works. It is a hypothesis about the past, and most of the ways it can mislead are built into how it was made.
Almost every trading strategy looks good in a backtest. That is not because most strategies work; it is because the process of building a backtest is a process of finding what would have worked, and the past is very accommodating to anyone searching it with enough parameters.
The usual suspects
Look-ahead bias is the most common fault and the hardest to notice: a calculation that quietly uses information that was not available at the time of the decision, such as a candle's close used to decide a trade inside that candle. Survivorship bias is the next: testing on the instruments that exist today ignores the ones that failed. Overfitting is the most seductive: with enough adjustable settings, any history can be matched, and the resulting curve describes the noise rather than the signal. And costs are the most frequently forgotten: a strategy tested without spread, commission and slippage is tested in a market that does not exist.
What makes a backtest more honest
Separate the data used to build a strategy from the data used to judge it, and judge it only once; a test window that is reused for tuning is no longer a test. Walk the strategy forward through time, re-estimating on the past and testing on the next period, so that it is always being judged on data it has not seen. Charge realistic costs on every fill, including adverse slippage on stops. Enter on the next bar after a signal, never on the bar that produced it. Insist on a sample large enough that the result could not be luck, and remember that the more strategies were tried, the higher the bar the survivor must clear.
From simulation to the market
Even an honest backtest is a simulation. The next step is to run the strategy on live prices without trading, and then with the smallest possible size, and to compare what actually happens with what the simulation predicted. The gap between the two, particularly in fill prices, is the most informative number a strategy produces. Simulators flatter; small live size tells the truth.
The right attitude
A backtest that passes every test above is still not proof. It is a reason to proceed carefully. Treating it as a hypothesis rather than a result is the single habit that most reliably separates participants who stay in the market from those who were briefly very confident in it.