Skip to content

docs(readme): the cost-distortion finding, rendered from the ledger (#646) - #688

Merged
eaitbrahim merged 1 commit into
mainfrom
docs-646-cost-distortion
Sep 2, 2026
Merged

docs(readme): the cost-distortion finding, rendered from the ledger (#646)#688
eaitbrahim merged 1 commit into
mainfrom
docs-646-cost-distortion

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Partial. #646 also asks for a ~10-second terminal capture with committed generation tooling. That's unbuilt and the issue stays open for it. This is the research half.

The README already leads with the fee-drag table (shipped earlier). This adds the finding that came out of measuring it properly.

What it says

Every backtest here used to price fills at the floor of keel's own slippage model — the best case the model can produce, reached only at a $500M/day anchor. 0 of 24 assets reach it. Re-pricing per product moved the median profit factor across 120 cells from 0.309 → 0.219.

profit factor
the cost-model correction −0.090
the best strategy improvement we have measured +0.033

2.7× — derived at render time from two separate hash-chained ledger rows, not typed. A literal would survive either number changing underneath it, which is exactly the trap a headline ratio sets, and a test asserts the ratio is computed.

What it deliberately does not say

Nothing about any other framework.

The tempting version of this section framed crypto backtesting generally as living on fantasy friction assumptions. We have not measured anyone else's defaults, and an unsourced claim about a named third party is the exact failure this section exists to avoid making about ourselves. #646 forbids competitor naming in the asset on trademark grounds; the stronger reason is that the finding needs no help.

A test asserts six framework names are absent and that the scope sentence — "keel mis-pricing keel, on one venue" — is present.

The headline is narrower than proposed

"Strategy optimization is irrelevant under flat slippage assumptions" generalises from one comparison, one universe, one venue. What's written instead — "we mis-priced our own execution by more than any strategy change we ever made" — is checkable line by line, and is the more damaging claim precisely because it's about us.

Two rendering bugs the tests caught

Both invisible in the source, both obvious on the page:

  • textwrap broke the source link mid-URL, so it rendered as literal text.
  • A blank line after every paragraph turned one four-row table into four one-row tables.

Verification

Tests: tests/test_fee_reality_block.py (+6, 16 total).
6 mutants, 6 killed: a hardcoded ratio, a dropped scope disclaimer, a named competitor, a hand-edited README number, a wrapped link, a split table.

Full suite 5253 passed / 3 skipped; ruff and mypy clean.

Regenerate with python scripts/render_fee_reality.py --write; the drift pin fails if the README and the ledger disagree.

…646)

#646 asks the README to lead with the fee-drag benchmark. The table half shipped
already; this is the finding that came out of measuring it properly.

WHAT IT SAYS. Every backtest here used to price fills at the FLOOR of keel's own
slippage model -- the best case the model can produce, reached only at a $500M/day
anchor -- and 0 of 24 assets reach it. Re-pricing per product moved the median
profit factor across 120 cells from 0.309 to 0.219. That 0.090 correction is 2.7x
the +0.033 the best strategy change ever bought.

WHAT IT DELIBERATELY DOES NOT SAY. Nothing about any other framework. The
temptation was a headline framing crypto backtesting generally as living on
fantasy friction assumptions; we have not measured anyone else's defaults, and an
unsourced claim about a named third party is the exact failure this section exists
to avoid making about ourselves. #646 forbids competitor naming in the asset on
trademark grounds; the stronger reason is that the finding needs no help. A test
asserts six framework names are absent and that the scope sentence is present.

THE HEADLINE IS NARROWER THAN THE ONE PROPOSED. "Strategy optimization is
irrelevant under flat slippage assumptions" generalises from one comparison on one
universe at one venue. What is written instead -- "we mis-priced our own execution
by more than any strategy change we ever made" -- is checkable line by line, and
is the more damaging claim precisely because it is about us.

The 2.7x is DERIVED at render time from two separate hash-chained ledger rows, not
typed. A literal would survive either number changing underneath it, which is
exactly the trap a headline ratio sets.

Two rendering bugs the tests caught, both invisible in the source and obvious on
the page: `textwrap` broke the source link mid-URL so it rendered as literal text,
and a blank line after every paragraph turned one four-row table into four
one-row tables.

Tests: `tests/test_fee_reality_block.py` (+6). 6 mutants, 6 killed -- a hardcoded
ratio, a dropped scope disclaimer, a named competitor, a hand-edited README
number, a wrapped link, and a split table.

STILL OPEN on #646: the terminal capture. The issue also asks for a ~10-second GIF
of a real run with committed generation tooling; that is unbuilt and the issue
stays open for it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NzuKAe2RVrPt9acVAWjRyL
@eaitbrahim eaitbrahim self-assigned this Sep 2, 2026
@eaitbrahim
eaitbrahim merged commit 6d5fca0 into main Sep 2, 2026
4 checks passed
@eaitbrahim
eaitbrahim deleted the docs-646-cost-distortion branch September 2, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant