Backtesting execution and costs
Core concept
A signal calculated at a completed close is not automatically executable at that same close.
Worked example
A rule signals at 100; the next open is 103. With 10 units, 10 basis points adverse slippage on each side, a later sale at 106 and ₹2 fee each side, gross before fees is 10×(105.894−103.103)=₹27.91; net ₹23.91.
Practice task
Compare same-close and next-open fills on identical signals.
Limitations
Use explicit order assumptions and check gaps, liquidity and fees.
