A fixed-spread backtest can price the ordinary trade and still miss the expensive minute that decides the account. To backtest spread spikes in cTrader, keep a normal-cost baseline, replay time-varying bid and ask data where available, then add declared stress runs that widen the spread at the moments your strategy is exposed.
The thesis is narrower than “use a bigger spread.” A credible test must preserve when the spread widens, which side of the quote triggers the order, and what the resulting fill does to floating equity. A random surcharge detached from market time cannot answer that path question.
What a spread spike changes in a backtest
A spread is the distance between the ask and bid quotes. A spread spike is a temporary widening of that distance, so an order can trigger or fill differently even when the chart's midpoint barely moves.
That distinction reaches several parts of a strategy at once:
- a long position opens at the ask and closes against the bid;
- a short position opens at the bid and closes against the ask;
- a stop can be touched by the executable side before a midpoint chart appears to reach it;
- a pending entry can activate during a brief widening rather than a directional price move;
- floating equity can deteriorate across several open positions before any trade closes.
The last point is why this matters to prop traders. The funding model places the equity path beside the account constraints instead of treating net profit as the only result. Exact rules and reset clocks belong to the prop firm and can change, so its current documentation remains the authority for an evaluation.
Why fixed and random spreads answer different questions
A fixed spread answers a useful baseline question: does the strategy have room to survive an ordinary, consistently charged transaction cost? It does not recreate a spread that clusters around particular market conditions.
cTrader's official cBot backtesting guide documents fixed and random spread settings. The random option selects between a declared minimum and maximum when the cBot places an order. That is a sensitivity test, not a timestamped reconstruction of the broker's historical bid-ask path.
| Spread model | What it can test | What it cannot establish |
|---|---|---|
| Fixed | Baseline cost and broad cost tolerance | Timing or clustering of widening |
| Random range | Sensitivity to varied order-time costs | Whether the costly fills occur in real stress windows |
| Historical bid/ask | Recorded timing for that feed | A universal path across brokers or the future |
| Declared timed shock | Failure behaviour under a chosen scenario | That the chosen shock will recur |
The models are complements. Calling one “realistic” without naming its data and timing is just moving the assumption out of sight.
Build the test as a ladder, not one heroic run
A clean spread-spike test changes one cost assumption at a time while freezing the cBot, parameters, symbol, test window, commission, swap and sizing. Save every run rather than keeping only the curve that looks acceptable.
Establish the ordinary-cost baseline
Start with the normal spread convention you can defend for the intended broker and account. This run is the control. If the strategy has no expectancy after routine costs, spike testing is not the urgent problem.
Reconstruct the feed when bid and ask history exists
Use timestamped bid and ask ticks from the broker or another identified provider. Preserve the provider, timezone and gaps in coverage. The test then measures what that feed recorded, not what “the market” did everywhere.
cTrader's official custom data-source documentation says its backtesting API can accept custom tick data with bid and ask fields, including offline and third-party feeds. It also supports synthetic or experimental data, which is useful only if those modifications are labelled rather than passed off as history.
Add timed stress scenarios
Historical data contains the spikes that happened in its sample. A stress layer asks whether the strategy's controls still work under wider or longer shocks that you declared before seeing the output.
Create a small scenario grid around the strategy's actual exposure windows: position entry, stop proximity, overlapping trades, scheduled session transitions, and any periods the strategy deliberately holds through. Change spike width and duration independently. A short severe widening and a milder persistent widening can damage different systems.
Inspect events and equity, not just the final return
A spread spike can alter the trade path even when the ending return changes little. Audit the event log and account ledger before comparing summary metrics.
| Record | Question it answers |
|---|---|
| Bid, ask and timestamp | What executable market did the engine receive? |
| Signal time and requested order | Did the strategy act before or during the widening? |
| Trigger side and deal price | Was the event caused by price direction or quote width? |
| Spread at entry and exit | Where did the extra cost enter the trade? |
| Open positions and aggregate exposure | Did one shock hit several trades together? |
| Equity before, during and after | Did the account path cross a relevant constraint? |
| Broker, source and timezone | Can another trader reconstruct the assumption? |
This is separate from weekend gap risk. A gap removes executable prices across a closed interval; a spread spike widens the two executable sides while the market is quoting. They can occur together, but the simulator should not blur them into one generic “bad fill.”
The common tests that still leave the blind spot
Raising one fixed spread until the strategy fails measures a break-even cost ceiling. It says nothing about whether widening concentrates around the trades the strategy takes.
Drawing random spreads from a broad range adds variation, but it can assign cheap quotes to the exact stress windows that matter and expensive quotes to irrelevant periods. Averaging the historical spread has the opposite problem: the quiet majority can dilute the brief tail.
Filtering every expensive window after inspecting the test is not a risk model either. It changes the trading rule with hindsight. If a time filter is part of the strategy, define it before the final test and validate it separately; the guide to time-of-day filters in prop backtesting explains that distinction.
What this evidence does not prove
No spread-spike backtest establishes a broker-independent worst case. Quote construction, liquidity, symbols and execution differ, while future shocks need not resemble the historical or synthetic sample.
It also does not isolate slippage automatically. Spread is the distance between bid and ask; slippage is the distance between the requested and executed price. Both can worsen together, but the test record must keep them separate or the diagnosis becomes useless.
realbacktesting is a trading-software studio for cTrader built around inspectable, reproducible tests. The methodology page exposes data, costs, execution and validation assumptions. Those conditions make a result checkable; they do not turn a backtest into a live track record.
Frequently asked
Does cTrader backtesting support variable spreads?
Yes. The standard cBot backtesting interface documents a random spread range as well as a fixed value. A random range varies cost at order time, but it is not the same as replaying a timestamped historical bid-ask feed.
Is a wider fixed spread enough for stress testing?
It is enough to test broad cost sensitivity. It is not enough to test whether widening clusters around entries, stops or overlapping exposure, because it removes the timing of the shock.
Should spread and slippage be combined into one penalty?
No. Record them separately. Combining them may produce a conservative total cost, but it hides whether the strategy failed because the quote widened or because the fill moved after the order was sent.
Can a historical spread feed predict the next spike?
No. It documents one provider's recorded path. Use it as evidence, then use clearly labelled scenarios to test failure modes outside that sample.
The stubborn takeaway
Average spread describes a cost. The spread sequence decides the path the account must survive.