P04-L04 · P04 · P04-M01
Calculate spread and approximate execution impact under stated assumptions
Prerequisites: P04-L03
Learning objectives
- Calculate absolute and relative spread and quantity-weighted fills.
- Separate modeled depth-walking cost, benchmark slippage and fees.
- Explain why stale quotes and incomplete depth prevent execution guarantees.
EN source master • P04 — Trading Foundations • needs_review.
Educational boundary: mechanisms and evidence only. No BUY/SELL/HOLD signal, trade recommendation, personalized investment advice, guaranteed setup, price target, expected profit, guaranteed win rate or guaranteed risk/reward outcome. All examples are ILLUSTRATIVE / FICTIONAL; no real money or live trade is required.
Why this matters
An execution price is not simply the number displayed next to an instrument. Spread, available size, book changes and fees answer different questions. Keeping those quantities separate makes a cost estimate reproducible and exposes its assumptions without promising a particular fill.
Explanation
The best bid is the highest displayed purchase price; the best ask is the lowest displayed sale price. Spread is ask minus bid. A relative spread needs an explicit denominator: we use midpoint=(ask+bid)/2. Another denominator gives another percentage, so label it rather than comparing unqualified numbers.
Depth is displayed quantity at successive prices. A static sweep calculation assumes the order arrives immediately, resting orders remain, there is no competing execution or hidden liquidity, and matching consumes the specified levels in price order. It is a model, not an execution guarantee. To calculate an average fill, multiply each level's consumed quantity by its price, sum notionals and divide by total filled quantity.
Price impact can refer to the price effect of executing size, including moving through available levels and broader response to the order. Our fixture measures only the static cost of walking the displayed book relative to its best ask. It cannot identify causal subsequent price changes or a market-wide response. Call that component a modeled depth-walking effect rather than asserting the book model captures all impact.
Slippage is a difference between actual or stipulated execution and a specified benchmark. Here the benchmark is the earlier six-unit modeled average. Using the earlier best ask or midpoint instead would give a different figure that includes other components. Fees are explicit charges, not slippage. Reporting an all-in number without the breakdown hides the reason for the cost.
A stale quote is a snapshot that no longer represents available orders at execution time. Sequence, time, delay and feed completeness matter; elapsed time alone does not measure how much a book changed. Execution uncertainty also includes non-fill, partial fill, cancellation, rejected orders and unknown depth beyond the provided levels.
Source-to-claim scope
- Bid/offer spread and depth are separate measurements [S04-LIQUIDITY].
- Price/size levels are book inputs [S04-BOOK].
- Market execution lacks a fixed execution-price guarantee [S04-ORDERS].
The fixture's arithmetic, bucket alignment, strict swing rule, matching/trigger assumptions, journal convention and rubric are explicitly supplied teaching conventions where applicable; these references do not authenticate fictional values or endorse a venue. US securities and futures sources support bounded vocabulary and limitations, not a claim that their rules apply universally to crypto.
Key terms
- Spread: best ask minus best bid.
- Depth: available displayed size at each price in a bounded snapshot.
- Price impact: execution-size effect; this fixture models only walking visible levels.
- Slippage: execution difference from a declared benchmark.
- Fee: separate explicit charge under stated assumptions.
- Stale quote: earlier order state that may no longer be executable.
Historical example
Data status: ILLUSTRATIVE / FICTIONAL. FU and CU have no real asset or currency identity. SnapshotQ0 is frozen; a six-FU purchase-direction ticket is supplied solely to demonstrate arithmetic, not to suggest a trade.
| Side | Price CU/FU | Displayed quantity FU |
|---|---|---|
| Bid | 99 | 4 |
| Ask | 101 | 2 |
| Ask | 102 | 3 |
| Ask | 104 | 5 |
Midpoint 100; spread 2CU/FU, relative spread 2/100=2%. The purchase consumes 2FU at 101,3 at 102,1 at 104. Gross notional 202+306+104=612CU; modeled average 102CU/FU. Walking cost above best ask=612−6×101=6CU, or 1CU/FU and 1/101≈0.9901%. Average-versus-midpoint difference 2/100=2% includes the ask-side spread component and modeled walking component; do not add these two benchmark comparisons together.
Fictional fee rate 0.1% of executed notional gives 0.612CU. Total outlay 612.612CU; all-in average 102.102CU/FU.
The separate stipulated executionE1 fills 2 at 102,3 at 103,1 at 105. Gross 618CU; average 103. Against Q0's quantity-aware average 102, adverse slippage=1CU/FU or 1/102≈0.9804%. Fee 0.618CU; total 618.618CU; all-in average 103.103. Total outlay differs by 6.006CU:6CU execution change plus 0.006CU additional fee. The different percentages use different bases and should not be summed.
Q0 displays ten ask units in total. A twelve-unit ticket cannot be completely priced from it. Do not invent two extra units at 104 or assume the rest fills at any price.
What the evidence proves
| State | Claim and locator | Limit |
|---|---|---|
| OBSERVED | Q0 price/size rows and stipulated E1 fills | Original synthetic fixtures |
| INFERRED | Spread, sweep average, benchmark slippage and fees | Fixed matching and cost assumptions |
| UNKNOWN | Real latency, future book response and depth beyondQ0 | No such observations supplied |
| INSUFFICIENT EVIDENCE | Q0 guarantees a six-unit fill or caps a twelve-unit cost | Resting snapshot is not an execution promise |
E1 is stipulated for comparison, not evidence that a real quote became stale in that way. A cancellation or competing order could change the outcome entirely. The quantities do not describe a current market.
Common mistakes
Using midpoint as an executable ask; averaging prices without sizes; treating all ten ask units as offered at 101; conflating explicit fees with slippage; claiming a book walk proves all causal impact; and mixing percentage denominators produce misleading costs.
Practical exercise
Inputs: Q0, E1, six-FU ticket, fee 0.1%. Tasks: reproduce spread and midpoint, price the two-unit and six-unit static tickets, reconcile E1 with Q0, include fees, and state what is unknown for twelve units.
Show worked correction
Expected reasoning: Consume cheapest eligible ask levels first under the stated model; multiply before averaging; distinguish benchmarks and cost layers.
Complete correction: Two units cost 202CU, average 101, fee 0.202, total 202.202, with zero modeled walking premium over the best ask. Six units cost 612, average 102, fee 0.612, total 612.612. E1 costs 618, average 103, fee 0.618, total 618.618. Benchmark slippage is 6CU total and 0.9804% of Q0's gross estimate; the extra fee is 0.006. Spread remains Q0's2CU/FU; it is not the same variable as either fee or later slippage. Twelve units exceed the supplied ask depth by 2FU. The complete-ticket average and total cost are UNKNOWN. Even the visible ten-unit computation assumes the book survives until matching. A report must therefore give a conditional estimate, an uncovered quantity and a coverage/latency warning, never a guaranteed execution quote.
Checklist
Name side and quantity; label snapshot and benchmark; compute spread with denominator; sweep quantities; separate fees; report unavailable depth; and state execution assumptions.
Summary
Spread describes two quotes, depth describes size, and slippage compares an execution with a benchmark. Fees belong on their own line. A precise calculation can still have uncertain applicability.
Visual specifications
P04-L04-V01 — order book
Educational question: How do spread, visible depth, quote changes and fees affect the same hypothetical quantity?
Dataset: FIX-P04-04; ILLUSTRATIVE; observedAt=null. Mechanism sources: S04-LIQUIDITY, S04-BOOK, S04-ORDERS. Render bid 99/size 4 and asks 101/size 2,102/size 3,104/size 5 with cumulative depth 2,5,10. Shade consumption 2+3+1 for 6FU. Separate bars for quoted 612CU, stipulated executed 618CU and each fee; label benchmark-dependent percentages.
Caption: A static book calculation is a conditional estimate; later fills and fees are separate.
Alt text: Six units cost 612 before fees in the frozen quote, but the stipulated later execution costs 618 before fees.
Layout: 390px stacked labels and accessible equivalent text table; 768px/tablet and desktop verification pending. RTL: RTL layout and native labels for later Arabic adaptation; isolate IDs LTR; preserve chronological direction and numerical price axes. No translation authored. Style: Dark navy with cyan, electric blue and violet; readable contrast and labels independent of color; official ZECOIN branding only. Deterministic chart/SVG/HTML; no fabricated market screenshot.
Status: SPECIFICATION_ONLY; version 1; needs_review. No rendered asset or runtime integration is claimed.
P04-L04-V02 — evidence panel
Educational question: Which conclusions follow from these inputs, and which remain unsupported?
Dataset: FIX-P04-04; ILLUSTRATIVE; observedAt=null. Mechanism sources: S04-LIQUIDITY, S04-BOOK, S04-ORDERS. Bind four labelled rows OBSERVED / INFERRED / UNKNOWN / INSUFFICIENT EVIDENCE to this lesson's evidence table and record locators. Include one calculation or classification and its assumptions. Display missing data and execution limits explicitly; no financial call or forecast badges.
Caption: Illustrative evidence states under the stated data and execution assumptions.
Alt text: A four-state table distinguishes supplied fictional records, conditional calculations, missing information and unsupported claims.
Layout: 390px stacked labels and accessible equivalent text table; 768px/tablet and desktop verification pending. RTL: RTL layout and native labels for later Arabic adaptation; isolate IDs LTR; preserve chronological direction and numerical price axes. No translation authored. Style: Dark navy with cyan, electric blue and violet; readable contrast and labels independent of color; official ZECOIN branding only. Deterministic chart/SVG/HTML; no fabricated market screenshot.
Status: SPECIFICATION_ONLY; version 1; needs_review. No rendered asset or runtime integration is claimed.
Tools
NONE. Use the embedded fixture, paper or an offline worksheet. No paid access, live market feed, real funds, wallet connection, account creation, signatures or trades are needed. No production tool capability is added or asserted.
Sources & claim boundaries
- S04-LIQUIDITY — CME liquidity measures: https://www.cmegroup.com/education/articles-and-reports/how-traders-measure-liquidity Supports: Bid/offer spread and available order-book size as distinct liquidity measurements. Checked 2026-09-30; primary page inspected.
- S04-BOOK — Coinbase product book: https://docs.cdp.coinbase.com/api-reference/exchange-api/rest-api/products/get-product-book Supports: Bids, asks, prices and sizes in a book snapshot; fixture matching rules are original. Checked 2026-09-30; primary page inspected.
- S04-ORDERS — SEC Investor.gov Types of Orders: https://www.investor.gov/introduction-investing/investing-basics/how-stock-markets-work/types-orders Supports: Market versus limit mechanics; US securities education used for vocabulary, not universal crypto rules. Checked 2026-09-30; primary page inspected.
These references support mechanism definitions only. All fixture values, paths, tickets, capital, fills and calculations are original ILLUSTRATIVE / FICTIONAL teaching material, not source-observed prices, a historical performance series or a recommendation for a current market. Documentation examples and official venue names do not endorse a platform. Dataset FIX-P04-04 is bounded to the embedded records and assumptions; observedAt=null because no real-world observation was collected. Future source review and editorial acceptance remain pending: reviewStatus=needs_review, lastReviewedAt=null.
Next lesson
P04-L05 — Order types. Continue within this program's learning sequence.
Visual specifications
P04-L04-V01
How do spread, visible depth, quote changes and fees affect the same hypothetical quantity?
A static book calculation is a conditional estimate; later fills and fees are separate.
Render bid 99/size 4 and asks 101/size 2,102/size 3,104/size 5 with cumulative depth 2,5,10. Shade consumption 2+3+1 for 6FU. Separate bars for quoted 612CU, stipulated executed 618CU and each fee; label benchmark-dependent percentages.
Six units cost 612 before fees in the frozen quote, but the stipulated later execution costs 618 before fees.
390px stacked labels and accessible equivalent text table; 768px/tablet and desktop verification pending.
RTL layout and native labels for later Arabic adaptation; isolate IDs LTR; preserve chronological direction and numerical price axes. No translation authored.
FIX-P04-04
P04-L04-V02
Which conclusions follow from these inputs, and which remain unsupported?
Illustrative evidence states under the stated data and execution assumptions.
Bind four labelled rows OBSERVED / INFERRED / UNKNOWN / INSUFFICIENT EVIDENCE to this lesson's evidence table and record locators. Include one calculation or classification and its assumptions. Display missing data and execution limits explicitly; no financial call or forecast badges.
A four-state table distinguishes supplied fictional records, conditional calculations, missing information and unsupported claims.
390px stacked labels and accessible equivalent text table; 768px/tablet and desktop verification pending.
RTL layout and native labels for later Arabic adaptation; isolate IDs LTR; preserve chronological direction and numerical price axes. No translation authored.
FIX-P04-04
Sources & claim boundaries
S04-LIQUIDITY · primary_official_documentation_or_education
CME liquidity measures
- Supported claim
- Bid/offer spread and available order-book size as distinct liquidity measurements.
- Verification boundary
- Primary page inspected. Original synthetic data and results below are not observations of this source's markets.
- Checked at
- 2026-09-30
https://www.cmegroup.com/education/articles-and-reports/how-traders-measure-liquidity
S04-BOOK · primary_official_documentation_or_education
Coinbase product book
- Supported claim
- Bids, asks, prices and sizes in a book snapshot; fixture matching rules are original.
- Verification boundary
- Primary page inspected. Original synthetic data and results below are not observations of this source's markets.
- Checked at
- 2026-09-30
https://docs.cdp.coinbase.com/api-reference/exchange-api/rest-api/products/get-product-book
S04-ORDERS · primary_official_documentation_or_education
SEC Investor.gov Types of Orders
- Supported claim
- Market versus limit mechanics; US securities education used for vocabulary, not universal crypto rules.
- Verification boundary
- Primary page inspected. Original synthetic data and results below are not observations of this source's markets.
- Checked at
- 2026-09-30
https://www.investor.gov/introduction-investing/investing-basics/how-stock-markets-work/types-orders
Dataset provenance
id: FIX-P04-04
dataStatus: ILLUSTRATIVE
observedAt: null
source: Original frozen teaching fixture fully embedded in this lesson
scope: One fictional quote snapshot with ten offered units; a separate stipulated six-unit execution at worse prices.
identifiers: Fictional instrument FU and quote unit CU; training markers, not usable asset IDs or accounts.
timeBasis: Synthetic offsets or T markers only; no actual market timestamps or current/historical market collection.