Trading Dev AcademyFree quant education

Free lesson · Arbitrage

Bid, ask and the gross-to-net waterfall

Open interactive lessonPractice calculationsExplore labs

Start with the idea

A price difference matters only at prices and quantities available for an actual purchase and sale.

Symbols, units & horizon
  • q: matched units
  • b: sale bid USD/unit
  • a: purchase ask USD/unit
  • c: total variable cost USD/unit
  • F: fixed USD cost
  • Π: completion-scenario net USD profit

When and why to use this

Reject weak opportunities with attainable costs before building a predictive model.

A price difference matters only at prices and quantities available for an actual purchase and sale.

Buy at the cheap ask and sell at the rich bid. Match currencies and multipliers, then count fees, borrowing, financing, slippage and transfer charges.

Flat charges spread across size while impact often increases. Synchronized quotes and depth are required; stale midpoints cannot establish an executable bound.

Π=q(b−a−c)−F
Model assumptions, derivation and arithmetic

Bid, ask and the gross-to-net waterfall

  1. Calculate executable spread b−a.
  2. Subtract per-unit costs and multiply by matched quantity.
  3. Subtract fixed costs once, then separately model unmatched inventory.
Work it by hand

50 units bought at $100.10 and sold at $100.35 give $12.50 gross. Variable costs $.08×50=$4 and fixed costs $5 leave $3.50.

Apply it in a strategy

  • Reject weak opportunities with attainable costs before building a predictive model.
  • Record the input timestamp, executable quantity, currency and horizon. Reconcile the result with a cash-flow or state table.
  • Stress this failure condition: One filled leg and one failed leg leave directional inventory outside this matched-leg calculation.

Research deliverable

Build and explain a bid, ask and the gross-to-net waterfall worksheet. Reject weak opportunities with attainable costs before building a predictive model.

Evidence boundary: Synthetic arithmetic and scenarios illustrate mechanics. They are not historical returns, a paper replication, or evidence of an executable edge. Research sources and their access limitations are recorded at the end of this module.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

# Python 3.10+; standard library unless NumPy is imported below.
# Inputs and outputs use the units defined in this lesson. Synthetic teaching example.
def net_edge(q,bid,ask,variable,fixed):
    if min(q,bid,ask,variable,fixed)<0: raise ValueError("Nonnegative inputs required")
    return q*(bid-ask-variable)-fixed

print(net_edge(50,100.35,100.10,.08,5))

Continue learning

Arbitrage: Payoffs, Financing and Execution — all lessons
  1. Start with every possible payoff
  2. Bid, ask and the gross-to-net waterfall
  3. Put–call parity from expiration states
  4. Dated cash-and-carry
  5. Triangular currency conversion
  6. ETF baskets and creation access
  7. Haircuts and survival capital
  8. Size, impact and the research decision

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations