⚠️ Warning: Backtests Lie
A profitable backtest does NOT guarantee future profits. Most backtests are overfitted, use
unrealistic assumptions, or contain look-ahead bias. This guide will help you avoid these traps.
CRITICAL
Look-Ahead Bias
Using future information to make past decisions. The #1 cause of false backtest results.
What It Looks Like
- Using candle CLOSE to decide entry on the SAME candle.
- Using future OHLC data to calculate indicators.
- Knowing the day's high/low before it happens.
- Corporate action adjustments applied retroactively.
How to Avoid
- Signal on bar N → Entry on bar N+1 open.
- Only use data available at the decision point.
- Never use same-candle entry based on close price.
↳ Click for
details
CRITICAL
Overfitting / Curve Fitting
Optimising parameters to fit past data so well that the strategy fails on new data.
Signs of Overfitting
- Strategy has 10+ parameters.
- Uses very specific values (e.g., RSI 67.3).
- Only works on one specific date range.
- Equity curve looks "too perfect".
Prevention Methods
- Walk-Forward Analysis — Optimise on past, test on future, roll forward.
- Out-of-Sample Testing — Reserve 30% of data for final validation.
- Keep It Simple — Fewer parameters = more robust.
- Parameter Stability — If results change drastically with small parameter
changes, it's overfit.
↳ Click for
details
IMPORTANT
Realistic Assumptions
Your backtest is only as good as your assumptions about fills, costs, and slippage.
What to Include
- Brokerage — Per-order charges (₹20 flat, ₹0, etc.).
- STT/CTT — Securities Transaction Tax on options.
- Exchange Charges — NSE/BSE transaction fees.
- GST — 18% on brokerage.
- Slippage — 0.1-0.5% depending on liquidity and order size.
Common Mistakes
- Assuming instant fills at exact prices.
- Ignoring impact cost for large orders.
- Not accounting for option premium decay.
- Using EOD data for intraday strategies.
↳ Click for
details
PRO_TIP
Indian Market Specifics
Backtesting for NSE/BSE requires Indian-specific considerations.
- Market Hours — 9:15 AM to 3:30 PM IST.
- Weekly Expiries — NIFTY (Thursday), BANKNIFTY (Wednesday), FINNIFTY
(Tuesday).
- Lot Sizes — NIFTY 25, BANKNIFTY 15, FINNIFTY 25.
- Circuit Limits — 5%, 10%, 15%, 20% on indices.
- No Pre/Post Market — Unlike US markets.
- Expiry Day Volatility — Last hour on expiry is highly volatile.
- VIX Impact — High VIX periods behave differently.
↳ Click for
details