Backtesting swap costs in cTrader means proving that every position held through rollover was charged with the applicable broker settings. If the report never shows how overnight positions were treated, its net result is incomplete rather than inexpensive.
That omission hides easily in a clean equity curve. A strategy can use a modest number of entries yet keep risk open across many rollovers. Spread and commission are not substitutes: they describe entry and exit costs, while swap belongs to the time the position remains open.
Start with the broker, not a generic swap assumption
Swap is the broker's overnight charge or credit for an open position. cTrader's own trading-conditions guide says that swap rates are applied by the broker and directs traders to the broker for the applicable rates.
That is the first constraint on a useful test. Do not copy a rate from another broker, infer it from a currency pair's interest-rate narrative, or call a current setting permanent. Record the broker, symbol, account currency, long/short side and the settings used for the tested period. If any of those inputs cannot be identified, label the swap treatment unverified.
This matters especially for systems that hold positions overnight or through a weekend. Weekend-gap testing asks whether the price path can change while a market is closed. A swap audit asks the adjacent question: what carrying the position cost or credited while that exposure remained open.
Read the symbol settings that define the charge
A cTrader cBot can expose the symbol data required for an audit. The official Symbol API reference lists separate SwapLong and SwapShort values, SwapCalculationType, and Swap3DaysRollover among the symbol properties.
Those fields make two common shortcuts unsafe. Long and short positions need not carry the same rate, and a displayed rate is not automatically a cash amount. The calculation type tells the platform how the rate is expressed. The rollover-day field matters because a test must reproduce the symbol's configured treatment rather than assume every overnight hold receives an identical charge.
Build a small configuration record before reading the performance report:
| Record | Why it belongs in the audit |
|---|---|
| Broker, symbol and account currency | Identifies the trading conditions being claimed |
SwapLong and SwapShort | Keeps direction-specific costs visible |
SwapCalculationType | Prevents treating a rate unit as a cash value |
Swap3DaysRollover | Makes the rollover schedule testable |
| Position open and close time | Establishes whether rollover exposure existed |
| Accrued swap and net result | Lets another trader reconcile the ledger |
The point is not to produce a decorative settings screenshot. It is to create an auditable trail from each overnight position to the charge shown in the result.
Test the path as well as the final total
A single total swap figure can conceal the risk that matters in a constrained account. Carrying costs alter equity while positions are open, so they can change the timing and depth of a drawdown even when the final net-profit difference looks small.
Run a baseline with the documented broker settings. Then isolate the overnight trades and compare gross profit, swap, commission, spread treatment, net profit, floating equity lows and any account-rule breach. Keep the entry logic, exit logic, date range and sizing rule unchanged. Otherwise the comparison is not measuring swap sensitivity.
For a cBot, retain the position-level ledger rather than reconstructing it from memory. cTrader's Position API reference exposes the swap accrued on a position. That makes it possible to reconcile the report against the individual positions that actually crossed rollover.
This is the same discipline used when testing slippage in cTrader: declare the execution or cost rule, keep it separate from other costs, and inspect the path it creates. A backtest is evidence only for the conditions it actually models.
Separate a cost audit from a forecast
A correctly configured historical swap treatment does not forecast future financing conditions. Brokers set the rates, and those settings can change. Nor does it prove a live account will reproduce a backtest: live execution, price data and the broker's future conditions remain separate uncertainties.
The audit still has a useful job. It can reject a claim that relies on unexplained overnight economics. If the edge survives the stated settings, that is evidence for that tested configuration. If it disappears once the overnight ledger is included, the earlier curve was missing a material cost.
realbacktesting is a trading-software studio for cTrader built around results traders can inspect and reproduce. Its proof standard makes cost assumptions visible; swap deserves the same treatment as spread, commission and any other input that changes the account path.
Frequently asked
Does spread include swap in a cTrader backtest?
No. Spread is the gap between bid and ask at execution. Swap is the broker-applied overnight charge or credit on an open position, so it must be identified and audited separately.
Can I use one swap rate for both long and short positions?
Not without checking the symbol settings. cTrader documents separate SwapLong and SwapShort properties, so the test should preserve the applicable side for every position.
Does a correct swap setting assure live results?
No. It documents the historical configuration used by the test. Broker rates and live trading conditions can change, so the result is evidence for the recorded setup rather than a promise.
The stubborn takeaway
A backtest that cannot explain its overnight ledger has not yet explained its net result.