Realistic Backtesting AssumptionNovember 10, 202615 min read

Realistic Backtesting Assumptions: What to Model Before You Trust a Result

Learn which backtesting assumptions decide whether a result survives live trading: fills, slippage, costs, data quality, bias and robustness checks, with a checklist.

Realistic Backtesting Assumptions: What to Model Before You Trust a Result

A realistic backtest assumes you trade at prices you could actually have got, pay the costs you would actually have paid, and see only the data that existed at the moment you decided. Everything else is a guess that flatters the result. The assumptions below are the ones that most often separate a great-looking equity curve from live performance, and how to set each one so your numbers hold up.

TL;DR

  • Define every rule completely: signal timing, order type, size, exit and costs. If a rule is vague, the backtest fills the gap in your favor.
  • Never assume you fill at the price you see on the chart. Model the spread, slippage and the delay between signal and order.
  • Use data that includes delisted names, corporate actions and only information that was public at the time.
  • Test across different market regimes, keep an untouched out-of-sample period, and limit how many variations you try.
  • Stress the result: raise costs, shuffle the trade order and see whether the edge survives.

Table of Contents

What a backtest can and cannot tell you

A backtest applies a set of decision and execution rules to historical data. The CFA Institute describes backtesting as an attempt to understand a strategy's risk and return trade-off by approximating the real-life investment process. The key word is approximating. Each assumption you make is a place where the approximation can drift from reality.

That is why assumptions matter more than the headline metric. A win rate or profit factor is only as honest as the fills, costs and data behind it. Two traders can run the same idea on the same chart and get very different results because one assumed perfect execution and the other did not.

An asset manager's research note makes the same point: backtesting is only meaningful if the strategy stays sound under realistic data limits and trading frictions. It also warns against picking the version with the highest in-sample Sharpe ratio without that realism.

So the goal is not a perfect simulation. It is a pessimistic, fully specified one, where good news in the live market is a bonus rather than something your result depends on.

Write the rules so nothing is left to interpretation

The first realistic assumption is that your strategy can be executed by a machine, or by you, without judgment calls. "Buy the breakout" is not a rule. You need to say:

  • Instrument and data feed: which symbol, which exchange or venue, which bar size.
  • Signal timing: does the signal fire on the bar close, or intrabar when price touches a level?
  • Entry instruction: market order at the next bar's open, a limit at the breakout level, a stop order?
  • Size: fixed shares, fixed dollars, or a percentage of equity.
  • Exits: stop, target, time stop, and what happens if both are hit in the same bar.
  • Costs: commissions, spread, slippage and fees.

The last point on that list, a stop and a target both inside one bar, is a classic trap. On a daily or hourly chart you cannot know which came first. A pessimistic backtest assumes the stop hit first. An optimistic one quietly assumes the target did, and the profit factor inflates.

This is also where plain-English strategy entry helps. If you can describe the rule in one unambiguous paragraph, you can see where it is vague. Our step-by-step guide to backtesting a trading strategy walks through turning an idea into a testable rule set.

Entry and exit fills: stop assuming the price on the chart

The most common unrealistic assumption is that you trade at the exact price that triggered your signal, or at the midpoint between bid and ask. Real orders do not work that way.

Signal bar versus execution bar. If your signal depends on the close of a bar, you cannot trade at that close. The earliest realistic fill is the next available price, usually the next bar's open. Assuming you buy at the close that generated the signal is a form of look-ahead bias, and it is surprisingly common.

Buying at the ask, selling at the bid. A market buy pays the ask, and a market sell receives the bid. If your data is a single price series built from last trades or midpoints, you are skipping half the spread on every entry and every exit. On a liquid large-cap stock that may be a cent or so. On a thin small-cap, or on options, it can be a meaningful share of the expected profit. Options are the extreme case: spreads are wide enough that midpoint fills can make a losing idea look profitable. If that is your market, see how we approach backtesting an options strategy with realistic fills.

Limit orders are not guaranteed. If you model a limit order that fills whenever price touches your level, you are assuming you were first in the queue. In practice, price often touches a level, fills a few orders ahead of you and reverses. A cautious rule is to require price to trade through your limit, not merely touch it, before counting a fill.

Gaps. A stop at $50 does not fill at $50 if the stock opens at $47. Your backtest should fill the stop at the gap price. Ignoring this makes your worst losses look smaller than they were.

Entry and exit fills: stop assuming the price on the chart

Slippage and delay: model them as part of the strategy

Slippage is the difference between the price you expected when you sent the order and the price you actually received. It comes from price moving while the order travels, from limited liquidity at your price, from order size relative to available volume, from volatility and gaps.

A flat assumption is better than none, but a better one scales with conditions:

  • Higher slippage in volatile periods and around news or the open and close.
  • Higher slippage when your order is a large share of the bar's volume.
  • Wider spreads on less liquid instruments.

Large institutional models often treat market impact as growing roughly with the square root of order size relative to average daily volume. That matters for funds. For most retail accounts trading liquid instruments, the practical takeaway is simpler: your size is small, but your spread and delay costs are the same on every trade, so they add up fast.

Delay matters too. Between a decision and a fill there is processing time, network time and time at the venue. For a swing strategy holding for days, a few hundred milliseconds is noise. For a scalping or mean-reversion strategy that earns a few ticks per trade, that delay can be the whole edge. The shorter your holding period and the smaller your average profit per trade, the more conservative your slippage assumption should be. If you trade within the day, our guide to intraday backtesting covers the extra care this needs.

A practical approach is to run the same strategy three times: with no slippage, with a reasonable estimate, and with double that estimate. If the third run turns negative, the strategy is fragile and you should know that before you fund it.

Trading costs and market frictions to include

Even with zero-commission brokers, trading is not free. The costs that a realistic backtest should carry include:

CostWhat it isWhy it matters
Commissions and feesBroker charges, exchange and regulatory feesSmall per trade, large over hundreds of trades
Bid-ask spreadThe gap you cross on each market orderPaid twice per round trip
SlippagePrice movement between decision and fillGrows with volatility and order size
Market impactYour own order moving the priceMatters as size rises relative to volume
Financing and borrowMargin interest, short borrow fees, overnight fundingEats into positions held for days or weeks
TaxesShort-term versus long-term treatmentCan change which strategy is better after tax
Capacity limitsThe size beyond which the edge disappearsA result at $5,000 may not scale to $500,000

The asset manager note cited earlier lists spreads, market-impact costs, capacity limits and management fees as costs whose omission can leave actual performance short of backtested results.

Costs hit high-turnover strategies hardest. A strategy that trades twice a year barely notices a 0.1% round-trip cost. A strategy that trades ten times a day can lose its whole edge to it. Always check the number of trades and the average profit per trade before judging the result. If average profit per trade is only a small multiple of your estimated cost, treat the strategy as unproven.

Data assumptions that quietly inflate results

The fills can be perfect and the result still be wrong if the data is.

Survivorship bias. If you test on today's list of stocks, you are testing only the companies that survived. Delisted, bankrupt and acquired names are missing, and those are often the losers. The CFA Institute flags survivorship and look-ahead bias as issues analysts must watch in backtesting. The fix is data that includes delistings and uses the universe as it existed on each historical date.

Four data risks that can distort backtests

Look-ahead bias. This means using information the market did not have yet. Examples include using a bar's high or low to decide an entry that happened earlier in the bar, using restated financials instead of the numbers first published, or computing an indicator with data from the future. Fundamental and macro data should be lagged to when it was actually released. We cover simple ways to catch this in four quick tests for look-ahead bias.

Corporate actions. Splits, dividends and symbol changes must be handled correctly. An unadjusted split looks like a 50% crash, and a missing dividend understates long-term returns.

Data quality and timing. Check the time zone, how bars are aggregated, and whether the feed matches the venue you trade. A backtest built on one data vendor's bars can behave differently on another.

Overfitting: the assumption that your parameters will stay good

Every time you adjust a parameter and rerun the test, you give luck another chance to look like skill. Researchers at Lawrence Berkeley National Laboratory show that overfitting can produce strong in-sample performance and poor out-of-sample results, and that with limited data only a limited number of variations should be tried before a high Sharpe ratio can arise by chance. The same paper notes that Sharpe ratio assumes normally distributed returns, and that adjusted measures such as the deflated Sharpe ratio exist to account for multiple testing.

Practical habits that reduce overfitting:

  1. Keep the number of parameters small, and prefer rules with an economic reason to work.
  2. Log every variation you test, including the failures, not just the winner.
  3. Look for parameter plateaus. If a 20-period setting works and 19 and 21 collapse, you found noise.
  4. Reserve a final period you never touch until the end.

We go deeper in how to spot overfitting and stop it and in our piece on walk-forward analysis, which repeatedly tests on data the rules were not fitted to.

Choosing periods and market conditions

A strategy that earned money in a steady bull market has told you very little about a bear market, a volatility spike or a sideways year. Realistic testing means including different regimes: rising, falling and ranging markets, low and high volatility, and ideally a crisis period.

History is also a limited sample. The CFA Institute notes that asset and factor returns show fat tails and that historical distributions may not fully represent future uncertainty. Scenario analysis helps, as long as you remember that a simulation built on a normal distribution will miss negative skew and fat tails.

A few rules of thumb:

  • Make sure the sample contains enough trades for the statistics to mean something. A 90% win rate over 12 trades is an anecdote.
  • Split your period into sub-periods and check that results are not all coming from one stretch.
  • Check how the strategy behaves when conditions change. Our article on regime detection shows one way to do it.
  • Be careful with very long histories too. Market structure, tick sizes and costs change, so old data may not describe today's execution. Our note on how data length interacts with trials explains why more years do not automatically mean more evidence.

Stress tests before real capital

Once your assumptions are conservative, test whether the result survives being wrong about them.

Sensitivity to costs. Raise commissions, spread and slippage until the strategy stops working. That point of failure tells you how much margin of safety you have.

Out-of-sample testing. Train on one segment, test on another, ideally with a sliding window so the simulated process mirrors how you would really decide. The same asset manager note adds an honest reminder: the only true out-of-sample data is live trading. That is the reason to start small.

Alternative setups. Repeat the test with different universes, position sizes, rebalancing frequencies and sub-periods. A real edge tends to bend, not break.

Monte Carlo on trade order. CME Group describes reshuffling the order of trades to create many alternative equity paths. This shows the range of maximum drawdowns and the chance of long losing streaks. A strategy with a 12% drawdown in one historical path can have a real probability of a much deeper one in a reshuffled path, so size positions for the worse case, not the one you happened to see.

A realistic backtest checklist

  1. Write the full rule set, including signal timing, order type, size, exits and same-bar conflicts.
  2. Fill on the next available price after a signal, not the signal price.
  3. Pay the spread and add slippage that grows with volatility and size.
  4. Include commissions, fees, financing and borrow costs.
  5. Use survivorship-free, time-stamped, split-adjusted data.
  6. Lag any fundamental or macro data to its release date.
  7. Keep a final out-of-sample period untouched.
  8. Count and record every variation you tried.
  9. Test multiple market regimes and sub-periods.
  10. Stress costs and shuffle trade order before sizing your first live position.

How Backtestify helps you apply this

We built Backtestify so you can describe a strategy in plain English, run it on real historical market data and see the trade-by-trade detail behind metrics such as win rate, profit factor and maximum drawdown. You can compare an original strategy with an improved version side by side on recent data, and we publish results for losing strategies as well as winning ones, so the evidence is not cherry-picked. You can read how the simulation works on our methodology page.

The Free plan lets you start testing, and Pro, at $29 per month or $190 per year, adds unlimited backtesting, improvement and forecasting. You can also export results in TradingView Pine script format.

Backtestify

If you want to check a strategy against these assumptions before risking money, see the Pro plan on Backtestify or start with the Free plan.

FAQ

How much slippage should I assume in a backtest?

There is no universal number. It depends on the instrument, order size, volatility and holding period. Start with a conservative estimate for your market, then rerun with double that figure. If the strategy only works under the lowest assumption, it is too fragile to trade.

Is a backtest that fills at the close realistic?

Usually not. If a signal is calculated from a bar's closing price, you can only act after that bar has closed, so the earliest realistic fill is the next available price. Filling at the signal close builds look-ahead bias into the result.

Why do good backtests fail in live trading?

The common causes are optimistic fills, ignored costs, biased data and overfitted parameters. A strategy tuned to history can look excellent in-sample and disappoint out-of-sample. Conservative execution assumptions, clean data and an untouched test period all reduce that gap.

How many trades do I need for a backtest to mean anything?

There is no fixed threshold, but more is better, and results from a handful of trades are mostly luck. Check that performance holds across several sub-periods and market conditions, and look at how stable the metrics are rather than relying on one total.

Sources