Educational Reference
From Backtest to Broker: The Execution Gap That Kills Paper Edges
A backtest fills you at a price the market never offered. The distance between the paper result and the live result is not one mistake, it is a stack of six: the spread you cross, the slippage past it, the partial fill, the rejected order, the delay between signal and arrival, and the price you move with your own size. Each looks negligible on its own. This page builds each one as a number, adds them up, and computes the level of friction at which the edge reaches exactly zero.
The finding, stated first. On an illustrative rule with a stated gross edge of 30 basis points a round trip, the modelled execution stack came to 44.5 basis points. The edge did not shrink, it inverted, from 29.9 basis points on paper to a loss of 14.6 basis points in the account. Fifty-three percent of that friction was the statutory and broker charge stack, which most traders already know about. The other forty-seven percent was execution, which most backtests do not model at all.
The price your backtest used was never offered to anyone
A backtest reads a number out of a file and books a trade at it. That number was printed by somebody else's transaction: a different order, at a different size, at a moment that has already passed. It was never quoted to you. It was almost certainly not available in the quantity you wanted. Nothing in the data file records whether you could have had it, and nothing in the software asks. The fill is recorded and the loop moves on to the next bar.
This is not a bug in any particular platform. It is a consequence of what a price file is. A daily bar carries four numbers and a volume, and none of the five is a promise of execution. The close is the last trade of the session, often at a size far smaller than yours and frequently in an auction you would not have participated in. The high and the low are single prints. Even tick data, which records every transaction, records transactions that happened, not the transactions that would have happened had your order joined the queue. The moment you add your own order to a book, the book is no longer the one in the file.
Our guide to the eight ways a backtest can lie lists this failure as one of the eight and calls it execution fantasy. That page describes the shape of the problem: fills at the touch, no partial fills, ignored lot sizes, trading through circuit freezes, and the observation that every one of these errors flatters the curve rather than harming it. This page is the arithmetic underneath that section. It does not add a new failure to the catalogue. It takes the seventh one, breaks it into six measurable pieces, gives each a defensible number, and then computes the threshold at which the total kills the edge.
The reason this deserves its own page is that the components are individually dismissible and collectively decisive. Told that the spread will cost three basis points a leg, a reasonable person shrugs. Told that a rejected order happens four times in a hundred, a reasonable person shrugs again. Six shrugs later the edge is gone. The stack is the argument, not any single line in it, and a stack can only be argued about if somebody writes the lines down with numbers attached.
Everything below is illustrative and simulated. The statutory rates are the real ones and are cited as such. The behavioural assumptions, how wide the spread is, how often an order is rejected, how much price you give up while your order is in flight, are stated openly so that you can substitute your own and get a different answer. That is the point of building it as a model rather than a warning.
The life of one order, and where the bill is collected
Before any arithmetic, it helps to see that a live order has a life. The backtest models an instant. What actually happens is a sequence of seven stages, and something is subtracted at nearly every one of them.
The signal is computed at a price you can see on a screen. That is the last moment at which the backtest and reality agree, and it is where the backtest stops. From there the order has to be transmitted, which takes time, and during that time the price moves. It arrives at a gateway that may refuse it, because of a margin shortfall, a price band, an order-rate limit, a frozen quantity rule or a plain rejection from the exchange. If it survives, it meets an order book that has a bid, an ask and a finite quantity at each. If your order is marketable, you cross the spread by construction, and if it is larger than the quantity resting at the touch, it walks the book to worse prices.
Then the book may fill only part of it, because the quantity you wanted was not there or was taken by somebody faster. Then, if your order is large relative to the name's ordinary daily activity, the fact that you traded at all pushes the price against you, and pushes it again on the way out. And finally, after all of that, the statutory and broker charges are levied on whatever was actually transacted.
Two features of that sequence matter more than any individual number. The first is that the losses are one-directional. Random error would cancel over many trades. These do not cancel, because the spread is always crossed in the direction that costs you, the queue always fills the other side first when the price is about to move, and the tax is always collected. The second is that the sequence has a shape: the early stages cost the most when you trade fast, and the late stages cost the most when you trade large. That interaction is the practical content of this page and it is computed further down.
Two of the six components have their own explainers on this site and are not re-taught here. If the mechanics of the quoted gap are unfamiliar, start with the bid-ask spread, and if the concept of a fill arriving away from the price you expected is new, start with what slippage is. What follows assumes both and goes to the question those pages do not answer, which is how much the whole stack costs and what it takes to survive it.
The strategy, stated so it can be argued with
A model that hides its assumptions cannot be disagreed with, which makes it useless. Every input is listed below. Where a rate is statutory it is cited to the instrument that sets it. Where an assumption is behavioural it is labelled illustrative, which means you should replace it with a figure measured from your own account before drawing any conclusion about your own system.
| Input | Value | Where it comes from |
|---|---|---|
| Segment | Equity delivery, cash market | Chosen because its statutory stack is the heaviest, which makes the arithmetic visible. An intraday variant is computed later |
| Order size | 2,00,000 rupees a leg, illustrative | A plausible retail position. The model is re-run across seven sizes later, because the answer changes with size |
| Gross edge | 30.0 basis points a round trip | Stated, not derived. A modest but real edge before any friction. Illustrative |
| Turnover | 100 round trips a year | Stated. Implies a holding period of about 2.5 trading days |
| Per-trade dispersion | 284.6 basis points | Derived from 1.8 percent daily volatility over a 2.5 day hold. Note that this is 9.5 times the edge |
| Securities transaction tax | 0.100% buy and 0.100% sell | Finance (No. 2) Act 2004, section 98, Table serials 1 and 2, rate set 1 July 2012 and unchanged by the Budgets of 2024, 2025 and 2026 |
| Stamp duty | 0.015%, buy side only | Indian Stamp Act 1899, Schedule I, Article 56A(b), effective 1 July 2020, uniform across states for delivery transfer |
| Exchange transaction charge | 0.00307% a side | 307 rupees a crore each side on the larger cash market, effective 1 March 2026, inclusive of the investor protection component |
| Regulator turnover fee | 0.0001% a side | 10 rupees a crore, Stock Brokers Regulations 2026, Chapter IX, Regulation 41(1), in force 7 January 2026 |
| Goods and services tax | 18% on the service lines | Applied to brokerage, exchange charges, the regulator fee and the depository charge. Not applied to the transaction tax or stamp duty |
| Brokerage | 20 rupees a leg, flat, illustrative | Commercial, not statutory. A flat-fee model is assumed because it dominates Indian retail |
| Depository charge | 15 rupees on the sell debit, illustrative | Commercial. The depository itself charges the participant 3.50 or 4.00 rupees a debit; what reaches you is a markup the participant sets |
| Quoted spread | 6 basis points, illustrative | A liquid but not index-heavyweight name. Half is crossed on each leg |
| Slippage past the touch | Mean 4, deviation 6 basis points a leg | Illustrative. Allowed to be negative, so price improvement happens |
| Signal to arrival delay | 900 milliseconds | Illustrative for a retail path. Adverse drift assumed at 0.35 of one standard deviation over the delay |
| Participation | 0.05% of the name's daily traded value | Implied by a 2,00,000 rupee order in a name turning over about 40 crore rupees a day, illustrative |
| Impact model | Square root of participation, constant 0.5 | The standard approximation. Calibrated on institutional parent orders, so at retail size treat it as the least reliable line in the stack |
| Rejection rate | 2.8% ordinary bars, 15% fast bars | Illustrative, producing 4.0% overall. Rejection is deliberately made to cluster on fast bars |
| Partial fill rate | 8% ordinary bars, 28% fast bars | Illustrative, producing 9.4% overall. Filled fraction drawn between 0.40 and 0.90 |
| Simulation | 4,000,000 intended signals, seed 20260731 | Deterministic. Re-running the script reproduces every figure on this page exactly |
One line in that table is worth pausing on before anything else. The transaction tax on delivery equity is one tenth of one percent on the purchase and one tenth of one percent on the sale. That is twenty basis points on a round trip, levied whether the trade wins or loses, and it is the single largest item in the entire stack by a wide margin. The full charge stack across every segment, worked to the paisa with the reasoning for each line, is set out in the companion on the real cost of a trade in India, and it is not rebuilt here. What this page adds is what happens when those charges meet the execution components the charge sheet never mentions.
Component by component, with a number attached
Six execution components plus the charge stack. Each is defined, given a modelled value, and paired with the calculation that recovers it from your own records. The last column is the important one, because a component you cannot measure is a component you will keep guessing about.
| Component | Modelled | What it is, and how to measure it on your own records |
|---|---|---|
| Statutory and broker charges | 23.73 | The tax, stamp, exchange, regulator, brokerage, depository and tax-on-services lines. Read them straight off your contract notes and divide by the position value. The only component you do not have to estimate |
| Slippage past the touch | 7.41 | The distance between the price at the far touch when you sent the order and the price you were filled at. Log the quote at send time, compare with the fill, average across at least a hundred fills |
| Spread crossed | 5.56 | Half the quoted gap, on each leg, for any order that takes liquidity. Take the mid at send time, subtract your fill, and you have crossed spread and slippage together. Separate them by logging the bid and the ask |
| Market impact of your size | 3.79 | The price your own order moved. Compare the mid five minutes after your fill with the mid before you started. It is noisy on one trade and stable across a hundred |
| Rejected orders | 1.84 | Signals that never became positions. Count rejects as a share of orders sent, then compute what those trades would have returned. The count is easy and the second half is the part everybody skips |
| Partial fills | 1.41 | Positions smaller than intended, plus the cost of chasing the balance. Compare intended quantity with filled quantity on every order and record the ratio, not just the exceptions |
| Latency drift | 0.74 | The move between the timestamp on the signal and the timestamp on the order acknowledgement. Both timestamps are already in your order log. Multiply the median delay by the instrument's per-second volatility |
| All in | 44.47 | Against a gross edge of 29.89 basis points, which is what the four million simulated signals actually averaged against a stated 30.0 |
Four of those lines deserve more than a table row, because the intuitive story about each of them is wrong in an interesting way.
Rejected orders are not free, and they are not expensive for the reason you think. A rejected order forgoes the edge, but it also forgoes the friction, so when friction exceeds the edge a rejected order actually saves money. The cost is not the volume of rejects, it is which trades get rejected. Rejection clusters on fast bars: price bands trigger there, margin gets tight there, order-rate limits bite there, and those are exactly the bars where a breakout rule's best entries live. In this model the rejected signals carried an average gross edge of 45.5 basis points against an overall average of 29.9. Had rejection been random with respect to the bar, the cost would have been 1.24 basis points. Because it is selective, it is 1.84. Six tenths of a basis point of that is pure selection, and the direction of the selection depends on your rule: a rule that fades fast moves would find rejection saving it money rather than costing it.
Partial fills cost the least and worry people the most. At 1.41 basis points this is the second smallest line in the stack. That figure is honest and it is also incomplete, because the real cost of a partial fill is not in the average, it is in the variance. A half-filled entry leaves you carrying half the exposure you sized for, which quietly halves your position sizing discipline. A half-filled exit is worse: you are still holding something you decided to be rid of, on a bar you have already judged to be against you, and whatever happens next was not in your plan. Neither of those shows up in an expected-value calculation. Both show up in the distribution of outcomes, and the distribution is what position sizing is actually about.
Latency is the smallest line here and the one most often oversold. At 900 milliseconds against a name with 1.8 percent daily volatility, the modelled cost is 0.74 basis points for the round trip. Cut the delay to 50 milliseconds and it falls to 0.19. Let it stretch to eight seconds and it rises to 2.38. Those are real differences and they are also, for a rule holding positions for two and a half days, a rounding error next to a twenty basis point transaction tax. Speed matters enormously at horizons where the edge itself is measured in single basis points. At the horizons most retail systems operate on, spending money on latency while ignoring the charge stack is optimising the wrong end of the sequence.
Market impact is the component that grows with you. At 0.05 percent of the name's daily traded value it is 3.79 basis points, which is unremarkable. Impact scales with the square root of participation, so it quadruples when you multiply your size by sixteen. That is the mechanism by which a strategy that works at one account size stops working at another, and it is also why the liquidity of what you trade is a strategy parameter rather than a background condition. A rule that only functions in names where your order is a large fraction of the daily book has a capacity limit, and the limit is computable before you hit it rather than after.
The waterfall: what actually reaches the account
Stacking the components in the order they attach to the order gives the figure this page exists to produce.
The paper edge on the left is 29.9 basis points, which is what four million simulated signals averaged against a stated 30.0. Each coral bar is one component, deducted in the order in which it arises in the life of the order rather than in order of size. The bar heights depend on that ordering, because a component charged on a smaller surviving position costs less in absolute terms than one charged earlier. The total does not depend on the ordering, and the total is 44.47 basis points.
What lands in the account is a loss of 14.58 basis points a round trip. The edge was not reduced by the execution stack. It was reversed by it. Expressed as a ratio, the friction consumed 149 percent of the paper edge the simulation drew, or 148 percent of the stated 30.0, the difference between the two being sampling noise across four million draws. Round it to one and a half times the edge and you have the number worth remembering, because it converts an abstract worry into a single comparison you can make against your own system.
Notice how the stack divides. The charge line alone is 23.73 basis points, or fifty-three percent of the total, and more than three quarters of it is one item: the transaction tax at twenty basis points a round trip on delivery equity. That is the half of the problem the Indian retail trader already knows about, or at least can look up. The other forty-seven percent, the 20.7 basis points of spread, slippage, impact, rejects, partials and latency, is the half that no contract note itemises and no backtesting platform charges by default. It is invisible in exactly the way that makes it dangerous: nothing produces a line item, nothing generates an alert, and the money is gone before anybody has thought to look for it.
It is worth being precise about what this result is and is not. It is not a claim that all strategies lose money. It is the arithmetic consequence of pairing a 30 basis point edge with a 44 basis point stack, and if you change either number you change the sign. The value of the calculation is not the conclusion, it is that the conclusion is now a function of two things you can measure rather than a matter of opinion.
Breakeven, which turns a warning into a threshold
A warning cannot be tested. A threshold can. There are two versions of the breakeven question and both are worth computing.
The first is trivial and useful. At what level of round-trip friction does the edge reach exactly zero? At the stated turnover, the answer is the edge itself: 30.0 basis points. Any all-in friction above that and the rule is a machine for converting effort into taxes. The modelled friction is 44.47, so the rule is 14.47 basis points, or forty-eight percent, over its own limit. That single comparison, your measured friction against your estimated edge, is the whole diagnostic, and most traders have never computed either side of it.
The second version is more interesting, because it is about turnover rather than the edge. If you slow the rule down, each trade holds longer, and a longer hold captures a larger move. Under a random-walk assumption the achievable edge per trade grows with the square root of the holding period, while the friction per trade does not grow at all. This gives a closed form. If the edge per trade is proportional to the square root of the holding period, then net annual edge equals a constant times the square root of turnover, minus friction times turnover. Differentiate and the optimum falls out, and the two thresholds have a fixed relationship: the breakeven turnover is exactly four times the optimal turnover, always, for any friction level.
On the modelled friction of 44.5 basis points, the rule breaks even at about 46 round trips a year and is at its best at about 11, which corresponds to holding roughly twenty-two trading days. Run at the stated hundred round trips, it is at more than double its breakeven turnover, which is why the waterfall came out negative. Nothing was wrong with the rule. It was being run at a speed its friction could not support.
The gold curve is the important one, and it is the reason optimisers produce fast strategies. With friction set to zero, the curve has no maximum. It rises for as long as you extend the axis, so a frictionless backtest, asked to choose a turnover, will always choose more. It has no mechanism for telling you to slow down. Every parameter search you run on a zero-cost or commission-only backtest is being quietly pushed toward the fastest variant, and the fastest variant is precisely the one that friction will destroy first. Set the friction to brokerage alone, at 2.36 basis points a round trip, and the breakeven turnover comes out above sixteen thousand round trips a year, which is about sixty-five a day and a level at which the model has stopped describing anything real. That absurd number is the point: a backtest that charges only commission is, for practical purposes, frictionless.
These thresholds also give you a decision rule that is easier to act on than a general resolution to be careful. Compute your friction, compute the resulting breakeven turnover, and compare it with the turnover your rule actually generates. If your rule trades more often than its breakeven, you have three levers and only three: trade less often, cut the friction, or find more edge per trade. Everything else is decoration. The same discipline of deciding the threshold before you see the answer is what makes a walk-forward test honest, and the two exercises pair naturally: walk-forward tells you how much of the in-sample edge is real, and this calculation tells you how much of the real part survives contact with a broker.
Why the same friction is trivial, fatal and then absurd
This is the interaction most retail traders miss, and it is the reason two people can look at the same cost figure and reach opposite conclusions honestly. Take the identical friction, 44.5 basis points a round trip, and apply it to three rules that differ only in how often they trade.
At twenty round trips a year, a holding period of about twelve and a half trading days, the rule earns 67.1 basis points a trade and pays 44.5. Friction consumes sixty-six percent of the edge. That is a heavy toll and the rule survives it, finishing the year 452 basis points ahead on these assumptions.
At a hundred round trips, a hold of two and a half days, the achievable edge has fallen to 30.0 basis points because there is less time for a move to develop. Friction has not fallen at all. It now consumes 148 percent of the edge, and the year finishes 1,447 basis points behind.
At five hundred round trips, half a day each, the edge is 13.4 basis points against the same 44.5. Friction is 331 percent of the edge and the annual friction bill alone comes to 22,237 basis points of the capital turned over. The rule is not slightly unprofitable, it is absurd, and no improvement in signal quality of any plausible size can rescue it.
The asymmetry has a clean explanation. The edge per trade shrinks as the holding period shortens, because a shorter window contains a smaller move. The friction per trade does not shrink, because the tax, the spread and the fees are charged per round trip and are indifferent to how long you held. Trade twenty-five times more often and you pay twenty-five times the friction while the edge per trade falls by a factor of five. That is a divergence of a hundred and twenty-five to one, and it is arithmetic, not opinion.
Here is the result that complicates the story, and it belongs on the page for exactly that reason. A rule running at five hundred round trips a year would not sit in the delivery segment at all. It would be intraday, where the transaction tax is levied at 0.025 percent on the sell leg only rather than 0.1 percent on both, stamp duty falls to 0.003 percent, and there is no depository debit. The charge stack drops from 25.49 basis points to 5.91, a saving of nearly twenty. That is a genuine and large discount and it changes the answer at moderate speeds: on the lighter stack the hundred-round-trip rule stops losing and finishes 371 basis points ahead, and the breakeven turnover rises from 46 to about 130.
What the discount does not do is save the fast rule. The execution components, the spread, the slippage, the impact, the rejects and the partials, do not care which segment you are in, and they add up to 20.7 basis points that the intraday trader pays in full. At five hundred round trips the lighter stack still leaves the rule 6,439 basis points behind for the year. The lesson is not that intraday is cheaper, although on the statutory lines it plainly is. The lesson is that as you speed up, the part of the stack you can do something about shrinks and the part you cannot grows, until the execution components alone are more than the achievable edge. Beyond that point the segment you choose is irrelevant.
Why a losing rule still shows winning years
If the arithmetic is this clear, the obvious question is why anybody keeps running rules that lose. The answer is that a year of trading is far too small a sample to notice.
Simulating four hundred thousand years of a hundred round trips each, the paper version of this rule finished above zero in 85 percent of them. The identical years, with the execution stack charged, finished above zero in 31 percent. Not five percent. Not one. Roughly three years in ten, a rule with an expectancy of minus 14.6 basis points a trade hands its owner a profitable year and every reason to continue.
The mechanism is the ratio between the signal and the noise. The per-trade dispersion in this model is 284.6 basis points, which is nine and a half times the gross edge and nearly twenty times the size of the loss. Over a hundred trades the year's outcome has a standard deviation of about 2,843 basis points around a mean of minus 1,445. A distribution that wide, centred that close to zero, produces winning years often enough to be mistaken for a working system for a very long time.
How long is computable. To separate a mean of minus 14.6 basis points from zero at two standard errors requires roughly 1,524 round trips, which at a hundred a year is about fifteen years of trading. Extend the test to three consecutive years and the paper version wins 97 percent of the time while the live version wins 19 percent, so the gap does widen, but nineteen percent is still an ordinary run of luck rather than a rare event. Most traders will abandon the rule for emotional reasons long before the statistics settle, and will attribute the abandonment to discipline or to markets having changed.
This is the practical argument for measuring friction rather than inferring it from results. The friction is a near certainty and the edge is a lottery, so they require wildly different sample sizes to establish. Pinning down the average slippage on your fills to within one basis point takes about 144 fills, which is a few months of ordinary activity. Establishing that a 30 basis point edge is real rather than noise takes about 360 round trips. Measure the cheap thing first, subtract it, and you at least know what the expensive thing has to beat.
The stack is a function of your size, and the cheapest point is in the middle
One more result falls out of the model and it is not the one most people expect. Friction per round trip is not a constant that scales with the account. It is U-shaped in order size, and the trough is computable.
At twenty-five thousand rupees a leg, illustrative, the all-in friction is about 64 basis points. The flat brokerage and the depository debit, which are the same rupee amounts regardless of size, are enormous as a percentage of a small position. At two lakh a leg the flat fees have been diluted and market impact is still negligible, and the friction bottoms out near 44 basis points. From there it climbs again: at fifty lakh a leg it is about 57, and at two and a half crore about 80, because impact grows with the square root of participation and eventually dominates everything else.
The practical readings are worth stating plainly. A very small account is not cheap to trade, it is expensive, and the expense is entirely the flat fees. Doubling the position size of a very small trader improves the friction more than any change to the strategy would. At the other end, an account that has grown past the trough faces a rising cost curve that no broker negotiation can fix, because the growing component is the trader's own footprint in the book. And in the middle there is a range, roughly two to ten lakh a leg on these assumptions, where friction is close to its minimum and largely flat, so size can change without the cost model changing much.
What none of this justifies is treating the trough as a target. The curve is drawn on one set of assumptions about one instrument's daily traded value, and moving to a more liquid name shifts the impact half of it substantially. The transferable point is the shape, not the coordinates: fixed costs punish the small, impact punishes the large, and the only way to know where you sit is to compute the curve with your own fee schedule and your own instruments.
Measuring your own gap
Every number on this page is illustrative. The version that matters is the one computed from your own fills, and it takes an afternoon of record keeping rather than any new skill. The comparison below is deliberately structured as a table you can fill in, because a gap you have quantified stops being an anxiety and becomes an input.
| What to compute | What a healthy answer looks like | What it means if it fails |
|---|---|---|
| Mid at send time, minus your fill, averaged over all entries | Close to half the quoted spread, and stable across market conditions | If it is several times the half-spread, you are chasing. Check whether your orders are marketable and whether your signal is late |
| The same figure for exits, separately | Similar in magnitude to entries | Exits much worse than entries usually means stops firing into fast markets. That cost belongs in the backtest as a conditional, not an average |
| Filled quantity divided by intended quantity, on every order | Above 0.95, with the exceptions clustered on identifiable bars | A persistently low ratio means you are sizing beyond the book. Reduce size or accept that your backtest is testing a position you cannot take |
| Rejects as a share of orders sent, and the return those signals would have earned | Low, and with no relationship to how good the trade would have been | If rejects cluster on your best signals, the true cost is several times the reject count. Fix the cause: margin buffer, order type, or rate limits |
| Median gap between signal timestamp and acknowledgement timestamp | Consistent, with a short tail | A long tail matters more than the median, because the slow orders are the ones sent when everything is moving |
| Mid five minutes after your fill, against the mid before you started | No systematic movement in your direction | Systematic movement means you are moving the price. Compare the size of the move with your participation rate to sanity check the impact estimate |
| Total charges from contract notes, divided by position value | Matches what your backtest deducts, to the basis point | Almost every backtest understates this. It is also the easiest line to fix, because the number is printed for you |
| All of the above summed, against your estimated edge per trade | Friction well under the edge, with margin for it to worsen | If friction is above the edge, no amount of signal improvement of a realistic size will help. Reduce turnover first |
Three habits make the difference between a diagnostic that works and one that quietly lies. The first is to log the quote, not just the fill. A fill price on its own tells you nothing about whether it was good, because you have no reference point. Record the bid, the ask and the timestamp at the moment you send, and every other number on this page becomes computable from your own data.
The second is to keep the rejects and the partials in the record. The natural instinct is to treat them as failed attempts and exclude them, which is precisely the error, because it deletes the trades whose absence is the cost. A log that contains only completed trades cannot measure the gap, and it will produce a comfortable answer for the same reason a survivorship-biased universe does.
The third is to charge the measured figure back into the backtest and re-run it. This is the step that converts the exercise from an audit into a research tool. A strategy that was interesting at zero cost and remains interesting at your measured friction is worth continuing with. One that only worked at zero cost has told you something, and the correct response is to accept the information rather than to look for a cheaper broker and try again.
What this model does not capture
Several real costs are absent from the arithmetic above, and pretending otherwise would repeat the error the page is about.
Lot sizes are not modelled. In derivatives you cannot trade an arbitrary quantity, and rounding to whole lots changes both the position size and the friction as a percentage, usually for the worse on a small account. Short-selling constraints are not modelled either, nor are circuit limits, where the simulated price exists and no fill does at any size. Each of those makes the picture worse rather than better.
The behaviour of the trader is not in the model at all. A live trader hesitates, sizes differently after a loss, and occasionally does not take the signal. Those effects are real and are frequently larger than the entire execution stack, and they are not amenable to this kind of arithmetic. The model is a floor on the gap, not an estimate of it.
The impact constant is the weakest line. The square-root approximation is calibrated on institutional parent orders worked over hours, and applying it to a single retail order is an extrapolation well outside its calibration range. It is used here because there is no better simple formulation and because the shape it produces, growing with the square root of participation, is robust even when the constant is not. Treat the impact number as an order of magnitude rather than a measurement, and measure your own if the number matters to your decision.
Finally, the edge-scaling assumption in the turnover section, that the achievable edge grows with the square root of the holding period, is a random-walk convention rather than a law. Some rules do better than that and some do considerably worse. The relationship it produces between the optimal and the breakeven turnover is exact given the assumption, and the assumption is a modelling choice you are free to reject. The qualitative conclusion, that friction penalises frequency far more than it penalises patience, survives any reasonable alternative.
What to do with the number
The purpose of quantifying the execution gap is not to conclude that trading is impossible. It is to move the gap out of the category of things one worries about vaguely and into the category of things one measures and then acts on.
Three actions follow from the arithmetic and they are ordered by leverage. Reducing turnover is the most powerful, because friction scales linearly with the number of round trips while the achievable edge per trade only grows with the square root of the hold. Halving your trading frequency cuts the friction bill in half and reduces the edge you need per trade by a factor of about one and a half, which is the most favourable trade any of these levers offers. Reducing the friction itself is the second, and within it the statutory lines are mostly fixed while the execution lines are mostly not: order type, order timing, instrument liquidity and position size are all under your control and all move the spread, slippage and impact terms. Finding more edge is third, and it is listed last on purpose, because it is the only one of the three whose success cannot be verified in advance.
There is also a discipline point that the numbers do not contain. The temptation, on discovering that the friction exceeds the edge, is to adjust the friction assumption downward until the strategy passes. This is the same move as re-running a validation until it relents, and it fails for the same reason: the assumption is not the thing that determines the outcome, the market is, and a spreadsheet cannot be negotiated with on the market's behalf. The friction figure should be measured once, from records, and then treated as a fixed input against which strategies are judged, not as a parameter that gets tuned when the answer is unwelcome.
None of this requires sophisticated tooling. It requires logging the quote alongside the fill, keeping the rejects in the file, charging the measured number back into the test, and being willing to abandon a rule whose edge does not clear its own friction. Those are habits rather than techniques, and they are what separates a system that has been tested from one that has merely been described. If the arithmetic on this page struck you as the interesting part of trading rather than the tedious part, that is the method we teach.
FAQ
Frequently asked questions
What is the execution gap between a backtest and live trading?
It is the distance between the price a backtest assumed and the price a broker actually delivered, expressed as a cost per round trip. It is not one thing. It is a stack of six: the spread you cross, the slippage past the touch, the partial fill that leaves you under-positioned, the order the exchange refuses, the price drift while your order is in flight, and the price your own size moves. In the illustrative model on this page those six came to 20.7 basis points a round trip, and the statutory and broker charges added another 23.7 on top, for an all-in figure of 44.5 basis points.
How much does the execution gap actually cost?
There is no universal figure, which is why the page builds a model rather than quoting one. On the stated assumptions, an illustrative delivery trade of 2,00,000 rupees a leg carried 44.5 basis points of all-in friction a round trip. Against a stated gross edge of 30 basis points, that consumed 148 percent of the edge and turned a paper gain into a loss of 14.6 basis points. Your own figure depends on your segment, your order size, the liquidity of what you trade and how you send orders. The useful output is not the number but the method, because the same arithmetic run on your own contract notes and order log gives you a figure you can defend.
How do I compute the breakeven friction for my own strategy?
Breakeven friction is simply your gross edge per round trip. If your rule earns 30 basis points before costs, then 30 basis points of all-in friction takes it to exactly zero. Compute your friction from records rather than assumptions: charges from contract notes, spread and slippage from the difference between the mid at send time and your fill, impact from the price five minutes after you finish, and the forgone return on rejected signals. Compare the two. The second and more useful version asks the same question about turnover: given your friction, there is a number of round trips a year beyond which the edge cannot survive, and in the worked example that number was about 46.
Why does the same friction destroy a fast strategy but barely touch a slow one?
Because the edge per trade shrinks as the holding period shortens while the friction per trade does not. A shorter hold contains a smaller move, so there is less to capture, but the transaction tax, the spread and the fees are charged per round trip regardless of how long you held. In the worked example the same 44.5 basis points consumed 66 percent of the edge at 20 round trips a year, 148 percent at 100, and 331 percent at 500. Trading twenty five times more often multiplied the friction bill by twenty five while dividing the edge per trade by five. That divergence is arithmetic rather than opinion, and it is why frictionless optimisers reliably produce strategies that trade too fast.
Is slippage the largest part of the execution gap?
Not in this model, and probably not in most Indian delivery strategies. Slippage past the touch came to 7.4 basis points a round trip, which was the largest of the six execution components but under a third of the statutory and broker charge line at 23.7. Almost all of that charge line is the transaction tax, levied at one tenth of one percent on the purchase and again on the sale, which is twenty basis points a round trip before anything else happens. Slippage is the component people talk about because it is visible on a fill. The tax is larger, more certain, and harder to do anything about apart from trading less often.
How many fills do I need before my slippage estimate means anything?
About 144, on the dispersion assumed in this model, to pin the average per-leg figure to within one basis point at two standard errors. That is a few months of ordinary activity for most systematic traders. It is worth contrasting with what it takes to establish the edge itself: roughly 360 round trips to separate a 30 basis point edge from zero on the same assumptions, and about 1,524 to establish that a small negative result is genuinely negative. Friction is a near certainty and the edge is a lottery, so friction is much cheaper to measure. Measure the cheap thing first and you at least know what the expensive thing has to beat.
Do partial fills and rejected orders matter, or are they a rounding error?
On the average they are small: 1.4 and 1.8 basis points respectively in this model, the two smallest lines in the stack. Their real significance is elsewhere. Rejection clusters on fast bars, where price bands trigger and margin gets tight, and those are exactly the bars where a breakout rule's best entries live, so the rejected signals in the model carried an average edge half again as large as the ordinary signal. Partial fills matter through the distribution rather than the mean: a half-filled entry leaves you carrying half the exposure you sized for, and a half-filled exit leaves you holding something you had already decided to be rid of.
Does latency matter for a retail trader?
Far less than it is usually made to sound, at the horizons most retail systems operate on. At 900 milliseconds from signal to arrival, on a name with 1.8 percent daily volatility, the modelled cost was 0.74 basis points for the round trip, the smallest line in the whole stack. Cutting the delay to 50 milliseconds saves half a basis point. Letting it stretch to eight seconds costs about 2.4. Those differences are real and they are trivial against a twenty basis point transaction tax. Latency dominates only when the edge itself is measured in single basis points, which is a different business from anything a retail delivery strategy is doing.
Does a larger account make the execution gap smaller or larger?
Both, at different points. Friction per round trip is U-shaped in order size. On a very small position the flat brokerage and depository charges are enormous as a percentage, so the all-in figure was about 64 basis points at 25,000 rupees a leg, illustrative. Those fixed fees dilute as size grows and the curve bottoms out near 44 basis points around two lakh a leg. Past that, market impact takes over, growing with the square root of your participation in the name's daily activity, and the curve climbs again to about 80 basis points at two and a half crore a leg. The trough is computable with your own fee schedule and your own instruments.
Can I close the gap by using limit orders instead of market orders?
A resting limit order does not cross the spread and may even earn it, which removes the largest execution component and can turn slippage slightly favourable. What it does not remove is the risk of not being filled at all, and that risk is not randomly distributed. Your limit order fails to fill precisely when the price runs away from it, which for a momentum rule means you miss the trades that would have worked and get filled on the ones that reverse into you. That is adverse selection, and it is a cost that does not appear in any fill record because the relevant orders produced no fill. The honest way to evaluate it is to log the unfilled orders and compute what they would have earned.
Method note
How the numbers on this page were produced
Every figure comes from a single deterministic simulation, seeded so that it reproduces identically on each run. Four million intended signals are drawn with a stated gross edge of 30 basis points a round trip and a per-trade dispersion of 284.6 basis points, implied by 1.8 percent daily volatility over a 2.5 day holding period. Each signal is then passed through seven stages in the order in which they arise in the life of an order: rejection, partial fill, latency drift, crossed spread, slippage past the touch, market impact and the charge stack. Rejection and partial fill are made to cluster on fast bars, with a weak positive correlation of 0.10 between how fast a bar is moving at entry and how well the trade eventually does, so the selection effect is present rather than assumed away.
The statutory lines are not modelled, they are computed from the rates in force: the transaction tax at 0.100 percent on each leg of a delivery trade, stamp duty at 0.015 percent on the buy leg, exchange transaction charges of 307 rupees a crore a side, the regulator turnover fee at 10 rupees a crore a side, and tax on services at 18 percent applied to the brokerage, exchange, regulator and depository lines but not to the transaction tax or stamp duty. Brokerage and the depository charge are commercial rather than statutory and are stated as illustrative. Everything else, the spread, the slippage, the delay, the participation rate and the rejection and partial-fill rates, is an assumption, is labelled as one, and should be replaced with a figure measured from your own records.
The breakeven arithmetic uses a random-walk convention in which the achievable edge per trade grows with the square root of the holding period. Under that convention the net annual edge is a constant times the square root of turnover minus friction times turnover, which has a closed-form maximum and a closed-form zero, and the zero always falls at exactly four times the turnover of the maximum. The year-level distribution is a separate run of four hundred thousand simulated years of a hundred round trips each.
All results are illustrative and simulated. They are not a track record, they are not a forecast, and they are not an indication of what any strategy or any account would produce. The purpose of the exercise is to show that the gap between a paper fill and a live one is a quantity with components, each of which can be measured on your own statements, rather than a general hazard to be worried about.
Related