Trader OS
Advanced

Advanced E · Execution and microstructure

Compare costs, unfilled risk, and market impact against one shared benchmark.

Advanced E · Execution & MicrostructureSignal Alpha → Realized Alpha
Research topics
Execution CostQueue PositionSpread CaptureMarket ImpactPassive ExecutionAggressive ExecutionTWAPVWAPPOVSmart RoutingMaker / TakerLatency
Foundation nodes explored further
  1. Chapter 1 · MarketWhy are makers, arbitrageurs, trend followers, and hedgers present, and what traces do their trades leave?
  2. Chapter 5 · Support and resistanceHow can book depth and trade distributions validate actual liquidity clustering at a level?
  3. Chapter 13 · Order bookHow do queuing, adverse selection, and impact determine actual order costs?
  4. Chapter 14 · LiquidityHow can a Market Impact model estimate the relation between order scale and price movement?
  5. Chapter 15 · Market makingHow do makers adjust quotes for inventory and flow to control adverse selection?
  6. Chapter 16 · Crypto market structureHow does Smart Routing select execution paths across CEX, DEX, and aggregators?
  7. Chapter 28 · Trading costsHow can you build a Transaction Cost Model including fees, slippage, impact, and funding?
  8. Chapter 33 · ExecutionWhich settings suit TWAP, VWAP, POV, and Smart Routing?

Execution Cost: freeze the benchmark first

Transaction Cost Analysis (TCA) defines decision mid, arrival mid, fill, final evaluation price, side, and quantity. Buy cost is filled notional minus decision-benchmark notional plus fees; unfilled opportunity cost is separate. Sell signs reverse. Arrival-relative spread and impact already enter fill deviations; do not deduct again.

Save four times and all cancellations, rejections, and partial fills for one order. Report completion, averages, fees, duration, opportunity cost, and worst residual exposure. Fill-only samples reward passive strategies that never execute.

Queue Position and Spread Capture

Same-price limit fills depend on venue rules, orders ahead, cancellations, and new arrivals. Public books usually cannot precisely reconstruct your position. A price touching your bid does not prove your entire order filled.

A best-bid fill may capture a spread versus an unchanged mid. Informed selling before declines may produce adverse selection exceeding spread income. Maker rebates cannot cover every inventory loss.

Draw ahead-of-you queue, active-fill, and cancellation events. Use optimistic/conservative queues to bound filled quantities, then record fixed-window post-fill prices. Submit queue assumptions alongside post-fill outcomes. Without tick data, state estimates rather than precise actual rank.

Market Impact: orders change executable conditions

Static books show immediate depth costs. Actual impact includes participant reactions, replenishment, and information leakage. Slicing may reduce instantaneous participation but extend market exposure; cheaper execution is not guaranteed.

In the order-book chapter, hold prices fixed and increase quantity, then hold quantity fixed and reduce depth. Distinguish static impact, exogenous drift, and your information impact. Without counterfactual tick data, do not attribute every move to yourself.

Passive Execution and Aggressive Execution

Aggressive orders exchange spread/impact for more certain immediate fills. Passive orders exchange waiting/nonexecution risk for potentially better prices. In urgent reductions, low fill rates may be worse than high fees. Types need timeout, repricing, and terminal rules to form strategies.

For one buy, predefine waiting caps, chasing limits, remainders, and stale-data cancellation. Report at parent level including all children and unfilled parents. Cancellation submission is not confirmation; in-flight risk remains until acknowledgment.

TWAP, VWAP, and POV

TWAP evenly distributes targets through time. VWAP uses advance forecast volume, not today's complete actual volume. POV multiplies already-observed volume by participation, bounded by remaining targets and hard limits.

Use four teaching slots with asks 100, 102, 101, 103 and volumes 100, 300, 200, 400. Buy a parent of 100 units with sufficient quoted depth for each child. Fees are 10 bp. Own-order market effects are excluded; this is not real execution-performance estimation.

MethodSlot quantitiesAverage fillFeesTotal cost versus decision 100
Immediate aggressive100,0,0,01001010
TWAP25,25,25,25101.510.15160.15
VWAP plan10,30,20,4010210.20210.20

The advance teaching forecast [10%,30%,20%,40%] matches realized volume by construction; do not backfill real tests this way. Reverse prices and immediate execution need not be cheaper. Reduced depth requires remainders. Use the same arrival benchmark throughout, not favorable per-slot references.

POV exercise: 10% participation produces 10,30,20,40, completing 100. If final volume drops to 100, only 70 completes with 30 remaining. At terminal price 103, remainder opportunity cost versus decision is 90, listed separately. Unfilled quantities pay no fill fees. Chasing requires advance approval.

The teaching scheduler verifies this table through the existing book model, excluding adverse selection, random queues, and latency impact. It cannot establish market-optimal algorithms.

Smart Routing and Maker / Taker

Compare effective costs for common quantities, not best prices alone. Fees, balances, borrow, minimums, rate limits, gas, and failure probabilities affect routes. Maker/Taker depends on providing/consuming liquidity in a fill; marketable limits may be Takers.

Draw two venues with quotes, depth, fees, and capital. Filter feasibility before ranking. DEX routes include confirmation times, price protection, and failure costs. Preserve excluded paths and reasons; cheaper venues do not imply infinite funds or instantaneous transfers.

Latency: stale quotes and in-flight risk

Latency includes feed receipt, decisions, risk checks, sending, matching, and reports. Timeouts mean unknown state, not no fill. Blind retries duplicate orders. Associate IDs and reconcile before retries; unconfirmed quantities still consume budgets.

Delay confirmation beyond timeout, then follow pause, query, and reconcile rules before deciding remainders. Submit a timeline proving cancellations, retries, and final positions agree. Inadequate freshness stops trading, not stale-price results.

Project: Execution Analysis of three methods

Copy the execution template. Compare immediate aggressive, TWAP, and VWAP on one parent, inputs, and benchmark, then incomplete POV. Change price path, depth, fees, and latency separately.

Acceptance conserves quantity (fills plus remainder equals target), traces fees, fixes benchmarks, retains opportunity costs, and limits conclusions to inputs/assumptions. Unknown queues require ranges, not false precision. Send results to nine-component attribution without deducting already-counted slippage again.

On this page