Learn
Backtest vs live trading: why the results differ, and what to check first
A backtest replays your rules on past market data. Live trading sends real orders into today's market. The rules are the same, but the conditions are not — so live results are usually somewhat worse than the backtest, and occasionally very different.
This page explains where the gap comes from, how TradeLayout's backtest, paper trading and live trading are set up to keep it small, and a short checklist to go through before a strategy trades real money.
Six reasons live results differ from a backtest
- Slippage. A backtest fills at the traded price in the data. A real market order often fills a little worse, and much worse on fast moves and expiry days.
- Bid–ask spreads and liquidity. Far out-of-the-money strikes and stock options can have wide spreads and thin volume. The backtest has no order-book depth or market-impact model.
- Order timing. A live order reaches the exchange a moment after the signal, through your broker's API and its rate limits — not at the exact price the condition saw.
- Rejected or missed orders. Brokers can reject an order (margin, price bands, a blocked contract). A backtest never gets rejected.
- Gaps in the live price feed. If prices stop arriving, price-based stops cannot be checked until they resume. A backtest always has the next price.
- Changing markets. A period that suited the strategy may not repeat. A rule tuned to fit the past closely is the most likely to disappoint.
What charges alone did to a real backtest
In our NIFTY short straddle worked example, the strategy made ₹1,359 over 64 trading days before costs. Charges for its 256 orders came to ₹8,044, turning it into a loss of ₹6,685 — and that was with no slippage added. Live, slippage would have made it worse still.
That is why the first habit is the simplest: switch on charges and a slippage estimate before you judge any backtest.
How TradeLayout keeps the gap small
- One strategy for backtest, paper and live — no second copy of your logic to drift out of sync
- Tick-level backtests evaluate every second of data, closer to how intraday exits behave live
- In 1-minute backtests, when a stop and a target fall in the same minute, the stop is assumed
- Brokerage, STT, exchange charges, SEBI fee, stamp duty, GST and your slippage % as report switches
- Option strikes and expiries picked from the contracts that actually existed on each day
- Paper trading on live market prices, with no broker connection and no real money
- If the live feed goes quiet: automatic reconnect, an alert, and a check of the broker order book for missed fills
- Broker rejections shown as alerts naming the strategy, broker and run they belong to
Checklist before you go live
- Backtest with charges and slippage switched on, in tick-level mode for intraday options.
- Check the number of trades — a high win rate over a dozen trades says very little.
- Look at maximum drawdown and the worst day, and ask whether you could live with them.
- Change each setting a little. If the result collapses, the strategy is probably fitted to the past.
- Paper trade it on live prices for a few weeks and compare each day with what the backtest would have done.
- Set a daily loss limit, a square-off time and freeze windows before the first live run.
- Start live with the smallest size, and increase it only after live and paper results agree.
SEBI's static IP rule for retail algo trading
Under SEBI's framework for retail algorithmic trading, brokers accept API orders only from a static IP address registered to the client, and one static IP can belong to only one client. It does not change how a backtest works, but it is a step you must complete before any live order.
On a plan that includes live trading, TradeLayout gives you a dedicated static IP, used for all of your broker connections. You add it once in your broker's API settings; the app shows the address and where to enter it. Live orders go through your own Zerodha or Angel One account. More in paper & live trading.
SEBI's framework also asks algo providers to register with stock exchanges. TradeLayout's application is in progress; this page will be updated when it is complete.
Current limitations
What this does not do today, so you can decide before you sign up:
- Backtests have no order-book depth or market-impact model; fills use traded prices in the data.
- Statutory charges use the latest published rates, not the rates in force on each historical date.
- Live orders are market orders; limit orders are not available yet.
- Live orders can be placed only through Zerodha and Angel One today.
- Order speed is bounded by your broker's API and its rate limits; there is no exchange co-location.
Questions
Why is my live P&L lower than my backtest?
Does paper trading remove the gap?
Should I use 1-minute or tick-level backtests?
Do I need a static IP to backtest or paper trade?
Can a backtest tell me a strategy will make money?
Related
- Worked example: NIFTY straddleA real backtest with every charge — and a loss.
- Algo backtestingInstruments, execution modes and the report.
- Paper & live tradingPaper trade first, then go live.
- Options strategy builderStrikes, expiries and multi-leg setups.
- Reading resultsEvery number in the report explained.
Try it on your own idea
Sign up free, build the strategy on the canvas, and backtest it before you connect a broker. Trading involves risk of loss; a backtest is not a promise of future results — see the risk disclaimer.