Building trading algorithms that hold up.
Practical guides to backtesting, market data and Python strategies: what makes a result trustworthy, and how to write code that gets there.
Look-ahead bias in backtesting, and how point-in-time data prevents it
Why backtests quietly use information that didn't exist yet, the five places it hides, and how point-in-time data keeps a strategy honest.
How to backtest a trading strategy in Python with the LEAN engine
A step-by-step walkthrough of a moving-average trend strategy in Python on LEAN: data, indicators, warm-up, orders, and how to read the report.
Overfitting in trading strategies: how to tell if a backtest is too good
Why tuned strategies fail on new data, the warning signs in a backtest, and the tests that catch overfitting: held-out data, walk-forward and robustness checks.
The Commitments of Traders report: using CFTC positioning data in a trading algorithm
What the CFTC's weekly COT report contains, the trader groups in each version, the Tuesday-to-Friday timing trap, and how to trade on it in Python.
Test your own idea on point-in-time data.
Write a strategy in Python or describe it to the AI assistant, and see a full backtest report in minutes.
Get started