The Harbor Master's Ledger
Why 50,000 trades a year can bleed you dry — even when every single one is profitable.
Galley / Chronometers / The Harbor Master's Ledger Advanced
Prerequisites: Knot Tying · Episode 09 — The Rope Walk · 18 min read
I bought $890,000 worth of a mid-cap semiconductor stock. My account was $450,000. It used 2× margin. I didn't even know I had margin enabled. I was in a meeting when the order filled. I got the confirmation email and almost threw up... I lost $47,000. In 90 seconds. Because of a decimal point.
THE MEASUREMENT
Every trade has two prices: the one you see on the screen, and the one you actually get. The gap between them is execution cost — slippage, market impact, and latency. For a discretionary trader making ten trades a month, this gap is a rounding error. For a systematic trader making fifty thousand trades a year, it is the difference between a yacht and a lifeboat.
The Harbor Master's Ledger is the mathematics of that gap. We derive the square-root law of market impact, estimate slippage from the bid-ask spread, and calculate the annual friction that devours automated strategies. If you trade with size, frequency, or leverage, this is the math that determines whether you keep your edge or donate it to the market.
THE DERIVATION
Step 1: The Order Book
Before a trade reaches the tape, it passes through the limit order book (LOB). The LOB is a queue: buyers on the left (bids), sellers on the right (asks). The best bid and best ask define the spread. When you submit a market order, you cross the spread and pay the ask (if buying) or receive the bid (if selling). That spread is your first cost.
Crossing the Spread
Slippage is the cost of immediacy. If the spread is $0.05 and you buy 1,000 shares, you pay roughly half the spread per share — the midpoint between bid and ask — because your order walks up the book.
Step 2: The Square-Root Law
Slippage is only the beginning. When your order is large relative to the market's daily volume, your own buying (or selling) moves the price against you. This is market impact. Empirical research — from Almgren et al. (2005) to modern execution desks — shows that impact follows a square-root relationship with order size.
Market Impact Derivation
The square-root law states that price impact scales with the square root of the order's fraction of average daily volume. Daily volatility σ scales the effect: a volatile stock moves more on the same order size.
Convert impact to dollars:
Step 3: Total Execution Cost
The total cost of a single trade is the sum of slippage and market impact. We ignore commissions (broker-dependent) and latency (negligible for swing traders, critical for HFT).
Step 4: Annual Friction
For systematic traders, the true horror is compounding. A strategy that makes 50,000 trades per year with an average cost of 0.20% per trade loses 10,000 basis points — 100% of its expected alpha — to friction alone.
WORKED EXAMPLE
On March 14, 2018, Yuki's algorithm bought $890,000 of a mid-cap semiconductor stock. Let us calculate what the Harbor Master's Ledger would have predicted for that single trade — and what 50,000 similar trades would cost annually.
Step 1 — Shares: $890,000 / $50.00 = 17,800 shares
Step 2 — Slippage: ($0.05 / 2) × 17,800 = $445
Step 3 — Market Impact: 0.02 × √($890,000 / $100,000,000) = 0.02 × 0.0943 = 0.1886%. In dollars: $890,000 × 0.001886 = $1,678
Step 4 — Total Cost: $445 + $1,678 = $2,123 (0.24% of the order)
Step 5 — Annual Friction: Assuming an average trade size of $5,000 and the same 0.24% cost: 50,000 × $5,000 × 0.0024 = $600,000 per year in execution costs alone.
Yuki's $47,000 loss came from a position-sizing bug. But the Harbor Master's Ledger reveals a slower, quieter thief: even if every trade had been perfectly sized, his automation would have paid roughly half a million dollars annually just to cross the spread and move the market.
THE INTERACTIVE CHRONOMETER
Enter your trade parameters below. The Ledger calculates slippage, market impact, total cost, and annual friction. Test your own strategy. The numbers may surprise you.
INTERPRETATION
Execution cost is not a moral failing. It is physics. When your order is large, fast, or frequent, you leave footprints. The Ledger tells you how deep they are.
Healthy Cost < 0.10% — Your edge is safe. Typical for large-cap equities with small size.
Caution Cost 0.10% – 0.50% — Your edge is eroding. Consider reducing size, widening time horizon, or using limit orders.
Danger Cost > 0.50% — Your strategy is paying the market for the privilege of trading. Reduce frequency, shrink position, or find more liquid instruments.
The latency caveat: For traders holding positions for days or weeks, latency measured in milliseconds is irrelevant. For Yuki's 50,000 trades per year — many intraday — a 100ms delay can mean missing the quote, receiving worse fills, or being front-run by faster algos. The square-root law above captures size impact. Latency impact requires co-location, direct market access, and hardware optimization — topics for the next voyage.
From the Logs
See Episode 09 — The Rope Walk for the story of Captain Yuki, whose $47,000 loss came from a unit-conversion bug — but whose true vulnerability was trading 50,000 times a year without ever calculating what the market charged him for each ticket.
Related Guides
Knot Tying
Master the order types every captain needs
The Engine Telegraph
Option Greeks in real time: Delta, Gamma, Theta, Vega
The Tide Gauge
IV skew, term structure, and the math of implied volatility
The Astrolabe
Expectancy, profit factor, and statistical validity