A strategy I once tested quoted +740% in the backtest. When it actually traded, it made about $2.81.
That gap - between what a backtest promises and what a live market pays - is where most trading bots quietly die. I've spent three years building bots in Python, and the most valuable thing I've learned isn't a strategy. It's that a backtest is the easiest thing in the world to rig in your own favor, usually by accident.
Here are the four ways it lies, each with a real number from my own testing, and how to catch each one before it costs you money.
The baseline: an honest test of the "hello world" strategy
First, a calibration. The classic moving-average crossover - SMA(9/21), the strategy every tutorial starts with - backtested honestly on 1,000 hours of real BTC/USDT, with decisions using only past, closed bars:






