All posts

Backtesting6 min read

How to Model Broker Commissions in a Backtest

Build a dated broker commission worksheet, model per-contract and per-share fees, apply minimums correctly, and reconcile backtest costs to statements.

By TerraTrade Team

Calculator beside a laptop displaying abstract market charts

What this model covers#

A backtest can use accurate prices and still overstate results if its commission model is wrong. The practical answer to how to calculate commissions for a backtest is to capture the broker’s actual fee rules by product and date, apply those rules at the unit they specify, then check the output against account records. A single flat “cost per trade” can miss per-contract or per-share charges, minimums, caps, changing rates, and the difference between one side and a round trip.

This guide covers commission and explicitly identified commission-related charges only. It does not estimate spread, slippage, fill behavior, or market impact; those require separate models. Futures fees, for example, may include broker and exchange charges, and brokers may present a flat fee or a flat-plus-per-contract structure. Record components separately when the schedule does so. Getting Started with your Broker - CME Group

Create a separate worksheet row for each combination of product, venue, account, or schedule period whose terms differ. That makes it possible to assign the right fee rule to each historical trade instead of silently applying today’s schedule to every date. If a broker’s schedule uses volume tiers, record both the tier thresholds and when the tier is assessed; published futures pricing, for example, can distinguish pricing structures and volume levels. Commissions Futures | Interactive Brokers LLC

Worksheet fieldWhat to record
Broker and accountBroker, account type, and pricing plan.
Product and venueProduct or symbol, asset class, and venue where the schedule distinguishes them.
Fee componentBroker commission, exchange, clearing, regulatory, or other separately listed charge.
Fee basisPer contract, per share, per order, per execution, or another stated unit.
Rate and currencyAmount charged per unit; record currency and any applicable conversion rule.
Minimum and maximumAmount or formula, plus whether it applies per order, execution, side, or another unit.
Side / round-trip conventionWhether quoted charges apply to a buy, sell, each executed side, or an entry-and-exit round trip. Preserve the source wording.
Tier and exceptionsVolume measure, thresholds, assessment period, product exclusions, and routing or other conditions.
Effective datesStart and end dates for the terms. Keep a copy of the dated schedule or account document.
Rounding and evidenceDocumented rounding rule, source and date captured, plus any unresolved question to confirm.

Translate schedule terms into backtest costs#

Calculate fees at the schedule’s charging unit. The basic formula for a per-contract, per-side schedule is:

Commission = filled contracts × rate per contract per side × charged sides

For per-share pricing, substitute filled shares for contracts. If the schedule says a rate applies once to an executed order, calculate at the order level instead; do not assume that “order,” “execution,” “side,” and “trade” are interchangeable. Likewise, do not double a rate already quoted as a round-trip amount.

Use this as a translation guide, not a substitute for the broker’s definitions. In particular, distinguish an advertised broker commission from the total of separately itemized charges. A futures broker may include broker and exchange fees in the overall cost discussion, while a published schedule can identify additional exchange or regulatory amounts depending on pricing structure. Getting Started with your Broker - CME Group Commissions Futures | Interactive Brokers LLC

Backtest eventSchedule rule to applyModeling note
Entry and exit each charged per contractFilled quantity × per-contract rate for each charged sideAdd both sides only when the schedule charges both.
Per-share order fee with a minimumApply the rate and minimum using the schedule’s order unitA partial fill may not be a separate order; use actual order structure if available.
Several fills within one orderFollow the stated execution or order conventionDo not multiply minimums by fills unless the terms require it.
Different dated rates or tiersSelect the applicable product/account rule for that date and tierKeep historical schedule changes visible rather than overwriting them.
Separately listed exchange or regulatory chargeModel as its own component when included in scopeDo not mislabel a broker-only rate as an all-in total.

A repeatable procedure keeps the commission assumptions auditable and makes later schedule changes easier to handle.

  1. Gather the applicable dated schedule, account type, product, and any statement or confirmation that itemizes the charge.
  2. Create separate worksheet rows wherever product, venue, account, tier, or effective dates change the terms.
  3. Label the fee basis and the unit for every minimum or cap. Copy the broker’s side and round-trip wording rather than paraphrasing it loosely.
  4. Map backtest trades to filled quantity and, where known, order or execution structure. Apply each fee component at the level specified.
  5. Select historical schedules by effective date. If a volume tier depends on information the test cannot reproduce, document the approximation instead of presenting it as exact.
  6. Recompute sample charges and compare them with statements at the broker’s displayed precision. Investigate discrepancies before running the full test.
  7. Save the worksheet, source documents, calculation logic, and unresolved assumptions alongside the backtest version.

Reconcile against sample statements#

Treat reconciliation as a required test of the fee model, not a final cosmetic check. Choose dated statement entries or confirmations that cover each relevant product and schedule period. For each entry, capture the symbol, quantity, side, order or execution identifiers when shown, and each commission-related line. Recompute the amount using the worksheet’s rate, basis, minimum, cap, side convention, and applicable tier.

Compare the recomputed value with the displayed charge at the broker’s precision. If they differ, check the effective date, product rate, tier, whether the minimum applied per order or execution, whether a separate exchange or regulatory line was included, and rounding. The SEC advises investors to review confirmations and account statements and seek a breakdown when fees are unclear. Investor Bulletin: How Fees and Expenses Affect Your Investment Portfolio

Record the resolution and retain the supporting document. If you cannot explain a difference, mark the affected model assumption as unresolved and avoid describing that run as reconciled.

What a commission model can—and cannot—show#

A good commission model is traceable, date-aware, and specific to the broker’s stated charging unit. It can still be an approximation if historical schedules are unavailable, account tiers depend on activity outside the backtest, or the data does not preserve order-level details. Record those limitations. Keep commission results separate from spread, slippage, execution quality, and market impact so that a precise fee calculation is not mistaken for a complete trading-cost model.

Frequently asked questions#

Should I multiply the commission by two for a round trip?

Only if the broker’s terms define the quoted charge as a round-trip amount. Otherwise, determine whether it applies per side, order, or execution, and count charges according to that convention.

Does a minimum apply to every partial fill?

Use the unit stated by the schedule. A minimum can be per order or another unit; do not assume it applies once per trade or once per fill without confirming the terms. Pricing Disclosures - Stocks & ETFs | TradeStation

Which commission rate should I use for older trades?

Use the historical effective schedule when available. If rates or tiers changed, record and apply the relevant period rather than silently applying a current rate to all trades.

Should exchange and regulatory charges be included?

Keep components separate when the broker identifies them separately, then include the components you intend to model. Do not call a broker-only commission rate an all-in trading cost. Getting Started with your Broker - CME Group Commissions Futures | Interactive Brokers LLC

A dated worksheet plus a statement reconciliation gives your backtest a documented commission assumption that can be reviewed and revised.

Sources#

Your journal writes posts like this about you.

Connect a broker and TerraTrade turns your own trades into the findings that matter.