WealthJot.ai

The Anatomy of a Backtest

intermediate8 min read

Universe, signals, entries, exits, costs — the moving parts every honest backtest must define.

Every honest backtestTesting a trading strategy on historical data. is built from the same handful of clearly-defined parts. If any one is vague, the whole result is suspect. Knowing the anatomy lets you both build a sound test and audit anyone’s claimed backtestTesting a trading strategy on historical data..

The discipline that makes a backtestTesting a trading strategy on historical data. honest is point-in-time correctness: at every moment in the simulation, you may use only the information that actually existed then. This sounds obvious but is violated constantly — using a stock’s current indexA basket of stocks tracked together to represent a market. membership for past dates, today’s restated earnings for old trades, or a signal computed from the day’s close to enter at that same close. Each tiny leak of futureA binding agreement to buy or sell at a set price on a future date. knowledge inflates results and is invisible in the equity curveA graph of a strategy’s account value over time.. So the anatomy isn’t just a checklist of parts — it’s a discipline of asking, for every single rule: “could I actually have known this at the time?” Define each component precisely and point-in-time, or your backtestTesting a trading strategy on historical data. is quietly cheating.
ExampleA backtestTesting a trading strategy on historical data. buys “the NiftyA basket of stocks tracked together to represent a market. 50 stocks” using today’s NiftyA basket of stocks tracked together to represent a market. 50 list for trades in 2015 — but that list has changed; you’re unknowingly buying the winners that got promoted into the index later (survivorship + look-ahead). The fix: use the historical index membership as it existed on each date. Same idea, point-in-time correct.
Key takeawayA sound backtestTesting a trading strategy on historical data. defines universe, signals, entries, exits, sizingDeciding how much to bet on each trade or holding. and costs — each precisely and point-in-time correct (using only data available at the moment). The discipline behind the anatomy is asking, for every rule, “could I have known this then?” — get that wrong and the backtestTesting a trading strategy on historical data. cheats invisibly.
FAQs
Which component matters most?

Exits and costs are the most underrated — exits drive a large share of the result, and ignored costs can turn a “winning” backtest into a real-world loser. But *point-in-time correctness* across all components is the make-or-break: a single look-ahead leak (often in the universe or signal) can fabricate an edge that doesn’t exist.