Simulation and research

Bid, ask and backtest fills: a worked execution example

Check fictional midpoint, bid/ask, slippage and fee arithmetic, then distinguish recorded market observations, reconstructed paths and simulated fills from account execution.

In this article

A backtest can use the right market dates and still give an optimistic result if every buy and sell is assigned a convenient chart price. The question is not only where the market moved, but which side of the quote an order would need to meet and what the model assumes about filling it.

A candle is not an executable price

A trade-price candle summarizes open, high, low and close over an interval. It does not preserve the bid and ask available at every decision time, the quantity at each level or the order in which all intrabar prices occurred. Coinbase's candle response exposes interval price and volume fields, not an account's execution history.

Consider an imagined candle with open $100, high $102, low $98 and close $101. For a long entered at $100 with thresholds at $99 and $101, the summaries alone do not tell you which threshold was reached first after entry. Choosing a high-first path or a low-first path supplies information the candle did not contain. Even knowing the sequence would not establish an executable fill at either threshold.

Define a fictional quote sequence

Everything in the following arithmetic is invented, not Citrine or customer performance. Use an imaginary linear contract with a multiplier of $1 of PnL per $1 price move per contract, and a quantity of two contracts. It is not a current BTC or ETH contract specification. Assume the whole quantity can fill at the modeled price, with no intervening quote change. The midpoint is the average of bid and ask, not an offered execution price.

Fictional quotes in USD per price unit
MomentBidAskMidpoint
Entry$99.90$100.10$100.00
Exit$100.90$101.10$101.00

The spread is $0.20 at both moments. For this simplified immediately marketable long, model the entry as a buy at the ask and the exit as a sell at the bid. A resting limit order has different execution questions; touching its price is not proof that it filled.

Work through the long position

First compare midpoint pricing with quote-side pricing. Then add an explicitly separate adverse slippage allowance of $0.05 per price unit on each side: buy at $100.15 and sell at $100.85. Finally assume an invented fee of $0.10 per contract per side, or $0.40 for two contracts opened and closed. Assume no funding event for this fictional holding period; this is not a way to treat missing funding as zero in a real result.

Midpoint gross: 2 x ($101.00 - $100.00)
+$2.00
Bid/ask gross: 2 x ($100.90 - $100.10)
+$1.60
Gross after added slippage: 2 x ($100.85 - $100.15)
+$1.40
Fees: 2 contracts x 2 sides x $0.10
-$0.40
Net for this example: $1.40 - $0.40
+$1.00

Relative to the midpoint comparison, crossing the spread accounts for $0.40, added slippage for $0.20 and fees for $0.40: $2.00 - $0.40 - $0.20 - $0.40 = $1.00. The spread is already reflected in the bid/ask prices. Subtracting another $0.40 spread charge from the $1.60 quote-side gross would count the same effect twice. Here, slippage means the additional adverse movement beyond the selected quote, not another name for that spread effect.

Check a flat market and a short

If the entry quote stayed unchanged until exit, an immediate buy at $100.10 followed by a sell at $99.90 would lose $0.40 across two contracts before fees, despite an unchanged midpoint. With the same $0.40 round-trip fees and no added slippage or funding, the net would be -$0.80. A flat chart does not imply a free round trip.

Unchanged-quote gross: 2 x ($99.90 - $100.10)
-$0.40
Unchanged-quote net after $0.40 fees
-$0.80

For a separate hypothetical short, reverse the quote sequence: first sell at the $100.90 bid, then buy back at the $100.10 ask. Quote-side gross is 2 x ($100.90 - $100.10) = $1.60 before additional slippage and fees. Short entries sell to the bid; short exits buy at the ask. Reversing position direction does not let the model choose the favorable side of both quotes.

Keep five kinds of evidence separate

More detailed inputs improve what can be investigated, but the output still depends on a model. Keep these descriptions distinct when reading a result:

  1. Recorded trade: a market transaction observed by the data source, not proof that your account participated.
  2. Observed quote: a bid/ask observation at its recorded time. It is not a reservation of that price or quantity for a later order.
  3. Reconstructed path: a derived sequence built from available inputs and assumptions. Its intermediate points are not all independently observed quotes or trades.
  4. Simulated fill: the model's price, time and quantity for a hypothetical order, given its rules and available data.
  5. Actual account execution: exchange-reported fills for an order in the account, with actual quantities, prices, timestamps and charges.

Citrine's published methodology uses recorded trades, one-second best bid/ask information and reconstructed one-second price paths. That is more context than candles alone, not a claim that every simulated fill is an observed quote or real receipt. One-second observations do not reveal every change between samples. Queue position, depth available to your quantity, latency, partial fills and interruptions can make account execution differ. Coinbase's order-type explanation also notes that market orders can fill in parts at different prices.

Inspect the assumptions in a result

Native Citrine Edge details labeled Paper (simulated), with illustrative liquidity and capacity context
Native Edge details captured October 4, 2026, labeled Paper (simulated). Liquidity and capacity are context to inspect, not an execution receipt. This screenshot does not depict the fictional quote sequence or its PnL.

Ask which observations were available at the decision time, how gaps were handled, which quote side the model used, and whether any added slippage is separate from prices already paid. Check quantity and the contract multiplier before interpreting dollars. Then examine fees, funding coverage and the difference between closed-trade totals and still-open exposure.

The native illustration shows where Citrine exposes execution mode, market state, liquidity and capacity. Use the reviewer kit and free first-session guide to inspect those explanations without connecting an account. This article demonstrates accounting consequences of stated assumptions; it neither discloses Citrine's private fill algorithm nor validates its historical accuracy.

Sources and further reading

Official Coinbase references, consulted October 8, 2026: candle response fields and order types and execution limits. No exchange prices, fee rates or customer results were used in the numeric example.

Continue with simulation inputs and cost reconciliation, win rate and net results, and the public handbook's reading-results worksheet. The broader accounting context belongs there; the quote ledger above isolates the execution-price question.