Learn
Common mistakes that make trading backtests look better than they are, and how to test for each one. Every code example runs on synthetic data, and every result shown is hypothetical.
Lookahead bias in pandas: 8 ways a backtest sees the future
Eight common pandas patterns that leak future data into a backtest, each with a fix and a runnable test on synthetic data.
Survivorship bias in backtests: delisted stocks and reused tickers
Why a backtest on today's index members is biased, how to build a point-in-time universe with delisted stocks, and how reused tickers break joins.
The deflated Sharpe ratio in Python: how many strategies did you try?
What the deflated Sharpe ratio corrects for, a short Python implementation checked against the paper's worked example, and how to count your trials.
Point-in-time fundamentals: filing dates, acceptance times and restatements
Why joining fundamentals by period end or filing date leaks into a daily backtest, what SEC acceptance times show, and how to do an as-of join in pandas.